X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ca6c176908d9de318600355c92860ea489b4b3a1..dc3368dad09fa4acb4cc480845f0ff3edc126483:/project/static/js/models.js diff --git a/project/static/js/models.js b/project/static/js/models.js index c333a976..e3fb0ce6 100644 --- a/project/static/js/models.js +++ b/project/static/js/models.js @@ -1,5 +1,5 @@ /*globals Editor fileId SplitView PanelContainerView EditorView FlashView messageCenter*/ -var documentsUrl = '/api/documents/'; +var documentsUrl = '/platforma/api/documents/'; Editor.Model = Editor.Object.extend({ @@ -10,7 +10,7 @@ Editor.Model = Editor.Object.extend({ Editor.ToolbarButtonsModel = Editor.Model.extend({ _className: 'Editor.ToolbarButtonsModel', - serverURL: '/api/toolbar/buttons', + serverURL: '/platforma/api/toolbar/buttons', buttons: {}, init: function() { @@ -56,8 +56,8 @@ Editor.XMLModel = Editor.Model.extend({ this.addObserver(this, 'data', this.dataChanged.bind(this)); }, - load: function() { - if (this.get('state') == 'empty') { + load: function(force) { + if (force || this.get('state') == 'empty') { this.set('state', 'loading'); $.ajax({ url: this.serverURL, @@ -162,8 +162,8 @@ Editor.HTMLModel = Editor.Model.extend({ this.serverURL = serverURL; }, - load: function() { - if (this.get('state') == 'empty') { + load: function(force) { + if (force || this.get('state') == 'empty') { this.set('state', 'loading'); $.ajax({ url: this.serverURL, @@ -215,8 +215,8 @@ Editor.ImageGalleryModel = Editor.Model.extend({ this.pages = []; }, - load: function() { - if (this.get('state') == 'empty') { + load: function(force) { + if (force || this.get('state') == 'empty') { this.set('state', 'loading'); $.ajax({ url: this.serverURL,