IDEMPIERE-3232 Useless to set focus on a readonly field

This commit is contained in:
Carlos Ruiz 2020-02-13 01:03:17 +01:00
parent 15707d9aac
commit e456d65aed
4 changed files with 19 additions and 2 deletions

View File

@ -42,6 +42,7 @@ public class Datebox extends org.zkoss.zul.Datebox
public void setEnabled(boolean enabled)
{
this.setReadonly(!enabled);
this.setDisabled(!enabled);
this.setButtonVisible(enabled);
}

View File

@ -460,6 +460,7 @@ public class NumberBox extends Div
public void setEnabled(boolean enabled)
{
decimalBox.setReadonly(!enabled);
decimalBox.setDisabled(!enabled);
btn.setEnabled(enabled);
if (enabled)
{

View File

@ -57,7 +57,13 @@ public class Textbox extends org.zkoss.zul.Textbox implements EventListener<Even
{
this.setDisabled(!enabled);
}
@Override
public void setReadonly(boolean readonly) {
super.setReadonly(readonly);
this.setDisabled(readonly);
}
public void setObscureType(String obscureType)
{
if (obscureType != null && obscureType.length() > 0)

View File

@ -1,5 +1,5 @@
<%-- Combobox --%>
.z-combobox-disabled {
.z-combobox-disabled, .z-combobox[disabled] {
color: black !important; cursor: default !important; opacity: 1; -moz-opacity: 1; -khtml-opacity: 1; filter: alpha(opacity=100);
}
@ -26,6 +26,15 @@ input:focus, textarea:focus, .z-combobox-input:focus, z-datebox-input:focus {
background-color: #F0F0F0;
}
.z-textbox[disabled], .z-intbox[disabled], .z-longbox[disabled], .z-doublebox[disabled],
.z-decimalbox[disabled], .z-datebox[disabled], .z-timebox[disabled] {
color: black !important;
background-color: #F0F0F0 !important;
cursor: default !important;
opacity: 1 !important;
border: 1px solid #cfcfcf !important;
}
<%-- workaround for http://jira.idempiere.com/browse/IDEMPIERE-692 --%>
.z-combobox-popup {
max-height: 200px;