X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ed513d6c11381d01e5c271fd0d12f49f5ae7c8f5..c5b8f44c80d85f73d6eab626e0afc5ab61aa6d20:/project/static/js/models.js?ds=sidebyside diff --git a/project/static/js/models.js b/project/static/js/models.js index e85ed5a0..9938eb07 100644 --- a/project/static/js/models.js +++ b/project/static/js/models.js @@ -1,4 +1,4 @@ -/*globals Editor fileId SplitView PanelContainerView EditorView*/ +/*globals Editor fileId SplitView PanelContainerView EditorView FlashView messageCenter*/ var documentsUrl = '/api/documents/'; @@ -82,7 +82,7 @@ Editor.XMLModel = Editor.Model.extend({ $.ajax({ url: this.serverURL, - type: 'put', + type: 'post', dataType: 'json', data: payload, success: this.updatingSucceeded.bind(this), @@ -209,12 +209,12 @@ Editor.ImageGalleryModel = Editor.Model.extend({ alert('erroneous state:', this.get('state')); } - $.log('galleries:', data); + console.log('galleries:', data); if (data.length === 0) { this.set('data', []); } else { - $.log('dupa'); + console.log('dupa'); this.set('data', data[0].pages); } @@ -375,6 +375,7 @@ $(function() { doc = new Editor.DocumentModel(); var editor = new EditorView('#body-wrap', doc); editor.freeze(); + var flashView = new FlashView('#flashview', messageCenter); var splitView = new SplitView('#splitview', doc); leftPanelView = new PanelContainerView('#left-panel-container', doc); rightPanelContainer = new PanelContainerView('#right-panel-container', doc);