Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Main toolbar
-
Hi, how can I add or remove icons or reorder them at main tool bar ?
Best regards.
-
The answer depends on the icon you're trying to hide and from who. In the code, I encourage you to look at the "getVisibility" method in com.serotonin.m2m2.module.MenuItemDefinition, as well as the class com.serotonin.m2m2.module.MenuItemVetoDefinition (which is probably what you're looking for, as I think you could just make a veto module)
-
So I must recompile, isn't it ?
And what about change order ? My client wants the Views eye icon be the first in the tool bar ...
Thankyou
-
You will need to do some compilation to add classes that extend MenuItemVetoDefinition, but you can just "javac myvetoclass.java" in the same directory as ModuleElementDefinition.java and MenuItemVetoDefinition.java (both in com.serotonin.m2m2.module) to get a .class file, then bundle that into the module's .jar file. Add the class path to the module.properties file for the module and all should work.
-
Also, in response to the ordering... that will require recompiling the entire module or replacing the class overriding the MenuItemDefinition subclass in the .jar.
MenuItemDefinition has a method "getOrder" which is documented to explain the ordering process.
-
ok. thankyou