From 372304bb7f6a2d5c044d5415fb217c2b732419f1 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 19 May 2009 07:00:19 +0000 Subject: [PATCH] https://sourceforge.net/tracker/?func=detail&aid=2793666&group_id=176962&atid=955896 --- .../org/adempiere/webui/panel/ADWindowPanel.java | 14 ++++++++++++++ .../org/adempiere/webui/util/UserPreference.java | 10 ++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADWindowPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADWindowPanel.java index 464f125773..d0a0454275 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADWindowPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADWindowPanel.java @@ -37,6 +37,8 @@ import org.adempiere.webui.util.UserPreference; import org.compiere.model.GridWindow; import org.compiere.model.MQuery; import org.compiere.util.CLogger; +import org.compiere.util.Env; +import org.compiere.util.Msg; import org.zkforge.keylistener.Keylistener; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.HtmlBasedComponent; @@ -131,6 +133,12 @@ public class ADWindowPanel extends AbstractADWindowPanel LayoutUtils.addSclass("adwindow-nav adwindow-left-nav", west); adTab.setTabplacement(IADTab.LEFT); adTab.getTabSelectionComponent().setParent(west); + + if (SessionManager.getSessionApplication().getUserPreference().isPropertyBool(UserPreference.P_WINDOW_TAB_COLLAPSIBLE)) + { + west.setTitle(Msg.getElement(Env.getCtx(), "AD_Tab_ID")); + west.setCollapsible(true); + } } else { @@ -142,6 +150,12 @@ public class ADWindowPanel extends AbstractADWindowPanel LayoutUtils.addSclass("adwindow-nav adwindow-right-nav", east); adTab.setTabplacement(IADTab.RIGHT); adTab.getTabSelectionComponent().setParent(east); + + if (SessionManager.getSessionApplication().getUserPreference().isPropertyBool(UserPreference.P_WINDOW_TAB_COLLAPSIBLE)) + { + east.setTitle(Msg.getElement(Env.getCtx(), "AD_Tab_ID")); + east.setCollapsible(true); + } } LayoutUtils.addSclass("adwindow-nav-content", (HtmlBasedComponent) adTab.getTabSelectionComponent()); } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/util/UserPreference.java b/zkwebui/WEB-INF/src/org/adempiere/webui/util/UserPreference.java index 4253e220d2..27df372b74 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/util/UserPreference.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/util/UserPreference.java @@ -63,6 +63,10 @@ public final class UserPreference implements Serializable { public static final String P_WINDOW_TAB_PLACEMENT = "WindowTabPlacement"; public static final String DEFAULT_WINDOW_TAB_PLACEMENT = "Left"; + /** window tab collapsible **/ + public static final String P_WINDOW_TAB_COLLAPSIBLE = "WindowTabCollapsible"; + public static final String DEFAULT_WINDOW_TAB_COLLAPSIBLE = "N"; + /** Ini Properties */ private static final String[] PROPERTIES = new String[] { P_LANGUAGE, @@ -71,7 +75,8 @@ public final class UserPreference implements Serializable { P_ORG, P_WAREHOUSE, P_AUTO_COMMIT, - P_WINDOW_TAB_PLACEMENT}; + P_WINDOW_TAB_PLACEMENT, + P_WINDOW_TAB_COLLAPSIBLE}; /** Ini Property Values */ private static final String[] VALUES = new String[] { DEFAULT_LANGUAGE, @@ -80,7 +85,8 @@ public final class UserPreference implements Serializable { DEFAULT_ORG, DEFAULT_WAREHOUSE, DEFAULT_AUTO_COMMIT, - DEFAULT_WINDOW_TAB_PLACEMENT}; + DEFAULT_WINDOW_TAB_PLACEMENT, + DEFAULT_WINDOW_TAB_COLLAPSIBLE}; /** Container for Properties */ private Properties props = new Properties();