un-nest options.options

This commit is contained in:
Jonathan Frederic 2014-01-08 10:26:38 +00:00
parent a6fac70e03
commit 8dc5535638
2 changed files with 4 additions and 5 deletions

View File

@ -112,7 +112,8 @@
var ViewType = this._view_types[view_name];
>>>>>>> _model_types, _view_types, _models - and document what keys and values are
if (ViewType !== undefined && ViewType !== null) {
var view = new ViewType({model: model, widget_manager: this, options: options});
var parameters = {model: model, options: options};
var view = new ViewType(parameters);
view.render();
model.views.push(view);
model.on('destroy', view.remove, view);

View File

@ -184,11 +184,9 @@ function(widget_manager, underscore, backbone){
// WidgetView class
//--------------------------------------------------------------------
var WidgetView = Backbone.View.extend({
initialize: function(options) {
initialize: function(parameters) {
this.model.on('change',this.update,this);
this.widget_manager = options.widget_manager;
this.comm_manager = options.widget_manager.comm_manager;
this.options = options.options;
this.options = parameters.options;
this.child_views = [];
this.model.views.push(this);
},