This commit is contained in:
parent
0feb9b4f2d
commit
372304bb7f
|
@ -37,6 +37,8 @@ import org.adempiere.webui.util.UserPreference;
|
||||||
import org.compiere.model.GridWindow;
|
import org.compiere.model.GridWindow;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
import org.zkforge.keylistener.Keylistener;
|
import org.zkforge.keylistener.Keylistener;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.HtmlBasedComponent;
|
import org.zkoss.zk.ui.HtmlBasedComponent;
|
||||||
|
@ -131,6 +133,12 @@ public class ADWindowPanel extends AbstractADWindowPanel
|
||||||
LayoutUtils.addSclass("adwindow-nav adwindow-left-nav", west);
|
LayoutUtils.addSclass("adwindow-nav adwindow-left-nav", west);
|
||||||
adTab.setTabplacement(IADTab.LEFT);
|
adTab.setTabplacement(IADTab.LEFT);
|
||||||
adTab.getTabSelectionComponent().setParent(west);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -142,6 +150,12 @@ public class ADWindowPanel extends AbstractADWindowPanel
|
||||||
LayoutUtils.addSclass("adwindow-nav adwindow-right-nav", east);
|
LayoutUtils.addSclass("adwindow-nav adwindow-right-nav", east);
|
||||||
adTab.setTabplacement(IADTab.RIGHT);
|
adTab.setTabplacement(IADTab.RIGHT);
|
||||||
adTab.getTabSelectionComponent().setParent(east);
|
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());
|
LayoutUtils.addSclass("adwindow-nav-content", (HtmlBasedComponent) adTab.getTabSelectionComponent());
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,10 @@ public final class UserPreference implements Serializable {
|
||||||
public static final String P_WINDOW_TAB_PLACEMENT = "WindowTabPlacement";
|
public static final String P_WINDOW_TAB_PLACEMENT = "WindowTabPlacement";
|
||||||
public static final String DEFAULT_WINDOW_TAB_PLACEMENT = "Left";
|
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 */
|
/** Ini Properties */
|
||||||
private static final String[] PROPERTIES = new String[] {
|
private static final String[] PROPERTIES = new String[] {
|
||||||
P_LANGUAGE,
|
P_LANGUAGE,
|
||||||
|
@ -71,7 +75,8 @@ public final class UserPreference implements Serializable {
|
||||||
P_ORG,
|
P_ORG,
|
||||||
P_WAREHOUSE,
|
P_WAREHOUSE,
|
||||||
P_AUTO_COMMIT,
|
P_AUTO_COMMIT,
|
||||||
P_WINDOW_TAB_PLACEMENT};
|
P_WINDOW_TAB_PLACEMENT,
|
||||||
|
P_WINDOW_TAB_COLLAPSIBLE};
|
||||||
/** Ini Property Values */
|
/** Ini Property Values */
|
||||||
private static final String[] VALUES = new String[] {
|
private static final String[] VALUES = new String[] {
|
||||||
DEFAULT_LANGUAGE,
|
DEFAULT_LANGUAGE,
|
||||||
|
@ -80,7 +85,8 @@ public final class UserPreference implements Serializable {
|
||||||
DEFAULT_ORG,
|
DEFAULT_ORG,
|
||||||
DEFAULT_WAREHOUSE,
|
DEFAULT_WAREHOUSE,
|
||||||
DEFAULT_AUTO_COMMIT,
|
DEFAULT_AUTO_COMMIT,
|
||||||
DEFAULT_WINDOW_TAB_PLACEMENT};
|
DEFAULT_WINDOW_TAB_PLACEMENT,
|
||||||
|
DEFAULT_WINDOW_TAB_COLLAPSIBLE};
|
||||||
|
|
||||||
/** Container for Properties */
|
/** Container for Properties */
|
||||||
private Properties props = new Properties();
|
private Properties props = new Properties();
|
||||||
|
|
Loading…
Reference in New Issue