fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of stigma.nowoczesnapolska.org.pl:platforma
[redakcja.git]
/
project
/
static
/
js
/
views
/
xml.js
diff --git
a/project/static/js/views/xml.js
b/project/static/js/views/xml.js
index
6b7571a
..
caafa71
100644
(file)
--- 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);
},
$('.xmlview', this.element).height(height);
},
+ reload: function() {
+ this.model.load(true);
+ },
+
editorDidLoad: function(editor) {
$(editor.frame).css({width: '100%', height: '100%'});
this.model
editorDidLoad: function(editor) {
$(editor.frame).css({width: '100%', height: '100%'});
this.model
@@
-58,7
+62,6
@@
var XMLView = View.extend({
},
modelDataChanged: function(property, value) {
},
modelDataChanged: function(property, value) {
- console.log('modelDataChanged');
if (this.editor.getCode() != value) {
this.editor.setCode(value);
}
if (this.editor.getCode() != value) {
this.editor.setCode(value);
}
@@
-66,13
+69,15
@@
var XMLView = View.extend({
modelStateChanged: function(property, value) {
if (value == 'synced' || value == 'dirty') {
modelStateChanged: function(property, value) {
if (value == 'synced' || value == 'dirty') {
- this.
parent.
unfreeze();
+ this.unfreeze();
} else if (value == 'unsynced') {
} else if (value == 'unsynced') {
- this.
parent.
freeze('Niezsynchronizowany...');
+ this.freeze('Niezsynchronizowany...');
} else if (value == 'loading') {
} else if (value == 'loading') {
- this.
parent.
freeze('Ładowanie...');
+ this.freeze('Ładowanie...');
} else if (value == 'saving') {
} else if (value == 'saving') {
- this.parent.freeze('Zapisywanie...');
+ this.freeze('Zapisywanie...');
+ } else if (value == 'error') {
+ this.freeze(this.model.get('error'));
}
},
}
},