X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ad481d9335cb91f56adfffda3999284f37d37942..17ea853baef7703291df8ae230a2aa433f8f5656:/project/static/js/views/xml.js diff --git a/project/static/js/views/xml.js b/project/static/js/views/xml.js index a1b6ca63..caafa715 100644 --- a/project/static/js/views/xml.js +++ b/project/static/js/views/xml.js @@ -35,6 +35,10 @@ var XMLView = View.extend({ $('.xmlview', this.element).height(height); }, + reload: function() { + this.model.load(true); + }, + editorDidLoad: function(editor) { $(editor.frame).css({width: '100%', height: '100%'}); this.model @@ -58,7 +62,6 @@ var XMLView = View.extend({ }, modelDataChanged: function(property, value) { - console.log('modelDataChanged'); if (this.editor.getCode() != value) { this.editor.setCode(value); } @@ -73,6 +76,8 @@ var XMLView = View.extend({ this.freeze('Ładowanie...'); } else if (value == 'saving') { this.freeze('Zapisywanie...'); + } else if (value == 'error') { + this.freeze(this.model.get('error')); } },