From 179694408deb84f107b1ce03dd82cde8a314ce60 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Fri, 30 Jan 2009 09:53:14 +0000 Subject: [PATCH] fixes #2472, error indicators now works more consistently with checkbox svn changeset:6681/svn branch:trunk --- .../ITMILL/themes/default/button/button.css | 18 +++++++++++++++--- WebContent/ITMILL/themes/default/styles.css | 16 ++++++++++++++-- .../terminal/gwt/client/ui/ICheckBox.java | 3 +++ 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/WebContent/ITMILL/themes/default/button/button.css b/WebContent/ITMILL/themes/default/button/button.css index b1e20b0c0d..7db961b0fa 100644 --- a/WebContent/ITMILL/themes/default/button/button.css +++ b/WebContent/ITMILL/themes/default/button/button.css @@ -27,7 +27,19 @@ } .i-button-link span { text-decoration: underline; -} +} + +.i-checkbox { + white-space: nowrap; +} + +.i-checkbox .i-errorindicator { + float: none; + display:inline; + padding-left: 10px; + background-position:left; +} + /* fixes streched buttons in IE6 */ * html .i-button { @@ -46,11 +58,11 @@ /* Error indicator on checkbox fix for IE6 */ * html .i-checkbox * { display: block; float: left;} -* html .i-checkbox .i-errorindicator {padding-right:4px;} +* html .i-checkbox .i-errorindicator {background-position:right;display: block; float: left; padding-left: 0px; padding-right:4px;} /* Error indicator on checkbox fix for IE7 */ *+ html .i-checkbox * { display: block; float: left;} -*+ html .i-checkbox .i-errorindicator {padding-right:7px;} +*+ html .i-checkbox .i-errorindicator {background-position:right;display: block; float: left; padding-left: 0px;;padding-right:7px;} /* Error indicator on button fix for IE7 */ *+ html button .i-errorindicator { display:inline; padding-right:5px; } diff --git a/WebContent/ITMILL/themes/default/styles.css b/WebContent/ITMILL/themes/default/styles.css index a963d0f94e..d1b43d4fe9 100644 --- a/WebContent/ITMILL/themes/default/styles.css +++ b/WebContent/ITMILL/themes/default/styles.css @@ -77,6 +77,18 @@ text-decoration: underline; } +.i-checkbox { + white-space: nowrap; +} + +.i-checkbox .i-errorindicator { + float: none; + display:inline; + padding-left: 10px; + background-position:left; +} + + /* fixes streched buttons in IE6 */ * html .i-button { width: 1px; @@ -94,11 +106,11 @@ /* Error indicator on checkbox fix for IE6 */ * html .i-checkbox * { display: block; float: left;} -* html .i-checkbox .i-errorindicator {padding-right:4px;} +* html .i-checkbox .i-errorindicator {background-position:right;display: block; float: left; padding-left: 0px; padding-right:4px;} /* Error indicator on checkbox fix for IE7 */ *+ html .i-checkbox * { display: block; float: left;} -*+ html .i-checkbox .i-errorindicator {padding-right:7px;} +*+ html .i-checkbox .i-errorindicator {background-position:right;display: block; float: left; padding-left: 0px;;padding-right:7px;} /* Error indicator on button fix for IE7 */ *+ html button .i-errorindicator { display:inline; padding-right:5px; } diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ICheckBox.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ICheckBox.java index f5fb4842e1..104399d5d3 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ICheckBox.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ICheckBox.java @@ -66,9 +66,12 @@ public class ICheckBox extends com.google.gwt.user.client.ui.CheckBox implements if (uidl.hasAttribute("error")) { if (errorIndicatorElement == null) { errorIndicatorElement = DOM.createDiv(); + errorIndicatorElement.setInnerHTML(" "); DOM.setElementProperty(errorIndicatorElement, "className", "i-errorindicator"); DOM.appendChild(getElement(), errorIndicatorElement); + DOM.sinkEvents(errorIndicatorElement, ITooltip.TOOLTIP_EVENTS + | Event.ONCLICK); } } else if (errorIndicatorElement != null) { DOM.setStyleAttribute(errorIndicatorElement, "display", "none"); -- 2.39.5