X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/8ad03264f1a47afe5108b1252ec3ec139dc16d9a..a3a778ec7c2fe89c4cb48f42be3b0821530199d8:/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 3d803fc7..8057138e 100644 --- a/project/static/js/views/html.js +++ b/project/static/js/views/html.js @@ -24,16 +24,20 @@ 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.freeze(this.model.get('error')); } }, + reload: function() {}, + dispose: function() { this.model.removeObserver(this); this._super();