Loading public/javascript/app/designs/details/Controller.js +29 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,13 @@ define([ return this._widgets[key]; }, _addWidget: function(key, config) { this._createWidget(key, config); this._createWidgetNode(key, config); this._showWidget(key); }, _createWidget: function(key, config) { if (this._getWidgetInstance(key)) { Loading Loading @@ -259,6 +266,14 @@ define([ this._nodes[key] = put(this.centerNode, nodeDefinition); }, _removeWidgetNode: function(key) { var widgetNode = this._nodes[key]; this._removeWidgetInteractivity(key); widgetNode && put('!', widgetNode); }, _showWidget: function(key, omitReload) { var instance = this._getWidgetInstance(key), Loading Loading @@ -345,6 +360,20 @@ define([ this._publish(instance.getChannel("DISCONNECT")); }, _destroyWidget: function(key) { var instance = this._getWidgetInstance(key); if (!instance) { console.error('Tried to destroy non-existent widget "%s"', key); return; } this._removeWidgetNode(key); this._publish(instance.getChannel('DESTROY')); delete this._widgets[key]; }, _addWidgetInteractivity: function(key) { if (this._nodesHandlers[key]) { Loading Loading
public/javascript/app/designs/details/Controller.js +29 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,13 @@ define([ return this._widgets[key]; }, _addWidget: function(key, config) { this._createWidget(key, config); this._createWidgetNode(key, config); this._showWidget(key); }, _createWidget: function(key, config) { if (this._getWidgetInstance(key)) { Loading Loading @@ -259,6 +266,14 @@ define([ this._nodes[key] = put(this.centerNode, nodeDefinition); }, _removeWidgetNode: function(key) { var widgetNode = this._nodes[key]; this._removeWidgetInteractivity(key); widgetNode && put('!', widgetNode); }, _showWidget: function(key, omitReload) { var instance = this._getWidgetInstance(key), Loading Loading @@ -345,6 +360,20 @@ define([ this._publish(instance.getChannel("DISCONNECT")); }, _destroyWidget: function(key) { var instance = this._getWidgetInstance(key); if (!instance) { console.error('Tried to destroy non-existent widget "%s"', key); return; } this._removeWidgetNode(key); this._publish(instance.getChannel('DESTROY')); delete this._widgets[key]; }, _addWidgetInteractivity: function(key) { if (this._nodesHandlers[key]) { Loading