johan-rogstadius
9 years agoIdeator I
Removing 'Purge' from menu for specific ItemType
Is it possible to remove/hide a menu 'item' e.g 'Purge' from the 'Main Window Main Menu' for a specific ItemType.
Seems like you can do this for the 'Tearoff Window Main Menu' by adding a init method to
the com.aras.innovator.cui_default.twmm_purge 'Menu Button'.
The method i adds looks like this
-----
var aWindow = top.aras.getMainWindow() == window.top ? top.aras.getMainWindow() : window;
var workerFrame = aWindow.work;
if (workerFrame.itemTypeName === 'myItemType' || workerFrame.itemTypeName === 'myOtherItemType')
{
return {'cui_invisible': true};
}
------
If i try to do the same thing for the com.aras.innovator.cui_default.mwmm_purge menu Button the results seems to be a bit weird
(works for 'myItemType' but not for 'myOtherItemType'???).
I assume the difference lies in when the init method is run for the different menues ??
Any suggestions ?
/regards Johan R.