// Load a new instance of this applet\r
that.load(new kiwi.applets[applet_name]());\r
});\r
+ },\r
+\r
+ close: function () {\r
+ this.view.$el.remove();\r
+ this.destroy();\r
+ \r
+ this.view = undefined;\r
+\r
+ this.closePanel();\r
}\r
});
\ No newline at end of file
this.trigger("msg", message_obj);\r
},\r
\r
- close: function () {\r
- this.view.remove();\r
- delete this.view;\r
+ closePanel: function () {\r
+ if (this.view) {\r
+ this.view.remove();\r
+ delete this.view;\r
+ }\r
\r
var members = this.get('members');\r
if (members) {\r
this.unset('members');\r
}\r
\r
+ this.unbind();\r
this.destroy();\r
\r
// If closing the active panel, switch to the server panel\r
}\r
},\r
\r
+ // Alias to closePanel() for child objects to override\r
+ close: function () {\r
+ return this.closePanel();\r
+ },\r
+\r
isChannel: function () {\r
var channel_prefix = kiwi.gateway.get('channel_prefix'),\r
this_name = this.get('name');\r