console.log('test1... DBG:', DBG) if (!URL_FETCH_TEST) { throw "Brak zmiennej URL_FETCH_TEST" } // Documentation: https://github.com/github/fetch fetch(URL_FETCH_TEST, { credentials: 'same-origin' }) .then(function parseJSON(response) { return response.json() }) .then(function(data) { //$( ".container" ).append( data.body.view ); console.log('request succeeded with JSON response', data) }).catch(function(error) { console.log('request failed', error) }) fetch(URL_FETCH_TEST_KRS, { credentials: 'same-origin' }) .then(function parseJSON(response) { return response.json() }) .then(function(data) { console.log('request succeeded with JSON response', data) }).catch(function(error) { console.log('request failed', error) }) fetch(URL_FETCH_TEST_CEIDG, { credentials: 'same-origin' }) .then(function parseJSON(response) { return response.json() }) .then(function(data) { console.log('request succeeded with JSON response', data) }).catch(function(error) { console.log('request failed', error) }) fetch(URL_FETCH_PRACOWNICY, { credentials: 'same-origin' }) .then(function parseJSON(response) { return response.json() }) .then(function(data) { $( ".container-bi_audit_raport" ).append( data.body.view ); console.log('request succeeded with JSON response', data) }).catch(function(error) { console.log('request failed', error) }) function checkAll() { $('#checkAll').change(function(){ console.log('checkeddd'); var checkboxes = $('form').find(':checkbox'); if($(this).prop('checked')) { checkboxes.prop('checked', true); } else { checkboxes.prop('checked', false); } }); } $(document).ready(function(){ checkAll(); }); global.checkAll = checkAll;