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 = new Keylistener();
|
||||||
keyListener.setPage(this.getPage());
|
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);
|
keyListener.setAutoBlur(false);
|
||||||
|
|
||||||
//create IDesktop instance
|
//create IDesktop instance
|
||||||
|
|
|
@ -67,6 +67,8 @@ public class HeaderPanel extends Panel implements EventListener<Event>
|
||||||
|
|
||||||
private MenuTreePanel menuTreePanel;
|
private MenuTreePanel menuTreePanel;
|
||||||
|
|
||||||
|
private GlobalSearch globalSearch;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
|
@ -124,7 +126,7 @@ public class HeaderPanel extends Panel implements EventListener<Event>
|
||||||
* Create global search box
|
* Create global search box
|
||||||
*/
|
*/
|
||||||
protected void createSearchPanel() {
|
protected void createSearchPanel() {
|
||||||
GlobalSearch globalSearch = new GlobalSearch(new MenuSearchController(menuTreePanel.getMenuTree()));
|
globalSearch = new GlobalSearch(new MenuSearchController(menuTreePanel.getMenuTree()));
|
||||||
Component stub = getFellow("menuLookup");
|
Component stub = getFellow("menuLookup");
|
||||||
stub.getParent().insertBefore(globalSearch, stub);
|
stub.getParent().insertBefore(globalSearch, stub);
|
||||||
stub.detach();
|
stub.detach();
|
||||||
|
@ -161,6 +163,8 @@ public class HeaderPanel extends Panel implements EventListener<Event>
|
||||||
popMenu.setFocus(true);
|
popMenu.setFocus(true);
|
||||||
}else if (ke.getKeyCode() == 27) {
|
}else if (ke.getKeyCode() == 27) {
|
||||||
popMenu.close();
|
popMenu.close();
|
||||||
|
}else if (ke.getKeyCode() == 71) {
|
||||||
|
globalSearch.setFocus(true);
|
||||||
}
|
}
|
||||||
} else if(event.getName().equals(ZoomEvent.EVENT_NAME)) {
|
} else if(event.getName().equals(ZoomEvent.EVENT_NAME)) {
|
||||||
Clients.clearBusy();
|
Clients.clearBusy();
|
||||||
|
|
Loading…
Reference in New Issue