diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/component/ADButtonTabList.java b/zkwebui/WEB-INF/src/org/adempiere/webui/component/ADButtonTabList.java index d05ed91743..b6acc28a7b 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/component/ADButtonTabList.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/component/ADButtonTabList.java @@ -3,8 +3,9 @@ package org.adempiere.webui.component; import java.util.ArrayList; import java.util.List; -import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.ADTabListModel.ADTabLabel; +import org.zkoss.zhtml.Button; +import org.zkoss.zhtml.Text; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; @@ -30,25 +31,29 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener int i = 0; for (ADTabLabel tabLabel : listItems) { Button button = new Button(); - button.setLabel(tabLabel.label); + Text text = new Text(tabLabel.label); + button.appendChild(text); int s = tabbox.getSelectedIndex(); - if ( s == i) - LayoutUtils.addSclass("adwindow-navbtn-sel", button); - else { + if ( s == i) { + button.setSclass("adwindow-navbtn-sel"); + button.setDynamicProperty("disabled", null); + } else { if (!tabbox.canNavigateTo(s, i)) { - button.setDisabled(true); - LayoutUtils.addSclass("adwindow-navbtn-dis", button); + button.setDynamicProperty("disabled", "disabled"); + button.setSclass("adwindow-navbtn-dis"); } else { - LayoutUtils.addSclass("adwindow-navbtn-uns", button); + button.setDynamicProperty("disabled", null); + button.setSclass("adwindow-navbtn-uns"); } } String style = "margin-left:" + (tabLabel.tabLevel*15+5) + "px"; + String width = (195 - tabLabel.tabLevel*15)+"px"; + style = style + "; width:" + width; button.setStyle(style); button.setParent(this); - button.setWidth((195 - tabLabel.tabLevel*15)+"px"); button.addEventListener(Events.ON_CLICK, this); i++; } @@ -84,7 +89,8 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener Button button = (Button) event.getTarget(); int i = 0; for (ADTabLabel tabLabel : listItems) { - if (tabLabel.label.equals(button.getLabel())) { + Text text = (Text) button.getFirstChild(); + if (tabLabel.label.equals(text.getValue())) { break; } i++; diff --git a/zkwebui/css/default.css.dsp b/zkwebui/css/default.css.dsp index 7190230d8b..e42364c44a 100644 --- a/zkwebui/css/default.css.dsp +++ b/zkwebui/css/default.css.dsp @@ -169,12 +169,14 @@ tr.tab-desktop-tb-m { background-color: #9CBDFF; font-weight: bold; color: #274D5F; + cursor: pointer; } .adwindow-navbtn-uns { background-color: #C4DCFB; font-weight: normal; color: #274D5F; + cursor: pointer; } .adwindow-navbtn-dis {