Show More
@@ -66,12 +66,11 define([ | |||||
66 | if (view === null) { |
|
66 | if (view === null) { | |
67 | console.error("View creation failed", model); |
|
67 | console.error("View creation failed", model); | |
68 | } |
|
68 | } | |
69 | if (cell.widget_subarea) { |
|
|||
70 | cell.widget_area.show(); |
|
|||
71 |
|
|
69 | this._handle_display_view(view); | |
|
70 | if (cell.widget_subarea) { | |||
72 | cell.widget_subarea.append(view.$el); |
|
71 | cell.widget_subarea.append(view.$el); | |
73 | view.trigger('displayed'); |
|
|||
74 | } |
|
72 | } | |
|
73 | view.trigger('displayed'); | |||
75 | } |
|
74 | } | |
76 | }; |
|
75 | }; | |
77 |
|
76 |
@@ -370,6 +370,14 define(["widgets/js/manager", | |||||
370 | // By default, this is only called the first time the view is created |
|
370 | // By default, this is only called the first time the view is created | |
371 | }, |
|
371 | }, | |
372 |
|
372 | |||
|
373 | show: function(){ | |||
|
374 | // Show the widget-area | |||
|
375 | if (this.options && this.options.cell && | |||
|
376 | this.options.cell.widget_area !== undefined) { | |||
|
377 | this.options.cell.widget_area.show(); | |||
|
378 | } | |||
|
379 | }, | |||
|
380 | ||||
373 | send: function (content) { |
|
381 | send: function (content) { | |
374 | // Send a custom msg associated with this view. |
|
382 | // Send a custom msg associated with this view. | |
375 | this.model.send(content, this.callbacks()); |
|
383 | this.model.send(content, this.callbacks()); | |
@@ -390,6 +398,7 define(["widgets/js/manager", | |||||
390 | this.model.on('change', this.update, this); |
|
398 | this.model.on('change', this.update, this); | |
391 | this.model.on('msg:custom', this.on_msg, this); |
|
399 | this.model.on('msg:custom', this.on_msg, this); | |
392 | DOMWidgetView.__super__.initialize.apply(this, arguments); |
|
400 | DOMWidgetView.__super__.initialize.apply(this, arguments); | |
|
401 | this.on('displayed', this.show, this); | |||
393 | }, |
|
402 | }, | |
394 |
|
403 | |||
395 | on_msg: function(msg) { |
|
404 | on_msg: function(msg) { |
General Comments 0
You need to be logged in to leave comments.
Login now