X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/927a991b71d9876995dd2beadee8d9ff16175a50..8325a3ee5db92b5e219b1c853d12db8534ff8bba:/project/static/js/views/xml.js?ds=inline

diff --git a/project/static/js/views/xml.js b/project/static/js/views/xml.js
index 8af3c4d4..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
@@ -65,13 +69,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'));
     }
   },