X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ca6c176908d9de318600355c92860ea489b4b3a1..4f9f0e6fbf1be3805f9995c536a583eda1260bee:/project/static/js/views/html.js?ds=sidebyside diff --git a/project/static/js/views/html.js b/project/static/js/views/html.js index 2e5f7cf0..a7f02dd4 100644 --- a/project/static/js/views/html.js +++ b/project/static/js/views/html.js @@ -24,18 +24,22 @@ var HTMLView = View.extend({ modelStateChanged: function(property, value) { if (value == 'synced' || value == 'dirty') { - this.parent.unfreeze(); + this.unfreeze(); } else if (value == 'unsynced') { - this.parent.freeze('Niezsynchronizowany...'); + this.freeze('Niezsynchronizowany...'); } else if (value == 'loading') { - this.parent.freeze('Ładowanie...'); + this.freeze('Ładowanie...'); } else if (value == 'saving') { - this.parent.freeze('Zapisywanie...'); + this.freeze('Zapisywanie...'); } else if (value == 'error') { - this.parent.freeze(this.model.get('error')); + this.freeze(this.model.get('error')); } }, + reload: function() { + this.model.load(true); + }, + dispose: function() { this.model.removeObserver(this); this._super();