Page 1 of 1

Toolbar Buttons not clickable when several msg selected

Posted: Fri Sep 30, 2011 4:54 am
by greztok
Hi there,
I've developed a zimlet to save emails and attachments for my company. It is working fine. The operation consists on drag & drop one or more emails on the zimlet item in the zimlet panel.

My users want a button instead of drag&drop because they say the item is too small and they frequently hit another zimlet item.
So I'v added a toolbar button, but the button turns gray and is not usable when more than one message is selected in the message list.
I checked the "com_zimbra_example_toolbarhook" zimlet, and it appears to react the same way.
Any idea on how to solve this?
Thx,
Sylvain

Toolbar Buttons not clickable when several msg selected

Posted: Tue May 26, 2015 12:19 pm
by pkopacz
Did you ever solve this issue? I have the same question. Thanks, Paul

Re: Toolbar Buttons not clickable when several msg selected

Posted: Fri Nov 24, 2017 7:09 am
by ozzi
If somebody finds this problem, i found a solution:

var controller = appCtxt.getAppViewMgr()._view['TV-main']; // you might want to use another controller, maybe use appCtxt.getCurrentController or so
controller.operationsToEnableOnMultiSelection.push('YOUR_BUTTON_NAME); // YOUR_BUTTON_NAME being the string you passed when using createOp on the toolbar

Re: Toolbar Buttons not clickable when several msg selected

Posted: Tue Dec 05, 2017 1:52 pm
by ozzi
Actually, i found a proper solution to this, the solution mentioned above does not work with certain UI constellations (example: switching from conversation view to mail view, or not having preview on).
This works always:

appCtxt.getAppViewMgr()._view['THE VIEW YOU HAVE OPEN '].controller.operationsToEnableOnMultiSelection.push('COM_EXAMPLE_YOUR_BUTTON_NAME');