X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/deb0c90b1c089230918efab45deec35c3bea3d62..3669f00df3636d92c7de6fb0c7ebeac89150e5fe:/project/static/js/views/html.js diff --git a/project/static/js/views/html.js b/project/static/js/views/html.js index 3d803fc7..a7f02dd4 100644 --- a/project/static/js/views/html.js +++ b/project/static/js/views/html.js @@ -24,16 +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.freeze(this.model.get('error')); } }, + reload: function() { + this.model.load(true); + }, + dispose: function() { this.model.removeObserver(this); this._super();