Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
3500:0800:0860 [2026/08/13 00:55] – removed - external edit (Unknown date) 127.0.0.13500:0800:0860 [2026/08/13 01:10] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +{{tag>Programmers_Reference Client_Side_Plugins Modify_Visual_Perspectives_Menus Visual_Perspectives Menus}}
 +[<10>]
 +====== Modifying default behavior of menu in visual perspectives ======
  
 +The idea here is very similar. You have two scripts available – initialization and render scripts. The initialization script has a chance to modify the configuration of the menu widgets (almost all menu types except Plain List are implemented by their own Kendo UI widget (see the table below). The render script can call the methods of the widget once it has been drawn.
 +
 +The following objects are exposed to the initialization script:
 +
 +  * "config" – this object represents Kendo UI configuration of the menu widget
 +  * "parser" – the controller object (''AwareApp_VPParser'') – see the code in the file ''AwareIM/Tomcat/webapps/AwareIM/aware_kendo/parsers/vpParser.js''
 +
 +For example to add some custom menu item to a toolbar menu you could write the following script:
 +
 +<code javascript>config.items.push ({
 +    type: "button",
 +    spriteCssClass: "fa fa-edit",
 +    text:  "My Menu Item",
 +    click: function () {
 +    alert ("this is my menu item");
 + }
 +});</code>
 +
 +^Menu type^Kendo UI widget^Kendo UI reference^
 +^Toolbar|ToolBar| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/toolbar|http://docs.telerik.com/kendo-ui/api/javascript/ui/toolbar]]|
 +^Standard Menu|Menu| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/menu|http://docs.telerik.com/kendo-ui/api/javascript/ui/menu]]\\ |
 +^Panel Bar|PanelBar| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/panelbar|http://docs.telerik.com/kendo-ui/api/javascript/ui/panelbar]]|
 +^Tree|TreeView| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview|http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview]]|
 +
 +
 +{{simplenavi>.:0860}}