X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fstatic%2Fjs%2Fplugin.js;h=cb20be4fb647d128ea098e79d06e16b5b37d70a5;hb=17adeda45d99976cc0b7acecf80a4f147efcdc1f;hp=07ba9b7133750bd93c13f1140a6ca4f49f4276b4;hpb=46945495ff3aeea29a8faff4bd8f859b174c54cb;p=myslice.git diff --git a/manifold/static/js/plugin.js b/manifold/static/js/plugin.js index 07ba9b71..cb20be4f 100644 --- a/manifold/static/js/plugin.js +++ b/manifold/static/js/plugin.js @@ -248,6 +248,16 @@ var Plugin = Class.extend({ return array[arguments.length + 1]; }, + // TOGGLE + // plugin-helper.js is about managing toggled state + // it would be beneficial to merge it in here + toggle_on: function () { return this.toggle("true"); }, + toggle_off: function () { return this.toggle("false"); }, + toggle: function (status) { + messages.debug("toggle domid="+this.options.plugin_uuid); + plugin_helper.set_toggle_status (this.options.plugin_uuid,status); + }, + /* SPIN */ spin: function() {