Does anyone know how to open a drawer when top menu button is clicked?
so that we could have the drawer opens in every module.
Maybe I mis-understand your need but why not just add that module in the quick create if it's not already there?
that's only an example, we would like to have a drawer pop out by clicking a drop down menu item from the top tool bar.
Angel Magaña's blog explains what's behind the elements of the NavBar:
Angel's Blog: SugarCRM Reference: Dissecting the NavBar
And you can find an example of adding an option to open a drawer from a Global Action Menu in multiple modules here:
Global Action Menus and Drawers in Sugar 7 « Sugar Developer Blog – SugarCRM
This is not exactly what you are looking for but maybe putting these two together you can get to where you need to be.
You add an option/action in the view, here an example for adding an action to a subpanel action meny
'type' => 'rowaction',
'event' => 'list:customemailreply:fire',
'tooltip' => 'Send email to all associated contacts',
'label' => 'Email',
'acl_action' => 'create',
'tooltip' => 'Email all',
Then you have to create the function customemailreply in the controller, and open a drawer.
but there is no js controller for the top navigation bar, please advise, thanks!!
Yes the navigation bar works differently, you reroute. If you want to open or create recordes from the starting page/dasboard and stay on the same page I think it can be tricky.
The controller is;
There is a function "handleMenuEvent"
Retrieving data ...