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' into view-refactor
[redakcja.git]
/
project
/
static
/
js
/
views
/
panel_container.js
diff --git
a/project/static/js/views/panel_container.js
b/project/static/js/views/panel_container.js
index
c873574
..
e4950ba
100644
(file)
--- a/
project/static/js/views/panel_container.js
+++ b/
project/static/js/views/panel_container.js
@@
-16,15
+16,14
@@
var PanelContainerView = View.extend({
},
selectChanged: function(event) {
},
selectChanged: function(event) {
- var view = panels[$('select', this.element.get(0)).val()];
- var klass = view.klass;
- console.log(view, klass);
+ var value = $('select', this.element.get(0)).val();
+ var klass = panels[value];
if (this.contentView) {
this.contentView.dispose();
this.contentView = null;
}
if (this.contentView) {
this.contentView.dispose();
this.contentView = null;
}
- this.contentView = new klass($('.content-view',
this.element.get(0)), this.model);
-
console.log(this.contentView
);
+ this.contentView = new klass($('.content-view',
+
this.element.get(0)), this.model.contentModels[value]
);
},
dispose: function() {
},
dispose: function() {