IDEMPIERE-369 Master Detail layout improvements. Remove user preference for the old hierarchical tab implementation.
This commit is contained in:
parent
748a09c3be
commit
6a8ea51cf7
|
@ -56,14 +56,6 @@ public final class UserPreference implements Serializable {
|
||||||
/** Language Name Context **/
|
/** Language Name Context **/
|
||||||
public static final String LANGUAGE_NAME = "#LanguageName";
|
public static final String LANGUAGE_NAME = "#LanguageName";
|
||||||
|
|
||||||
/** window tab placement **/
|
|
||||||
public static final String P_WINDOW_TAB_PLACEMENT = "WindowTabPlacement";
|
|
||||||
public static final String DEFAULT_WINDOW_TAB_PLACEMENT = "Right";
|
|
||||||
|
|
||||||
/** window tab collapsible **/
|
|
||||||
public static final String P_WINDOW_TAB_COLLAPSIBLE = "WindowTabCollapsible";
|
|
||||||
public static final String DEFAULT_WINDOW_TAB_COLLAPSIBLE = "N";
|
|
||||||
|
|
||||||
/** Auto New **/
|
/** Auto New **/
|
||||||
public static final String P_AUTO_NEW = "AutoNew";
|
public static final String P_AUTO_NEW = "AutoNew";
|
||||||
public static final String DEFAULT_AUTO_NEW = "Y";
|
public static final String DEFAULT_AUTO_NEW = "Y";
|
||||||
|
@ -81,8 +73,6 @@ public final class UserPreference implements Serializable {
|
||||||
P_WAREHOUSE,
|
P_WAREHOUSE,
|
||||||
P_AUTO_COMMIT,
|
P_AUTO_COMMIT,
|
||||||
P_AUTO_NEW,
|
P_AUTO_NEW,
|
||||||
P_WINDOW_TAB_PLACEMENT,
|
|
||||||
P_WINDOW_TAB_COLLAPSIBLE,
|
|
||||||
P_MENU_COLLAPSED};
|
P_MENU_COLLAPSED};
|
||||||
/** Ini Property Values */
|
/** Ini Property Values */
|
||||||
private static final String[] VALUES = new String[] {
|
private static final String[] VALUES = new String[] {
|
||||||
|
@ -93,8 +83,6 @@ public final class UserPreference implements Serializable {
|
||||||
DEFAULT_WAREHOUSE,
|
DEFAULT_WAREHOUSE,
|
||||||
DEFAULT_AUTO_COMMIT,
|
DEFAULT_AUTO_COMMIT,
|
||||||
DEFAULT_AUTO_NEW,
|
DEFAULT_AUTO_NEW,
|
||||||
DEFAULT_WINDOW_TAB_PLACEMENT,
|
|
||||||
DEFAULT_WINDOW_TAB_COLLAPSIBLE,
|
|
||||||
DEFAULT_MENU_COLLAPSED};
|
DEFAULT_MENU_COLLAPSED};
|
||||||
|
|
||||||
/** Container for Properties */
|
/** Container for Properties */
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.webui.window;
|
package org.adempiere.webui.window;
|
||||||
|
|
||||||
import org.adempiere.webui.component.Label;
|
|
||||||
import org.adempiere.webui.component.Listbox;
|
|
||||||
import org.adempiere.webui.component.ListboxFactory;
|
|
||||||
import org.adempiere.webui.component.ToolBar;
|
import org.adempiere.webui.component.ToolBar;
|
||||||
import org.adempiere.webui.component.ToolBarButton;
|
import org.adempiere.webui.component.ToolBarButton;
|
||||||
import org.adempiere.webui.editor.WYesNoEditor;
|
import org.adempiere.webui.editor.WYesNoEditor;
|
||||||
|
@ -29,7 +26,6 @@ import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zul.Div;
|
import org.zkoss.zul.Div;
|
||||||
import org.zkoss.zul.Popup;
|
import org.zkoss.zul.Popup;
|
||||||
import org.zkoss.zul.Separator;
|
import org.zkoss.zul.Separator;
|
||||||
import org.zkoss.zul.Space;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -44,10 +40,8 @@ public class WPreference extends Popup implements EventListener<Event> {
|
||||||
|
|
||||||
private WYesNoEditor autoCommit;
|
private WYesNoEditor autoCommit;
|
||||||
private WYesNoEditor autoNew;
|
private WYesNoEditor autoNew;
|
||||||
private WYesNoEditor tabCollapsible;
|
|
||||||
private WYesNoEditor adempiereSys;
|
private WYesNoEditor adempiereSys;
|
||||||
private WYesNoEditor logMigrationScript;
|
private WYesNoEditor logMigrationScript;
|
||||||
private Listbox tabPlacement;
|
|
||||||
|
|
||||||
public WPreference() {
|
public WPreference() {
|
||||||
super();
|
super();
|
||||||
|
@ -72,26 +66,6 @@ public class WPreference extends Popup implements EventListener<Event> {
|
||||||
div.appendChild(autoNew.getComponent());
|
div.appendChild(autoNew.getComponent());
|
||||||
this.appendChild(div);
|
this.appendChild(div);
|
||||||
|
|
||||||
tabCollapsible = new WYesNoEditor("WindowTabCollapsible", Msg.getMsg(Env.getCtx(), "WindowTabCollapsible", true),
|
|
||||||
null, false, false, true);
|
|
||||||
tabCollapsible.getComponent().setTooltiptext(Msg.getMsg(Env.getCtx(), "WindowTabCollapsible", false));
|
|
||||||
div = new Div();
|
|
||||||
div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
|
|
||||||
div.appendChild(tabCollapsible.getComponent());
|
|
||||||
this.appendChild(div);
|
|
||||||
|
|
||||||
div = new Div();
|
|
||||||
div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
|
|
||||||
Label label = new Label(Msg.getMsg(Env.getCtx(), "WindowTabPlacement", true));
|
|
||||||
label.setTooltiptext(Msg.getMsg(Env.getCtx(), "WindowTabPlacement", false));
|
|
||||||
div.appendChild(label);
|
|
||||||
div.appendChild(new Space());
|
|
||||||
tabPlacement = ListboxFactory.newDropdownListbox();
|
|
||||||
tabPlacement.appendItem(Msg.getMsg(Env.getCtx(), "Left", true), "Left");
|
|
||||||
tabPlacement.appendItem(Msg.getMsg(Env.getCtx(), "Right", true), "Right");
|
|
||||||
div.appendChild(tabPlacement);
|
|
||||||
this.appendChild(div);
|
|
||||||
|
|
||||||
if (Env.getAD_Client_ID(Env.getCtx()) <= 20 && Env.getAD_User_ID(Env.getCtx()) <= 102) {
|
if (Env.getAD_Client_ID(Env.getCtx()) <= 20 && Env.getAD_User_ID(Env.getCtx()) <= 102) {
|
||||||
adempiereSys = new WYesNoEditor("AdempiereSys", Msg.getMsg(Env.getCtx(), "AdempiereSys", true),
|
adempiereSys = new WYesNoEditor("AdempiereSys", Msg.getMsg(Env.getCtx(), "AdempiereSys", true),
|
||||||
null, false, false, true);
|
null, false, false, true);
|
||||||
|
@ -133,8 +107,6 @@ public class WPreference extends Popup implements EventListener<Event> {
|
||||||
UserPreference preference = SessionManager.getSessionApplication().getUserPreference();
|
UserPreference preference = SessionManager.getSessionApplication().getUserPreference();
|
||||||
autoCommit.setValue(preference.getProperty(UserPreference.P_AUTO_COMMIT));
|
autoCommit.setValue(preference.getProperty(UserPreference.P_AUTO_COMMIT));
|
||||||
autoNew.setValue(preference.getProperty(UserPreference.P_AUTO_NEW));
|
autoNew.setValue(preference.getProperty(UserPreference.P_AUTO_NEW));
|
||||||
tabCollapsible.setValue(preference.getProperty(UserPreference.P_WINDOW_TAB_COLLAPSIBLE));
|
|
||||||
tabPlacement.setValue(preference.getProperty(UserPreference.P_WINDOW_TAB_PLACEMENT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
|
@ -149,10 +121,6 @@ public class WPreference extends Popup implements EventListener<Event> {
|
||||||
(Boolean)autoCommit.getValue() ? "Y" : "N");
|
(Boolean)autoCommit.getValue() ? "Y" : "N");
|
||||||
preference.setProperty(UserPreference.P_AUTO_NEW,
|
preference.setProperty(UserPreference.P_AUTO_NEW,
|
||||||
(Boolean)autoNew.getValue() ? "Y" : "N");
|
(Boolean)autoNew.getValue() ? "Y" : "N");
|
||||||
preference.setProperty(UserPreference.P_WINDOW_TAB_COLLAPSIBLE,
|
|
||||||
(Boolean)tabCollapsible.getValue() ? "Y" : "N");
|
|
||||||
preference.setProperty(UserPreference.P_WINDOW_TAB_PLACEMENT,
|
|
||||||
(String)tabPlacement.getSelectedItem().getValue());
|
|
||||||
|
|
||||||
preference.savePreference();
|
preference.savePreference();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue