diff options
author | Leif Åstrand <leif@vaadin.com> | 2011-09-27 09:07:10 +0000 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2011-09-27 09:07:10 +0000 |
commit | b112e78d96dd343095f6322a9923da726851b233 (patch) | |
tree | d38470b145ec107bc2342937de660fb0aed05651 | |
parent | 7c495115e89952d770948a501e7da58d2c6d8fc0 (diff) | |
download | vaadin-framework-b112e78d96dd343095f6322a9923da726851b233.tar.gz vaadin-framework-b112e78d96dd343095f6322a9923da726851b233.zip |
#5170 updated to use an additional css class when text input is disabled and set the cursor using the theme css file
svn changeset:21329/svn branch:6.7
-rw-r--r-- | WebContent/VAADIN/themes/base/select/select.css | 4 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/WebContent/VAADIN/themes/base/select/select.css b/WebContent/VAADIN/themes/base/select/select.css index 3c515b8c52..4487bc6a4e 100644 --- a/WebContent/VAADIN/themes/base/select/select.css +++ b/WebContent/VAADIN/themes/base/select/select.css @@ -132,6 +132,10 @@ text-align: center; } +.v-filterselect-no-input .v-filterselect-input { + cursor: default; +} + /* Error styles (disabled by default) .v-filterselect-error .v-filterselect-input, diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java index 2033f9708c..0b052ee091 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java @@ -12,7 +12,6 @@ import java.util.List; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; -import com.google.gwt.dom.client.Style.Cursor; import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; @@ -745,6 +744,7 @@ public class VFilterSelect extends Composite implements Paintable, Field, public static final int FILTERINGMODE_CONTAINS = 2; private static final String CLASSNAME = "v-filterselect"; + private static final String STYLE_NO_INPUT = "no-input"; protected int pageLength = 10; @@ -1176,18 +1176,19 @@ public class VFilterSelect extends Composite implements Paintable, Field, } private void setTextInputEnabled(boolean textInputEnabled) { + // Always update styles as they might have been overwritten + if (textInputEnabled) { + removeStyleDependentName(STYLE_NO_INPUT); + } else { + addStyleDependentName(STYLE_NO_INPUT); + } + if (this.textInputEnabled == textInputEnabled) { return; } this.textInputEnabled = textInputEnabled; updateReadOnly(); - - if (textInputEnabled) { - tb.getElement().getStyle().clearCursor(); - } else { - tb.getElement().getStyle().setCursor(Cursor.DEFAULT); - } } /** |