]> source.dussan.org Git - vaadin-framework.git/commitdiff
Readonly -style was not applied as expected. (Re)Fixes #1758
authorMarc Englund <marc.englund@itmill.com>
Wed, 11 Jun 2008 13:26:01 +0000 (13:26 +0000)
committerMarc Englund <marc.englund@itmill.com>
Wed, 11 Jun 2008 13:26:01 +0000 (13:26 +0000)
svn changeset:4859/svn branch:trunk

WebContent/ITMILL/themes/default/select/select.css
WebContent/ITMILL/themes/default/styles.css
src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java
src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java

index c0a64604d87bbc76ea10a0f4d5fd16307d5790fb..41f0ada568941280c2839b0be1415a90e653d73c 100644 (file)
 .i-filterselect-button:hover {
        background-position: bottom left;
 }
-.i-disabled .i-filterselect-button:hover {
+.i-disabled .i-filterselect-button:hover,
+.i-readonly .i-filterselect-button:hover {
        background-position: top left;
 }
 
index 85397ac5a67ef1a5adf9bee8d9c0716f4a6a6758..91de640f06ff4ef1fb2be7815d46700781a8b552 100644 (file)
@@ -999,7 +999,8 @@ input.i-modified,
 .i-filterselect-button:hover {
        background-position: bottom left;
 }
-.i-disabled .i-filterselect-button:hover {
+.i-disabled .i-filterselect-button:hover,
+.i-readonly .i-filterselect-button:hover {
        background-position: top left;
 }
 
index d0f2a631ee0c38b5dce0a2a3de54761ab111837e..835d89ad65f90df3d0d307266ca6d435e9ea7d4b 100755 (executable)
@@ -776,6 +776,10 @@ public class ApplicationConnection {
             styleBuf.append(" ");
             styleBuf.append("i-disabled");
         }
+        if (uidl.getBooleanAttribute("readonly")) {
+            styleBuf.append(" ");
+            styleBuf.append("i-readonly");
+        }
 
         // add additional styles as css classes, prefixed with component default
         // stylename
index 7f2ec7aa3369762fa735f9d106981abb1ec96d20..05c05b7f351163074f7effda1398dd7deff90d94 100644 (file)
@@ -526,7 +526,10 @@ public class IFilterSelect extends Composite implements Paintable, Field,
         paintableId = uidl.getId();
         this.client = client;
 
-        if (uidl.hasAttribute("disabled") || uidl.hasAttribute("readonly")) {
+        boolean readonly = uidl.hasAttribute("readonly");
+        boolean disabled = uidl.hasAttribute("disabled");
+
+        if (disabled || readonly) {
             tb.setEnabled(false);
             enabled = false;
         } else {