X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9e0a0c89939a75eccb7b6ae925707d404b287b78..a3a778ec7c2fe89c4cb48f42be3b0821530199d8:/project/static/js/views/xml.js diff --git a/project/static/js/views/xml.js b/project/static/js/views/xml.js index 6b7571a3..20e2ee98 100644 --- a/project/static/js/views/xml.js +++ b/project/static/js/views/xml.js @@ -35,6 +35,8 @@ var XMLView = View.extend({ $('.xmlview', this.element).height(height); }, + reload: function() {}, + editorDidLoad: function(editor) { $(editor.frame).css({width: '100%', height: '100%'}); this.model @@ -58,7 +60,6 @@ var XMLView = View.extend({ }, modelDataChanged: function(property, value) { - console.log('modelDataChanged'); if (this.editor.getCode() != value) { this.editor.setCode(value); } @@ -66,13 +67,15 @@ var XMLView = 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')); } },