IDEMPIERE-4671 : Shortcut for the menu box (#2054)
This commit is contained in:
parent
793ffe6aef
commit
2cbf7438fa
|
@ -339,7 +339,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
|
||||
keyListener = new Keylistener();
|
||||
keyListener.setPage(this.getPage());
|
||||
keyListener.setCtrlKeys("@a@c@d@e@f@h@l@m@n@o@p@q@r@s@t@w@x@z@#left@#right@#up@#down@#home@#end#enter^u@u@#pgdn@#pgup$#f2^#f2");
|
||||
keyListener.setCtrlKeys("@a@c@d@e@f@g@h@l@m@n@o@p@q@r@s@t@w@x@z@#left@#right@#up@#down@#home@#end#enter^u@u@#pgdn@#pgup$#f2^#f2");
|
||||
keyListener.setAutoBlur(false);
|
||||
|
||||
//create IDesktop instance
|
||||
|
|
|
@ -67,6 +67,8 @@ public class HeaderPanel extends Panel implements EventListener<Event>
|
|||
|
||||
private MenuTreePanel menuTreePanel;
|
||||
|
||||
private GlobalSearch globalSearch;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
|
@ -124,7 +126,7 @@ public class HeaderPanel extends Panel implements EventListener<Event>
|
|||
* Create global search box
|
||||
*/
|
||||
protected void createSearchPanel() {
|
||||
GlobalSearch globalSearch = new GlobalSearch(new MenuSearchController(menuTreePanel.getMenuTree()));
|
||||
globalSearch = new GlobalSearch(new MenuSearchController(menuTreePanel.getMenuTree()));
|
||||
Component stub = getFellow("menuLookup");
|
||||
stub.getParent().insertBefore(globalSearch, stub);
|
||||
stub.detach();
|
||||
|
@ -161,6 +163,8 @@ public class HeaderPanel extends Panel implements EventListener<Event>
|
|||
popMenu.setFocus(true);
|
||||
}else if (ke.getKeyCode() == 27) {
|
||||
popMenu.close();
|
||||
}else if (ke.getKeyCode() == 71) {
|
||||
globalSearch.setFocus(true);
|
||||
}
|
||||
} else if(event.getName().equals(ZoomEvent.EVENT_NAME)) {
|
||||
Clients.clearBusy();
|
||||
|
|
Loading…
Reference in New Issue