From ff40fbdbe0d011f22d85500ff37bade059285b2b Mon Sep 17 00:00:00 2001 From: Joonas Lehtinen Date: Thu, 3 Jul 2008 08:12:07 +0000 Subject: [PATCH] Fixes #1893 Tabsheet broken in IE svn changeset:5011/svn branch:trunk --- .../ITMILL/themes/default/caption/caption.css | 34 ++------- .../default/orderedlayout/orderedlayout.css | 40 ++++++++++- WebContent/ITMILL/themes/default/styles.css | 72 +++++++++++-------- .../gwt/client/ui/IOrderedLayout.java | 25 ++++--- 4 files changed, 104 insertions(+), 67 deletions(-) diff --git a/WebContent/ITMILL/themes/default/caption/caption.css b/WebContent/ITMILL/themes/default/caption/caption.css index 627b79fc70..36b464b678 100644 --- a/WebContent/ITMILL/themes/default/caption/caption.css +++ b/WebContent/ITMILL/themes/default/caption/caption.css @@ -6,36 +6,12 @@ text-align: left /* Force default alignment */ } -.i-caption * { - float:left; - display: block; -} -.i-orderedlayout-wrap-e { - float:left; -} - -.i-caption:after, .i-orderedlayout-wrap:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} - -.i-caption, .i-orderedlayout-wrap { - display: inline-block; -} - -/* Hides from IE-mac \*/ -* html .i-caption, * html .i-orderedlayout-wrap { height: 1%; } -.i-caption, .i-orderedlayout-wrap { display: block; } -/* End hide from IE-mac */ - .i-errorindicator { - background:transparent url(../icons/16/error.png) no-repeat scroll right top; - height:16px; - width:10px; - margin-left: 3px; + width: 10px; + height: 16px; + padding-right:13px; + display: inline; + background: transparent url(../icons/16/error.png) no-repeat top right; } * html .i-errorindicator { diff --git a/WebContent/ITMILL/themes/default/orderedlayout/orderedlayout.css b/WebContent/ITMILL/themes/default/orderedlayout/orderedlayout.css index 1a429b2af0..591f379e5f 100644 --- a/WebContent/ITMILL/themes/default/orderedlayout/orderedlayout.css +++ b/WebContent/ITMILL/themes/default/orderedlayout/orderedlayout.css @@ -16,4 +16,42 @@ } .i-orderedlayout-hspacing { padding-left: 8px; -} \ No newline at end of file +} + +.i-orderedlayout-w2 .i-caption * { + float:left; + display: block; +} +.i-orderedlayout-w-e { + float:left; +} + +.i-orderedlayout-w1 { + text-align:left; +} + +.i-orderedlayout-w2 .i-caption:after, .i-orderedlayout-w2:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.i-orderedlayout-w2 .i-caption, .i-orderedlayout-w2 { + display: inline-block; +} + +/* Hides from IE-mac \*/ +* html .i-orderedlayout-w2 .i-caption, * html .i-orderedlayout-w2 { height: 1%; } +.i-orderedlayout-w2 .i-caption, .i-orderedlayout-w2 { display: block; } +/* End hide from IE-mac */ + +/* +.i-errorindicator { + background:transparent url(../icons/16/error.png) no-repeat scroll right top; + height:16px; + width:10px; + margin-left: 3px; +} +*/ \ No newline at end of file diff --git a/WebContent/ITMILL/themes/default/styles.css b/WebContent/ITMILL/themes/default/styles.css index ae3eac6632..f19394780a 100644 --- a/WebContent/ITMILL/themes/default/styles.css +++ b/WebContent/ITMILL/themes/default/styles.css @@ -91,36 +91,12 @@ text-align: left /* Force default alignment */ } -.i-caption * { - float:left; - display: block; -} -.i-orderedlayout-wrap-e { - float:left; -} - -.i-caption:after, .i-orderedlayout-wrap:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} - -.i-caption, .i-orderedlayout-wrap { - display: inline-block; -} - -/* Hides from IE-mac \*/ -* html .i-caption, * html .i-orderedlayout-wrap { height: 1%; } -.i-caption, .i-orderedlayout-wrap { display: block; } -/* End hide from IE-mac */ - .i-errorindicator { - background:transparent url(icons/16/error.png) no-repeat scroll right top; - height:16px; - width:10px; - margin-left: 3px; + width: 10px; + height: 16px; + padding-right:13px; + display: inline; + background: transparent url(icons/16/error.png) no-repeat top right; } * html .i-errorindicator { @@ -724,6 +700,44 @@ input.i-modified, .i-orderedlayout-hspacing { padding-left: 8px; } + +.i-orderedlayout-w2 .i-caption * { + float:left; + display: block; +} +.i-orderedlayout-w-e { + float:left; +} + +.i-orderedlayout-w1 { + text-align:left; +} + +.i-orderedlayout-w2 .i-caption:after, .i-orderedlayout-w2:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.i-orderedlayout-w2 .i-caption, .i-orderedlayout-w2 { + display: inline-block; +} + +/* Hides from IE-mac \*/ +* html .i-orderedlayout-w2 .i-caption, * html .i-orderedlayout-w2 { height: 1%; } +.i-orderedlayout-w2 .i-caption, .i-orderedlayout-w2 { display: block; } +/* End hide from IE-mac */ + +/* +.i-errorindicator { + background:transparent url(icons/16/error.png) no-repeat scroll right top; + height:16px; + width:10px; + margin-left: 3px; +} +*/ .i-panel, .i-panel-caption, .i-panel-content, diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java index 1dbb3e13fe..a9f196b46b 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java @@ -272,6 +272,9 @@ public abstract class IOrderedLayout extends Panel implements Container { } else { setElement(DOM.createTD()); } + DOM + .setElementAttribute(getElement(), "class", + "i-orderedlayout-w1"); } public void updateCaption(UIDL uidl, Paintable paintable) { @@ -290,8 +293,8 @@ public abstract class IOrderedLayout extends Panel implements Container { if (after) { DOM.appendChild(getElement(), captionElement); DOM.setElementAttribute(getElement(), "class", - "i-orderedlayout-wrap"); - widget.addStyleName("i-orderedlayout-wrap-e"); + "i-orderedlayout-w2"); + widget.addStyleName("i-orderedlayout-w-e"); } else { DOM.insertChild(getElement(), captionElement, 0); } @@ -304,12 +307,14 @@ public abstract class IOrderedLayout extends Panel implements Container { .getChildCount(getElement()) - 2); DOM.removeChild(getElement(), firstElement); DOM.appendChild(getElement(), firstElement); - DOM.setElementAttribute(getElement(), "class", - after ? "i-orderedlayout-wrap" : ""); + DOM + .setElementAttribute(getElement(), "class", + after ? "i-orderedlayout-w2" + : "i-orderedlayout-w1"); if (after) { - widget.addStyleName("i-orderedlayout-wrap-e"); + widget.addStyleName("i-orderedlayout-w-e"); } else { - widget.removeStyleName("i-orderedlayout-wrap-e"); + widget.removeStyleName("i-orderedlayout-w-e"); } } @@ -317,8 +322,9 @@ public abstract class IOrderedLayout extends Panel implements Container { if (caption != null) { DOM.removeChild(getElement(), caption.getElement()); caption = null; - DOM.setElementAttribute(getElement(), "class", ""); - widget.removeStyleName("i-orderedlayout-wrap-e"); + DOM.setElementAttribute(getElement(), "class", + "i-orderedlayout-w1"); + widget.removeStyleName("i-orderedlayout-w-e"); } } } @@ -379,6 +385,9 @@ public abstract class IOrderedLayout extends Panel implements Container { DOM.setStyleAttribute(table, "width", "100%"); DOM.setElementAttribute(itable, "cellpadding", "0"); DOM.setElementAttribute(itable, "cellspacing", "0"); + // TODO DOM.setStyleAttribute(itd, "align", "left"); + // TODO DEBUG DOM.setStyleAttribute(itd, "border", "1px + // solid red"); // move possible content to cell while (DOM.getChildCount(getElement()) > 0) { -- 2.39.5