diff options
author | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-02-07 13:42:14 +0000 |
---|---|---|
committer | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-02-07 13:42:14 +0000 |
commit | 09d5540fe2c2919b4e5baad39f14d05ee6ee2fd1 (patch) | |
tree | 2ea9fb40eef796f20b207a64d18b5b9c06fc0333 | |
parent | 82cc2fab755ccde9b3d1a6943f0ea86d32050355 (diff) | |
download | vaadin-framework-09d5540fe2c2919b4e5baad39f14d05ee6ee2fd1.tar.gz vaadin-framework-09d5540fe2c2919b4e5baad39f14d05ee6ee2fd1.zip |
#6304 Moved display css rule to the base theme allowing it to be overridden
svn changeset:17187/svn branch:6.5
-rw-r--r-- | WebContent/VAADIN/themes/base/embedded/embedded.css | 5 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/base/styles.css | 10 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/liferay/styles.css | 10 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/reindeer/styles.css | 10 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/runo/styles.css | 10 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java | 8 |
6 files changed, 41 insertions, 12 deletions
diff --git a/WebContent/VAADIN/themes/base/embedded/embedded.css b/WebContent/VAADIN/themes/base/embedded/embedded.css new file mode 100644 index 0000000000..eea5937e59 --- /dev/null +++ b/WebContent/VAADIN/themes/base/embedded/embedded.css @@ -0,0 +1,5 @@ + +.v-table .v-embedded-image { + /* make embeddeds be centered in centered table cells. */ + display: inline-block; +}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/styles.css b/WebContent/VAADIN/themes/base/styles.css index 5a79b7bb2a..6ef3833ce1 100644 --- a/WebContent/VAADIN/themes/base/styles.css +++ b/WebContent/VAADIN/themes/base/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101221";} -.v-theme-version-6_5_0_dev-20101221 {display: none;} +.v-theme-version:after {content:"6_5_1_dev-20110207";} +.v-theme-version-6_5_1_dev-20110207 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -737,6 +737,12 @@ div.v-app-loading { display: none; } + +.v-table .v-embedded-image { + /* make embeddeds be centered in centered table cells. */ + display: inline-block; +} + .v-formlayout-cell .v-errorindicator { display: block; } diff --git a/WebContent/VAADIN/themes/liferay/styles.css b/WebContent/VAADIN/themes/liferay/styles.css index 3bf5638607..5e52105283 100644 --- a/WebContent/VAADIN/themes/liferay/styles.css +++ b/WebContent/VAADIN/themes/liferay/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101221";} -.v-theme-version-6_5_0_dev-20101221 {display: none;} +.v-theme-version:after {content:"6_5_1_dev-20110207";} +.v-theme-version-6_5_1_dev-20110207 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -737,6 +737,12 @@ div.v-app-loading { display: none; } + +.v-table .v-embedded-image { + /* make embeddeds be centered in centered table cells. */ + display: inline-block; +} + .v-formlayout-cell .v-errorindicator { display: block; } diff --git a/WebContent/VAADIN/themes/reindeer/styles.css b/WebContent/VAADIN/themes/reindeer/styles.css index a7ca843133..f82d5574fb 100644 --- a/WebContent/VAADIN/themes/reindeer/styles.css +++ b/WebContent/VAADIN/themes/reindeer/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101230";} -.v-theme-version-6_5_0_dev-20101230 {display: none;} +.v-theme-version:after {content:"6_5_1_dev-20110207";} +.v-theme-version-6_5_1_dev-20110207 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -737,6 +737,12 @@ div.v-app-loading { display: none; } + +.v-table .v-embedded-image { + /* make embeddeds be centered in centered table cells. */ + display: inline-block; +} + .v-formlayout-cell .v-errorindicator { display: block; } diff --git a/WebContent/VAADIN/themes/runo/styles.css b/WebContent/VAADIN/themes/runo/styles.css index 64c0c11b68..47c496d62c 100644 --- a/WebContent/VAADIN/themes/runo/styles.css +++ b/WebContent/VAADIN/themes/runo/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101221";} -.v-theme-version-6_5_0_dev-20101221 {display: none;} +.v-theme-version:after {content:"6_5_1_dev-20110207";} +.v-theme-version-6_5_1_dev-20110207 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -737,6 +737,12 @@ div.v-app-loading { display: none; } + +.v-table .v-embedded-image { + /* make embeddeds be centered in centered table cells. */ + display: inline-block; +} + .v-formlayout-cell .v-errorindicator { display: block; } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java index 6f966e2775..f1d61029d4 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java @@ -13,7 +13,6 @@ import com.google.gwt.dom.client.Node; import com.google.gwt.dom.client.NodeList; import com.google.gwt.dom.client.ObjectElement; import com.google.gwt.dom.client.Style; -import com.google.gwt.dom.client.Style.Display; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.DomEvent.Type; import com.google.gwt.event.shared.EventHandler; @@ -71,6 +70,7 @@ public class VEmbedded extends HTML implements Paintable { if (uidl.hasAttribute("type")) { type = uidl.getStringAttribute("type"); if (type.equals("image")) { + addStyleName(CLASSNAME + "-image"); Element el = null; boolean created = false; NodeList<Node> nodes = getElement().getChildNodes(); @@ -119,6 +119,7 @@ public class VEmbedded extends HTML implements Paintable { sinkEvents(VTooltip.TOOLTIP_EVENTS); } else if (type.equals("browser")) { + addStyleName(CLASSNAME + "-browser"); if (browserElement == null) { setHTML("<iframe width=\"100%\" height=\"100%\" frameborder=\"0\" allowTransparency=\"true\" src=\"" + getSrc(uidl, client) @@ -136,6 +137,7 @@ public class VEmbedded extends HTML implements Paintable { } else if (uidl.hasAttribute("mimetype")) { final String mime = uidl.getStringAttribute("mimetype"); if (mime.equals("application/x-shockwave-flash")) { + addStyleName(CLASSNAME + "-flash"); String html = "<object " + "type=\"application/x-shockwave-flash\" " + "width=\"" + width + "\" height=\"" + height + "\">"; @@ -165,6 +167,7 @@ public class VEmbedded extends HTML implements Paintable { html += "></embed></object>"; setHTML(html); } else if (mime.equals("image/svg+xml")) { + addStyleName(CLASSNAME + "-svg"); String data; Map<String, String> parameters = getParameters(uidl); if (parameters.get("data") == null) { @@ -308,9 +311,6 @@ public class VEmbedded extends HTML implements Paintable { super.onBrowserEvent(event); if (DOM.eventGetType(event) == Event.ONLOAD) { if ("image".equals(type)) { - // display: inline-block in order for embeddeds to be centered - // in centered table columns. - getElement().getStyle().setDisplay(Display.INLINE_BLOCK); updateElementDynamicSizeFromImage(); } Util.notifyParentOfSizeChange(this, true); |