From: Joonas Lehtinen Date: Mon, 19 May 2008 12:58:58 +0000 (+0000) Subject: Moving error indicator to right side of a caption X-Git-Tag: 6.7.0.beta1~4737 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8260ece020c439439922bc7f98dc750432316a2c;p=vaadin-framework.git Moving error indicator to right side of a caption svn changeset:4552/svn branch:trunk --- diff --git a/WebContent/ITMILL/themes/default/caption/caption.css b/WebContent/ITMILL/themes/default/caption/caption.css index 1f2e452675..629967ba1c 100644 --- a/WebContent/ITMILL/themes/default/caption/caption.css +++ b/WebContent/ITMILL/themes/default/caption/caption.css @@ -9,10 +9,9 @@ .i-errorindicator { width: 10px; height: 16px; - padding-right:2px; - display: block; - float:left; - background: transparent url(../icons/16/error.png) no-repeat; + padding-right:13px; + display: inline; + background: transparent url(icons/16/error.png) no-repeat top right; vertical-align: middle; } diff --git a/src/com/itmill/toolkit/terminal/gwt/client/Caption.java b/src/com/itmill/toolkit/terminal/gwt/client/Caption.java index 1ffd59f4db..d68eeaba8a 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/Caption.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/Caption.java @@ -57,7 +57,7 @@ public class Caption extends HTML { errorIndicatorElement = DOM.createDiv(); DOM.setElementProperty(errorIndicatorElement, "className", "i-errorindicator"); - DOM.insertChild(getElement(), errorIndicatorElement, 0); + DOM.appendChild(getElement(), errorIndicatorElement); } if (errorMessage == null) { errorMessage = new ErrorMessage(); @@ -73,7 +73,7 @@ public class Caption extends HTML { if (icon == null) { icon = new Icon(client); - DOM.appendChild(getElement(), icon.getElement()); + DOM.insertChild(getElement(), icon.getElement(), 0); } icon.setUri(uidl.getStringAttribute("icon")); isEmpty = false; @@ -88,7 +88,9 @@ public class Caption extends HTML { if (uidl.hasAttribute("caption")) { if (captionText == null) { captionText = DOM.createSpan(); - DOM.appendChild(getElement(), captionText); + DOM + .insertChild(getElement(), captionText, + icon == null ? 0 : 1); } String c = uidl.getStringAttribute("caption"); if (c == null) {