1 _kiwi
.model
.PluginManager
= Backbone
.Model
.extend({
2 initialize: function () {
3 this.$plugin_holder
= $('<div id="kiwi_plugins" style="display:none;"></div>').appendTo('#kiwi');
4 this.loaded_plugins
= {};
7 // Load an applet within this panel
9 if (this.loaded_plugins
[url
]) {
13 this.loaded_plugins
[url
] = $('<div></div>');
14 this.loaded_plugins
[url
].appendTo(this.$plugin_holder
)
19 unload: function (url
) {
20 if (!this.loaded_plugins
[url
]) {
24 this.loaded_plugins
[url
].remove();
25 delete this.loaded_plugins
[url
];