Heng Sin Low 2009-05-19 07:00:19 +00:00
parent 0feb9b4f2d
commit 372304bb7f
2 changed files with 22 additions and 2 deletions

View File

@ -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());
}

View File

@ -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();