IDEMPIERE-181 Zk6: Fixed toolbar appearance

This commit is contained in:
Elaine Tan 2012-03-19 17:57:52 +08:00
parent 536955c281
commit 3e652da6a6
3 changed files with 7 additions and 15 deletions

View File

@ -35,7 +35,10 @@ public class ToolBarButton extends org.zkoss.zul.Toolbarbutton
public ToolBarButton() {}
@Override
public void setDisabled(boolean disabled) {
public void setDisabled(boolean disabled) {
if (disabled && isChecked())
setChecked(false); // uncheck when button is disabled
super.setDisabled(disabled);
if (disabled) {
LayoutUtils.addSclass("disableFilter", this);
@ -51,15 +54,8 @@ public class ToolBarButton extends org.zkoss.zul.Toolbarbutton
if (!getMode().equals("toggle"))
setMode("toggle");
if (!isDisabled()) {
// if (pressed) {
// LayoutUtils.addSclass("depressed", this);
// } else {
// if (this.getSclass() != null && this.getSclass().indexOf("depressed") >= 0)
// this.setSclass(this.getSclass().replace("depressed", ""));
// }
if (!isDisabled())
setChecked(pressed);
}
}
// Elaine 2008/12/09

View File

@ -1288,12 +1288,11 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
}
if (canHaveAttachment)
{
toolbar.getButton("Attachment").setPressed(curTab.hasAttachment());
toolbar.enableAttachment(true);
toolbar.getButton("Attachment").setPressed(curTab.hasAttachment());
}
else
{
toolbar.getButton("Attachment").setPressed(false);
toolbar.enableAttachment(false);
}
@ -1505,7 +1504,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
else
{
curTab.dataIgnore();
curTab.dataRefresh(false);
curTab.dataRefresh(true); // update statusbar & toolbar
curTabpanel.dynamicDisplay(0);
toolbar.enableIgnore(false);
}

View File

@ -132,12 +132,9 @@ html,body {
}
.depressed img {
/* border-style: inset;*/
border-width: 1px;
border-color: #9CBDFF;
background-color: #C4DCFB;
/* -moz-border-radius: 5px;
-webkit-border-radius: 5px;*/
padding: 0px 1px 0px 1px;
}