]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #2427, disabling link component
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 8 Jan 2009 08:17:28 +0000 (08:17 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 8 Jan 2009 08:17:28 +0000 (08:17 +0000)
svn changeset:6442/svn branch:trunk

WebContent/ITMILL/themes/default/common/common.css
WebContent/ITMILL/themes/default/styles.css
src/com/itmill/toolkit/terminal/gwt/client/ui/ILink.java

index 7d6f0d8cc0e14f7100e3df0a5a4db64062e7fd38..c8266a59dad0170c2fc814fd958e9e90dfd199b1 100644 (file)
@@ -214,6 +214,10 @@ input.i-modified,
        vertical-align: middle;
 }
 
+.i-disabled a {
+       cursor: default;
+}
+
 .i-link img {
        vertical-align: middle;
 }
index cb20c81a5cf6ff79fa0457be34581662614dc86e..2bf27bcf4a075bd14f18654edff01dd83001cc37 100644 (file)
@@ -382,6 +382,12 @@ input.i-modified,
        vertical-align: middle;
 }
 
+.i-disabled a {
+       cursor: default;
+}
+
+
+
 .i-link img {
        vertical-align: middle;
 }
index 4e5f5ee34c58f89c9d5a94eb8464a45c5c318959..016e7c4aedf7ccf99fbb91f525935b2aca5198e0 100644 (file)
@@ -97,7 +97,6 @@ public class ILink extends HTML implements Paintable, ClickListener {
 
         // handle error
         if (uidl.hasAttribute("error")) {
-            final UIDL errorUidl = uidl.getErrors();
             if (errorIndicatorElement == null) {
                 errorIndicatorElement = DOM.createDiv();
                 DOM.setElementProperty(errorIndicatorElement, "className",
@@ -167,10 +166,14 @@ public class ILink extends HTML implements Paintable, ClickListener {
         if (client != null) {
             client.handleTooltipEvent(event, this);
         }
-        if (DOM.compare(target, captionElement)
-                || (icon != null && DOM.compare(target, icon.getElement()))) {
+        if (target == captionElement
+                || (icon != null && target == icon.getElement())) {
             super.onBrowserEvent(event);
         }
+        if (!enabled) {
+            event.preventDefault();
+        }
+
     }
 
 }