##// END OF EJS Templates
un-nest options.options
Jonathan Frederic -
Show More
@@ -112,7 +112,8
112 var ViewType = this._view_types[view_name];
112 var ViewType = this._view_types[view_name];
113 >>>>>>> _model_types, _view_types, _models - and document what keys and values are
113 >>>>>>> _model_types, _view_types, _models - and document what keys and values are
114 if (ViewType !== undefined && ViewType !== null) {
114 if (ViewType !== undefined && ViewType !== null) {
115 var view = new ViewType({model: model, widget_manager: this, options: options});
115 var parameters = {model: model, options: options};
116 var view = new ViewType(parameters);
116 view.render();
117 view.render();
117 model.views.push(view);
118 model.views.push(view);
118 model.on('destroy', view.remove, view);
119 model.on('destroy', view.remove, view);
@@ -184,11 +184,9 function(widget_manager, underscore, backbone){
184 // WidgetView class
184 // WidgetView class
185 //--------------------------------------------------------------------
185 //--------------------------------------------------------------------
186 var WidgetView = Backbone.View.extend({
186 var WidgetView = Backbone.View.extend({
187 initialize: function(options) {
187 initialize: function(parameters) {
188 this.model.on('change',this.update,this);
188 this.model.on('change',this.update,this);
189 this.widget_manager = options.widget_manager;
189 this.options = parameters.options;
190 this.comm_manager = options.widget_manager.comm_manager;
191 this.options = options.options;
192 this.child_views = [];
190 this.child_views = [];
193 this.model.views.push(this);
191 this.model.views.push(this);
194 },
192 },
General Comments 0
You need to be logged in to leave comments. Login now