##// END OF EJS Templates
handle_msg a display_model method.
Jonathan Frederic -
Show More
@@ -71,11 +71,8
71 71 };
72 72
73 73
74 WidgetManager.prototype.handle_msg = function(msg, model) {
75 var method = msg.content.data.method;
76 switch (method) {
77 case 'display':
78 var cell = this.get_msg_cell(msg.parent_header.msg_id);
74 WidgetManager.prototype.display_view = function(msg_id, model) {
75 var cell = this.get_msg_cell(msg_id);
79 76 if (cell === null) {
80 77 console.log("Could not determine where the display" +
81 78 " message was from. Widget will not be displayed");
@@ -90,9 +87,8
90 87 cell.widget_subarea.append(view.$el);
91 88 }
92 89 }
93 break;
94 }
95 }
90 },
91
96 92
97 93 <<<<<<< HEAD
98 94 <<<<<<< HEAD
@@ -174,6 +170,7
174 170 }
175 171 },
176 172
173
177 174 WidgetManager.prototype.get_msg_cell = function (msg_id) {
178 175 var cell = null;
179 176 // First, check to see if the msg was triggered by cell execution.
@@ -70,9 +70,9 function(widget_manager, underscore, backbone){
70 70 case 'custom':
71 71 this.trigger('msg:custom', msg.content.data.custom_content);
72 72 break;
73 default:
74 // pass on to widget manager
75 this.widget_manager.handle_msg(msg, this);
73 case 'display':
74 this.widget_manager.display_view(msg.parent_header.msg_id, this);
75 break;
76 76 }
77 77 },
78 78
General Comments 0
You need to be logged in to leave comments. Login now