X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ca6c176908d9de318600355c92860ea489b4b3a1..3913c541b2e25e10d9c80feef9d32b80d2bad82b:/project/static/js/models.js diff --git a/project/static/js/models.js b/project/static/js/models.js index c333a976..65b9d67b 100644 --- a/project/static/js/models.js +++ b/project/static/js/models.js @@ -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,