##// END OF EJS Templates
remove msg.content.data.view_name and corrosponding create_view param
Jonathan Frederic -
Show More
@@ -78,7 +78,7 b''
78 console.log("Could not determine where the display" +
78 console.log("Could not determine where the display" +
79 " message was from. Widget will not be displayed");
79 " message was from. Widget will not be displayed");
80 } else {
80 } else {
81 var view = this.create_view(model, msg.content.data.view_name);
81 var view = this.create_view(model);
82 if (view !== undefined
82 if (view !== undefined
83 && cell.widget_subarea !== undefined
83 && cell.widget_subarea !== undefined
84 && cell.widget_subarea !== null) {
84 && cell.widget_subarea !== null) {
@@ -94,6 +94,7 b''
94
94
95 <<<<<<< HEAD
95 <<<<<<< HEAD
96 <<<<<<< HEAD
96 <<<<<<< HEAD
97 <<<<<<< HEAD
97 WidgetManager.prototype.create_view = function(model, view_name, cell) {
98 WidgetManager.prototype.create_view = function(model, view_name, cell) {
98 =======
99 =======
99 WidgetManager.prototype.create_view = function(model, view_name, options) {
100 WidgetManager.prototype.create_view = function(model, view_name, options) {
@@ -106,6 +107,10 b''
106 >>>>>>> Add widget view options in creating child views
107 >>>>>>> Add widget view options in creating child views
107 var ViewType = this.widget_view_types[view_name];
108 var ViewType = this.widget_view_types[view_name];
108 =======
109 =======
110 =======
111 WidgetManager.prototype.create_view = function(model, options) {
112 var view_name = model.get('view_name');
113 >>>>>>> remove msg.content.data.view_name and corrosponding create_view param
109 var ViewType = this._view_types[view_name];
114 var ViewType = this._view_types[view_name];
110 >>>>>>> _model_types, _view_types, _models - and document what keys and values are
115 >>>>>>> _model_types, _view_types, _models - and document what keys and values are
111 if (ViewType !== undefined && ViewType !== null) {
116 if (ViewType !== undefined && ViewType !== null) {
@@ -114,6 +119,7 b''
114 model.views.push(view);
119 model.views.push(view);
115 model.on('destroy', view.remove, view);
120 model.on('destroy', view.remove, view);
116 <<<<<<< HEAD
121 <<<<<<< HEAD
122 <<<<<<< HEAD
117 /*
123 /*
118 // TODO: handle view deletion. Don't forget to delete child views
124 // TODO: handle view deletion. Don't forget to delete child views
119 var that = this;
125 var that = this;
@@ -160,6 +166,8 b''
160 delete that.model_id; // Delete id from model so widget manager cleans up.
166 delete that.model_id; // Delete id from model so widget manager cleans up.
161 });
167 });
162 */
168 */
169 =======
170 >>>>>>> remove msg.content.data.view_name and corrosponding create_view param
163 return view;
171 return view;
164 }
172 }
165 },
173 },
General Comments 0
You need to be logged in to leave comments. Login now