Results 1 to 2 of 2

Thread: Add an integrated zimlet in the New dropdown list menu

  1. #1
    Join Date
    Mar 2014
    Posts
    5
    Rep Power
    1

    Post Add an integrated zimlet in the New dropdown list menu

    Hello there

    Iím trying to add a new Integrated Zimlet in the New Message dropdown list menu. When I do a click in the arrow I see options like Message, Contact, Contact Group, Appointment, task, etc. and I need to add a new element under the Message Item.
    I canít figure it out how to do this since Iím new Zimlet developer and I donít know how to access this toolbarÖ
    I will appreciate some help.
    Thanks

  2. #2
    Join Date
    Mar 2014
    Posts
    5
    Rep Power
    1

    Default Done!!!!

    For those who need to do this, here you have the solution, after hours I finally find the way. Notice that this works on the Server, not in ZDesktop.. Hope it would be helpful for the forum.

    Code:
    myApp_HandlerObject.prototype.initializeToolbar =
    function(app, toolbar, controller, viewId) {	
    	if (viewId == "CLV-main") {
    	var menu = DwtControl.fromElementId("zb__NEW_MENU").getMenu();
    		if (menu != null){
    			var buttonParams = {
    			   parent: menu ,
    			   className: "ZMenuItem ZWidget",
    			   id:"addMyElement", 
    			   text:"MyElement",  
    			   index: 2   
    			};
    			var myMenuItem = DwtMenuItem.create(buttonParams ) ;
    			myMenuItem.setText("My Element");
    			myMenuItem.setImage("NewMessage") ;
    			myMenuItem.addSelectionListener(new AjxListener(this, this._openMyFunction, controller));   
    			console.log(myMenuItem);
    			menu.addChild(myMenuItem );
    		}
    
    		var button = toolbar.createOp("MY_TOOLBAR_BUTTON", buttonParams);
    		button.addSelectionListener(new AjxListener(this, this._openMyFunction, controller));   
    	}    
       
    };

Similar Threads

  1. Sample Zimlet that replace zimlet menu panel
    By xander2k in forum Zimlets
    Replies: 0
    Last Post: 06-18-2013, 09:53 AM
  2. ZCS7 Posix's loginShell dropdown - no list
    By basurangutak in forum Administrators
    Replies: 0
    Last Post: 10-13-2011, 09:45 PM
  3. [SOLVED] Dynamic dropdown menu
    By kganesh in forum Developers
    Replies: 3
    Last Post: 04-02-2009, 11:17 PM
  4. [SOLVED] Dynamic dropdown menu
    By kganesh in forum I18N/L10N - Translations
    Replies: 3
    Last Post: 04-02-2009, 11:17 PM
  5. Right Click menu zimlet
    By jayarajmohan in forum Zimlets
    Replies: 4
    Last Post: 11-20-2008, 09:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •