IDEMPIERE-369 Master Detail layout improvements. Remove user preference for the old hierarchical tab implementation.

This commit is contained in:
Heng Sin Low 2012-10-10 17:44:44 +08:00
parent 748a09c3be
commit 6a8ea51cf7
2 changed files with 0 additions and 44 deletions

View File

@ -56,14 +56,6 @@ public final class UserPreference implements Serializable {
/** Language Name Context **/
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 **/
public static final String P_AUTO_NEW = "AutoNew";
public static final String DEFAULT_AUTO_NEW = "Y";
@ -81,8 +73,6 @@ public final class UserPreference implements Serializable {
P_WAREHOUSE,
P_AUTO_COMMIT,
P_AUTO_NEW,
P_WINDOW_TAB_PLACEMENT,
P_WINDOW_TAB_COLLAPSIBLE,
P_MENU_COLLAPSED};
/** Ini Property Values */
private static final String[] VALUES = new String[] {
@ -93,8 +83,6 @@ public final class UserPreference implements Serializable {
DEFAULT_WAREHOUSE,
DEFAULT_AUTO_COMMIT,
DEFAULT_AUTO_NEW,
DEFAULT_WINDOW_TAB_PLACEMENT,
DEFAULT_WINDOW_TAB_COLLAPSIBLE,
DEFAULT_MENU_COLLAPSED};
/** Container for Properties */

View File

@ -13,9 +13,6 @@
*****************************************************************************/
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.ToolBarButton;
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.Popup;
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 autoNew;
private WYesNoEditor tabCollapsible;
private WYesNoEditor adempiereSys;
private WYesNoEditor logMigrationScript;
private Listbox tabPlacement;
public WPreference() {
super();
@ -72,26 +66,6 @@ public class WPreference extends Popup implements EventListener<Event> {
div.appendChild(autoNew.getComponent());
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) {
adempiereSys = new WYesNoEditor("AdempiereSys", Msg.getMsg(Env.getCtx(), "AdempiereSys", true),
null, false, false, true);
@ -133,8 +107,6 @@ public class WPreference extends Popup implements EventListener<Event> {
UserPreference preference = SessionManager.getSessionApplication().getUserPreference();
autoCommit.setValue(preference.getProperty(UserPreference.P_AUTO_COMMIT));
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 {
@ -149,10 +121,6 @@ public class WPreference extends Popup implements EventListener<Event> {
(Boolean)autoCommit.getValue() ? "Y" : "N");
preference.setProperty(UserPreference.P_AUTO_NEW,
(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();