IDEMPIERE-3426:improve tab behavior

drag&drop for home tab case
This commit is contained in:
hieplq 2017-07-16 18:44:46 +07:00
parent c62351bc7d
commit 3741f466da
2 changed files with 3 additions and 2 deletions

View File

@ -300,6 +300,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
homeTab = new Tabpanel();
windowContainer.addWindow(homeTab, Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Home")), false, null);
homeTab.getLinkedTab().setSclass("desktop-hometab");
((Tab)homeTab.getLinkedTab()).setDisableDraggDrop(true);
homeTab.setSclass("desktop-home-tabpanel");
BusyDialog busyDialog = new BusyDialog();
busyDialog.setShadow(false);

View File

@ -450,11 +450,11 @@ public class WindowContainer extends AbstractUIPart implements EventListener<Eve
} catch (Exception e) {}
}else if (Events.ON_CTRL_KEY.equals(event.getName())) {
KeyEvent keyEvent = (KeyEvent) event;
if (keyEvent.isAltKey() && keyEvent.getKeyCode() == KeyEvent.PAGE_UP
if (keyEvent.isAltKey() && keyEvent.getKeyCode() == KeyEvent.PAGE_DOWN
&& tabbox.getSelectedTab() != null && tabbox.getSelectedTab().getNextSibling() != null) {
tabbox.setSelectedTab((org.zkoss.zul.Tab)tabbox.getSelectedTab().getNextSibling());
keyEvent.stopPropagation();
}else if (keyEvent.isAltKey() && keyEvent.getKeyCode() == KeyEvent.PAGE_DOWN
}else if (keyEvent.isAltKey() && keyEvent.getKeyCode() == KeyEvent.PAGE_UP
&& tabbox.getSelectedTab() != null && tabbox.getSelectedTab().getPreviousSibling() != null) {
tabbox.setSelectedTab((org.zkoss.zul.Tab)tabbox.getSelectedTab().getPreviousSibling());
keyEvent.stopPropagation();