From: Jouni Koivuviita Date: Fri, 26 Oct 2007 12:30:59 +0000 (+0000) Subject: -Small fix to window styles (IE). X-Git-Tag: 6.7.0.beta1~5774 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8cd8853dfcd4a085bbe014d4879186a582e5b84a;p=vaadin-framework.git -Small fix to window styles (IE). -Panel height calculation refined, now it won't add the extragenous style attribute to the outmost DOM element. svn changeset:2601/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java index 63d8d4ff66..3c1a877dfe 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java @@ -57,7 +57,6 @@ public class IPanel extends SimplePanel implements Paintable, height = uidl.hasVariable("height") ? uidl.getStringVariable("height") : null; setWidth(w != null ? w : ""); - setHeight(height != null ? height : ""); // TODO optimize: if only the caption has changed, don't re-render whole // content @@ -107,10 +106,9 @@ public class IPanel extends SimplePanel implements Paintable, } public void iLayout() { - // In this case we need to fix containers height properly if (height != null && height != "") { // need to fix containers height properly - + DOM.setStyleAttribute(getElement(), "height", height); boolean hasChildren = getWidget() != null; Element contentEl = null; String origPositioning = null; @@ -137,8 +135,9 @@ public class IPanel extends SimplePanel implements Paintable, DOM.setStyleAttribute(contentEl, "position", origPositioning); } DOM.setStyleAttribute(contentNode, "overflow", "auto"); + DOM.setStyleAttribute(getElement(), "height", ""); } else { - DOM.setStyleAttribute(contentNode, "overflow", "hidden"); + DOM.setStyleAttribute(contentNode, "height", ""); } Util.runAncestorsLayout(this); } diff --git a/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css b/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css index 35dbb01e89..254faf3084 100644 --- a/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css +++ b/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css @@ -1,190 +1,196 @@ -.i-panel, -.i-panel-caption, -.i-panel-content, -.i-panel-deco, -.i-panel-light, -.i-panel-light-caption, -.i-panel-light-content, -.i-panel-light-deco { - outline: none; /* Prevent selection outline which might break layouts or cause scrollbars */ -} - -.i-panel:before { - display: block; - content: ""; - background: transparent url(img/top-right.png) repeat-x right top; - height: 9px; - margin-left: 9px; -} - -.i-panel-caption, -.i-panel-light-caption { - font-size: 18px; - line-height: 18px; - font-weight: normal; - letter-spacing: -0.03em; - color: #f14c1a; - white-space: nowrap; - height: 18px; - padding: 6px 18px 14px 18px; - border: 1px solid #babfc0; - border-top: none; - background: #fff; -} - -.i-panel-nocaption { - height: 9px; -} - -.i-panel-caption:before, -.i-panel-nocaption:before { - display: block; - content: ""; - position: relative; - width: 9px; - height: 9px; - background: transparent url(img/top-left.png) no-repeat; - margin: -15px 0 5px -19px; -} - -.i-panel-nocaption:before { - margin: -9px 0 0 0; -} - -.i-panel-content { - border: 1px solid #babfc0; - border-top: none; - border-bottom: none; - background-color: #fff; - overflow: auto; - padding: 15px 18px 6px 18px; -} - -.i-panel-deco { - height: 9px; - background: transparent url(img/bottom-right.png) repeat-x right top; - margin-left: 9px; -} - -.i-panel-deco:before { - display: block; - content: ""; - width: 9px; - height: 9px; - margin-left: -9px; - background: transparent url(img/bottom-left.png) no-repeat; -} - - - - - - -/* Light panel style */ - -.i-panel-light:before { - display: none; -} - -.i-panel-caption-light { - border-left: none; - border-right: none; - background: transparent; - padding-top: 14px; -} - -.i-panel-caption-light:before, -.i-panel-nocaption-light:before { - display: none; -} - -.i-panel-content-light { - border: none; - background: transparent; - padding: 15px 18px; -} - -.i-panel-deco-light { - height: 0; - overflow: hidden; -} - - - -/* Panel without padding (NO_PADDING style) */ - -.i-panel-content-nopad { - padding: 0; -} - - - - - -/* Light panel contained within another panel or a tabsheet */ -/* Use more precise selector to override IE specific rules automatically */ - -.i-panel .i-panel-caption-light, -.i-tabsheet .i-panel-caption-light { - margin-top: -1px; - padding-top: 14px; - border-top: 1px solid #babfc0; -} - - - - - -/* IE specific rules (different selectors for IE6 and IE7. - * These selectors must be separate because IE6 won't - * apply them if they are grouped together. -*/ -* html .i-panel-caption { - border: 1px solid #babfc0; - padding-top: 14px; -} -*+html .i-panel-caption { - border: 1px solid #babfc0; - padding-top: 14px; -} - -* html .i-panel-caption-light { - border-left: none; - border-right: none; -} -*+html .i-panel-caption-light { - border-left: none; - border-right: none; -} - -* html .i-panel-content { - border-bottom: 1px solid #babfc0; - padding: 15px 18px; -} -*+html .i-panel-content { - border-bottom: 1px solid #babfc0; - padding: 15px 18px; -} - -* html .i-panel-deco { - display: none; -} -*+html .i-panel-deco { - display: none; -} - -/* Without caption */ -* html .i-panel-nocaption { - height: 1px; - overflow: hidden; - background: #c1c6cc; - border: none; -} - -/* Without padding */ -* html .i-panel-content-nopad { - padding: 0; -} -*+html .i-panel-content-nopad { - padding: 0; +.i-panel, +.i-panel-caption, +.i-panel-content, +.i-panel-deco, +.i-panel-light, +.i-panel-light-caption, +.i-panel-light-content, +.i-panel-light-deco { + outline: none; /* Prevent selection outline which might break layouts or cause scrollbars */ +} + +.i-panel:before { + display: block; + content: ""; + background: transparent url(img/top-right.png) repeat-x right top; + height: 9px; + margin-left: 9px; +} + +.i-panel-caption, +.i-panel-light-caption { + font-size: 18px; + line-height: 18px; + font-weight: normal; + letter-spacing: -0.03em; + color: #f14c1a; + white-space: nowrap; + height: 18px; + padding: 6px 18px 14px 18px; + border: 1px solid #babfc0; + border-top: none; + background: #fff; +} + +.i-panel-nocaption { + height: 9px; +} + +.i-panel-caption:before, +.i-panel-nocaption:before { + display: block; + content: ""; + position: relative; + width: 9px; + height: 9px; + background: transparent url(img/top-left.png) no-repeat; + margin: -15px 0 5px -19px; +} + +.i-panel-nocaption:before { + margin: -9px 0 0 0; +} + +.i-panel-content { + border: 1px solid #babfc0; + border-top: none; + border-bottom: none; + background-color: #fff; + overflow: auto; + padding: 15px 18px 6px 18px; +} + +.i-panel-deco { + height: 9px; + background: transparent url(img/bottom-right.png) repeat-x right top; + margin-left: 9px; +} + +.i-panel-deco:before { + display: block; + content: ""; + width: 9px; + height: 9px; + margin-left: -9px; + background: transparent url(img/bottom-left.png) no-repeat; +} + + + + + + +/* Light panel style */ + +.i-panel-light:before { + display: none; +} + +.i-panel-caption-light { + border-left: none; + border-right: none; + background: transparent; + padding-top: 14px; +} + +.i-panel-caption-light:before, +.i-panel-nocaption-light:before { + display: none; +} + +.i-panel-content-light { + border: none; + background: transparent; + padding: 15px 18px; +} + +.i-panel-deco-light { + height: 0; + overflow: hidden; +} + + + +/* Panel without padding (NO_PADDING style) */ + +.i-panel-content-nopad { + padding: 0; +} + + + + + +/* Light panel contained within another panel or a tabsheet */ +/* Use more precise selector to override IE specific rules automatically */ + +.i-panel .i-panel-caption-light, +.i-tabsheet .i-panel-caption-light { + margin-top: -1px; + padding-top: 14px; + border-top: 1px solid #babfc0; +} + + + + + +/* IE specific rules (different selectors for IE6 and IE7. + * These selectors must be separate because IE6 won't + * apply them if they are grouped together. +*/ +* html .i-panel-caption { + border: 1px solid #babfc0; + padding-top: 14px; +} +*+html .i-panel-caption { + border: 1px solid #babfc0; + padding-top: 14px; +} + +* html .i-panel-caption-light { + border-left: none; + border-right: none; +} +*+html .i-panel-caption-light { + border-left: none; + border-right: none; +} + +* html .i-panel-content { + border-bottom: 1px solid #babfc0; + padding: 15px 18px; +} +*+html .i-panel-content { + border-bottom: 1px solid #babfc0; + padding: 15px 18px; +} + +* html .i-panel-deco { + display: none; +} +*+html .i-panel-deco { + display: none; +} + +/* Without caption */ +* html .i-panel-nocaption { + height: 1px; + overflow: hidden; + background: #c1c6cc; + border: none; +} +*+html .i-panel-nocaption { + height: 1px; + overflow: hidden; + background: #c1c6cc; + border: none; +} + +/* Without padding */ +* html .i-panel-content-nopad { + padding: 0; +} +*+html .i-panel-content-nopad { + padding: 0; } \ No newline at end of file diff --git a/src/com/itmill/toolkit/terminal/gwt/public/default/window/window.css b/src/com/itmill/toolkit/terminal/gwt/public/default/window/window.css index 9eb46b847a..b42e149878 100644 --- a/src/com/itmill/toolkit/terminal/gwt/public/default/window/window.css +++ b/src/com/itmill/toolkit/terminal/gwt/public/default/window/window.css @@ -129,6 +129,13 @@ background: #fff; } +* html .i-window-footer { + margin-bottom: 0; +} +*+html .i-window-footer { + margin-bottom: 0; +} + * html .i-window-resizebox { bottom: 0; width: 22px;