summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-08-31 14:29:15 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-08-31 14:29:15 +0000
commit3654c39d454df933413331765b1314f5f9e8c138 (patch)
treec93b6488c1495e2db25242fc9bb236549ab97b05
parent140abecfdfa1d6bf4af4c2f0860bf9eee4c00066 (diff)
downloadvaadin-framework-3654c39d454df933413331765b1314f5f9e8c138.tar.gz
vaadin-framework-3654c39d454df933413331765b1314f5f9e8c138.zip
fixes #3955, an element used by VCaption now styled in base theme instead of hardcoded in gwt code
svn changeset:14674/svn branch:6.4
-rw-r--r--WebContent/VAADIN/themes/base/caption/caption.css7
-rw-r--r--WebContent/VAADIN/themes/base/styles.css8
-rw-r--r--WebContent/VAADIN/themes/reindeer/styles.css8
-rw-r--r--WebContent/VAADIN/themes/runo/styles.css8
-rw-r--r--src/com/vaadin/terminal/gwt/client/VCaption.java11
5 files changed, 36 insertions, 6 deletions
diff --git a/WebContent/VAADIN/themes/base/caption/caption.css b/WebContent/VAADIN/themes/base/caption/caption.css
index 32a77eed08..076f0f08aa 100644
--- a/WebContent/VAADIN/themes/base/caption/caption.css
+++ b/WebContent/VAADIN/themes/base/caption/caption.css
@@ -22,6 +22,13 @@
float: left;
}
+.v-caption-clearelem {
+ clear: both;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
/* Fix IE6 "double-float-margin-bug" */
.v-ie6 .v-errorindicator,
.v-ie6 .v-icon,
diff --git a/WebContent/VAADIN/themes/base/styles.css b/WebContent/VAADIN/themes/base/styles.css
index 8f5741a78d..348af9e613 100644
--- a/WebContent/VAADIN/themes/base/styles.css
+++ b/WebContent/VAADIN/themes/base/styles.css
@@ -228,6 +228,14 @@
float: left;
}
+.v-caption-clearelem {
+ clear: both;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
+
/* Fix IE6 "double-float-margin-bug" */
.v-ie6 .v-errorindicator,
.v-ie6 .v-icon,
diff --git a/WebContent/VAADIN/themes/reindeer/styles.css b/WebContent/VAADIN/themes/reindeer/styles.css
index 241a253903..0293c371e2 100644
--- a/WebContent/VAADIN/themes/reindeer/styles.css
+++ b/WebContent/VAADIN/themes/reindeer/styles.css
@@ -228,6 +228,14 @@
float: left;
}
+.v-caption-clearelem {
+ clear: both;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
+
/* Fix IE6 "double-float-margin-bug" */
.v-ie6 .v-errorindicator,
.v-ie6 .v-icon,
diff --git a/WebContent/VAADIN/themes/runo/styles.css b/WebContent/VAADIN/themes/runo/styles.css
index 1a4304755d..248b2a68c8 100644
--- a/WebContent/VAADIN/themes/runo/styles.css
+++ b/WebContent/VAADIN/themes/runo/styles.css
@@ -228,6 +228,14 @@
float: left;
}
+.v-caption-clearelem {
+ clear: both;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
+
/* Fix IE6 "double-float-margin-bug" */
.v-ie6 .v-errorindicator,
.v-ie6 .v-icon,
diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java
index 25c1d34ea4..a8a694b9eb 100644
--- a/src/com/vaadin/terminal/gwt/client/VCaption.java
+++ b/src/com/vaadin/terminal/gwt/client/VCaption.java
@@ -40,6 +40,8 @@ public class VCaption extends HTML {
protected static final String ATTRIBUTE_ERROR = "error";
protected static final String ATTRIBUTE_HIDEERRORS = "hideErrors";
+ private static final String CLASSNAME_CLEAR = CLASSNAME + "-clearelem";
+
/**
*
* @param component
@@ -192,17 +194,14 @@ public class VCaption extends HTML {
}
} else if (errorIndicatorElement != null) {
// Remove existing
- DOM.removeChild(getElement(), errorIndicatorElement);
+ getElement().removeChild(errorIndicatorElement);
errorIndicatorElement = null;
}
if (clearElement == null) {
clearElement = DOM.createDiv();
- DOM.setStyleAttribute(clearElement, "clear", "both");
- DOM.setStyleAttribute(clearElement, "width", "0");
- DOM.setStyleAttribute(clearElement, "height", "0");
- DOM.setStyleAttribute(clearElement, "overflow", "hidden");
- DOM.appendChild(getElement(), clearElement);
+ clearElement.setClassName(CLASSNAME_CLEAR);
+ getElement().appendChild(clearElement);
}
return (wasPlacedAfterComponent != placedAfterComponent);