Show More
@@ -71,22 +71,22 b'' | |||||
71 | WidgetManager.prototype.handle_msg = function(msg, model) { |
|
71 | WidgetManager.prototype.handle_msg = function(msg, model) { | |
72 | var method = msg.content.data.method; |
|
72 | var method = msg.content.data.method; | |
73 | switch (method) { |
|
73 | switch (method) { | |
74 | case 'display': |
|
74 | case 'display': | |
75 | var cell = this.get_msg_cell(msg.parent_header.msg_id); |
|
75 | var cell = this.get_msg_cell(msg.parent_header.msg_id); | |
76 | if (cell === null) { |
|
76 | if (cell === null) { | |
77 | console.log("Could not determine where the display" + |
|
77 | console.log("Could not determine where the display" + | |
78 | " message was from. Widget will not be displayed"); |
|
78 | " message was from. Widget will not be displayed"); | |
79 | } else { |
|
79 | } else { | |
80 | var view = this.create_view(model, |
|
80 | var view = this.create_view(model, msg.content.data.view_name, cell); | |
81 | msg.content.data.view_name, cell); |
|
81 | if (view !== undefined | |
82 |
|
|
82 | && cell.widget_subarea !== undefined | |
83 |
&& cell.widget_subarea !== |
|
83 | && cell.widget_subarea !== null) { | |
84 | && cell.widget_subarea !== null) { |
|
84 | ||
85 |
|
|
85 | cell.widget_area.show(); | |
86 |
|
|
86 | cell.widget_subarea.append(view.$el); | |
87 | } |
|
87 | } | |
88 | } |
|
88 | } | |
89 | break; |
|
89 | break; | |
90 | } |
|
90 | } | |
91 | } |
|
91 | } | |
92 |
|
92 |
General Comments 0
You need to be logged in to leave comments.
Login now