fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed unsanited message/user description in document.invoke_and_commit
[redakcja.git]
/
project
/
static
/
js
/
models.js
diff --git
a/project/static/js/models.js
b/project/static/js/models.js
index
13dc2ea
..
5d3fac4
100644
(file)
--- a/
project/static/js/models.js
+++ b/
project/static/js/models.js
@@
-181,7
+181,8
@@
Editor.HTMLModel = Editor.Model.extend({
Editor.ImageGalleryModel = Editor.Model.extend({
_className: 'Editor.ImageGalleryModel',
Editor.ImageGalleryModel = Editor.Model.extend({
_className: 'Editor.ImageGalleryModel',
- serverURL: null,
+ serverURL: null,
+ data: [],
state: 'empty',
init: function(serverURL) {
state: 'empty',
init: function(serverURL) {
@@
-208,7
+209,15
@@
Editor.ImageGalleryModel = Editor.Model.extend({
alert('erroneous state:', this.get('state'));
}
alert('erroneous state:', this.get('state'));
}
- this.set('pages', data[0].pages);
+ $.log('galleries:', data);
+
+ if (data.length == 0)
+ this.set('data', []);
+ else {
+ $.log('dupa');
+ this.set('data', data[0].pages);
+ }
+
this.set('state', 'synced');
},
this.set('state', 'synced');
},