IDEMPIERE-3426:improve tab behavior
drag&drop for home tab case
This commit is contained in:
parent
c62351bc7d
commit
3741f466da
|
@ -300,6 +300,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
homeTab = new Tabpanel();
|
homeTab = new Tabpanel();
|
||||||
windowContainer.addWindow(homeTab, Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Home")), false, null);
|
windowContainer.addWindow(homeTab, Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Home")), false, null);
|
||||||
homeTab.getLinkedTab().setSclass("desktop-hometab");
|
homeTab.getLinkedTab().setSclass("desktop-hometab");
|
||||||
|
((Tab)homeTab.getLinkedTab()).setDisableDraggDrop(true);
|
||||||
homeTab.setSclass("desktop-home-tabpanel");
|
homeTab.setSclass("desktop-home-tabpanel");
|
||||||
BusyDialog busyDialog = new BusyDialog();
|
BusyDialog busyDialog = new BusyDialog();
|
||||||
busyDialog.setShadow(false);
|
busyDialog.setShadow(false);
|
||||||
|
|
|
@ -450,11 +450,11 @@ public class WindowContainer extends AbstractUIPart implements EventListener<Eve
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {}
|
||||||
}else if (Events.ON_CTRL_KEY.equals(event.getName())) {
|
}else if (Events.ON_CTRL_KEY.equals(event.getName())) {
|
||||||
KeyEvent keyEvent = (KeyEvent) event;
|
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.getSelectedTab() != null && tabbox.getSelectedTab().getNextSibling() != null) {
|
||||||
tabbox.setSelectedTab((org.zkoss.zul.Tab)tabbox.getSelectedTab().getNextSibling());
|
tabbox.setSelectedTab((org.zkoss.zul.Tab)tabbox.getSelectedTab().getNextSibling());
|
||||||
keyEvent.stopPropagation();
|
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.getSelectedTab() != null && tabbox.getSelectedTab().getPreviousSibling() != null) {
|
||||||
tabbox.setSelectedTab((org.zkoss.zul.Tab)tabbox.getSelectedTab().getPreviousSibling());
|
tabbox.setSelectedTab((org.zkoss.zul.Tab)tabbox.getSelectedTab().getPreviousSibling());
|
||||||
keyEvent.stopPropagation();
|
keyEvent.stopPropagation();
|
||||||
|
|
Loading…
Reference in New Issue