X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/96647893c5a1e2c675fc2b1bf1d7ca16fe3253b8..78644811ca0c6042212788dc67add42bc41fb74c:/project/static/js/editor.js diff --git a/project/static/js/editor.js b/project/static/js/editor.js deleted file mode 100644 index 3cd59f0f..00000000 --- a/project/static/js/editor.js +++ /dev/null @@ -1,31 +0,0 @@ -$(function() -{ - function saveToBranch(data) { - $.log('Saving to local branch'); - var changed_panel = $('.panel-wrap.changed'); - - if( changed_panel.length == 0) - return; /* no changes */ - - if( changed_panel.length > 1) - alert('Błąd: więcej niż jeden panel został zmodyfikowany. Nie można zapisać.'); - - save_data = changed_panel.data('ctrl').saveData(); - - $.ajax({ - url: location.href, - dataType: 'json', - success: function(data, textStatus) { - $.log('Success:', data); - }, - error: function(rq, tstat, err) { - $.log('save error', rq, tstat, err); - }, - type: 'POST', - data: save_data - }); - } - - $('#toolbar-button-save').click(saveToBranch); -}); -