Allow multiple menu items from plugin.

• Jan 18, 2013 - 07:59
Type
Plugins
Severity
S5 - Suggestion
Status
active
Project

So that same plugin could be ran with different options. E.g.:

var mscorePlugin = {
menu: ['Plugins.My Plugin.Option1', Plugins.My Plugin.Option2'],
init: init,
run: run
};

or simply

var mscorePlugin = {
menu: 'Plugins.My Plugin.Option1|Plugins.My Plugin.Option2',
init: init,
run: run
};

Also the run function should be passed the menu name as it's argument. E.g. when Option 1 is clicked the plugin should run with "Plugins.My Plugin.Option1" being passed as an argument to run function.


Comments