fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Basic gallery.
[redakcja.git]
/
project
/
static
/
js
/
models.js
diff --git
a/project/static/js/models.js
b/project/static/js/models.js
index
62d1c78
..
f6725a5
100644
(file)
--- a/
project/static/js/models.js
+++ b/
project/static/js/models.js
@@
-176,7
+176,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) {
@@
-203,7
+204,15
@@
Editor.ImageGalleryModel = Editor.Model.extend({
alert('erroneous state:', this.get('state'));
}
alert('erroneous state:', this.get('state'));
}
- this.set('pages', data.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');
},