]> source.dussan.org Git - vaadin-framework.git/commitdiff
-Small fix to window styles (IE).
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Fri, 26 Oct 2007 12:30:59 +0000 (12:30 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Fri, 26 Oct 2007 12:30:59 +0000 (12:30 +0000)
-Panel height calculation refined, now it won't add the extragenous style attribute to the outmost DOM element.

svn changeset:2601/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java
src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css
src/com/itmill/toolkit/terminal/gwt/public/default/window/window.css

index 63d8d4ff66337935d354f75784037aba23d50413..3c1a877dfe7dee2f67de47fccec6089ba2c2c721 100644 (file)
@@ -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);
        }
index 35dbb01e8965efc861bc955544789c4b053a72d1..254faf308411b96b0e717f2fca4b407c752993de 100644 (file)
-.i-panel,\r
-.i-panel-caption,\r
-.i-panel-content,\r
-.i-panel-deco,\r
-.i-panel-light,\r
-.i-panel-light-caption,\r
-.i-panel-light-content,\r
-.i-panel-light-deco {\r
-       outline: none; /* Prevent selection outline which might break layouts or cause scrollbars */\r
-}\r
-\r
-.i-panel:before {\r
-       display: block;\r
-       content: "";\r
-       background: transparent url(img/top-right.png) repeat-x right top;\r
-       height: 9px;\r
-       margin-left: 9px;\r
-}\r
-\r
-.i-panel-caption,\r
-.i-panel-light-caption {\r
-       font-size: 18px;\r
-       line-height: 18px;\r
-       font-weight: normal;\r
-       letter-spacing: -0.03em;\r
-       color: #f14c1a;\r
-       white-space: nowrap;\r
-       height: 18px;\r
-       padding: 6px 18px 14px 18px;\r
-       border: 1px solid #babfc0;\r
-       border-top: none;\r
-       background: #fff;\r
-}\r
-\r
-.i-panel-nocaption {\r
-       height: 9px;\r
-}\r
-\r
-.i-panel-caption:before,\r
-.i-panel-nocaption:before {\r
-       display: block;\r
-       content: "";\r
-       position: relative;\r
-       width: 9px;\r
-       height: 9px;\r
-       background: transparent url(img/top-left.png) no-repeat;\r
-       margin: -15px 0 5px -19px;\r
-}\r
-\r
-.i-panel-nocaption:before {\r
-       margin: -9px 0 0 0;\r
-}\r
-\r
-.i-panel-content {\r
-       border: 1px solid #babfc0;\r
-       border-top: none;\r
-       border-bottom: none;\r
-       background-color: #fff;\r
-       overflow: auto;\r
-       padding: 15px 18px 6px 18px;\r
-}\r
-\r
-.i-panel-deco {\r
-       height: 9px;\r
-       background: transparent url(img/bottom-right.png) repeat-x right top;\r
-       margin-left: 9px;\r
-}\r
-\r
-.i-panel-deco:before {\r
-       display: block;\r
-       content: "";\r
-       width: 9px;\r
-       height: 9px;\r
-       margin-left: -9px;\r
-       background: transparent url(img/bottom-left.png) no-repeat;\r
-}\r
-\r
-\r
-\r
-\r
-\r
-\r
-/* Light panel style */\r
-\r
-.i-panel-light:before {\r
-       display: none;\r
-}\r
-\r
-.i-panel-caption-light {\r
-       border-left: none;\r
-       border-right: none;\r
-       background: transparent;\r
-       padding-top: 14px;\r
-}\r
-\r
-.i-panel-caption-light:before,\r
-.i-panel-nocaption-light:before {\r
-       display: none;\r
-}\r
-\r
-.i-panel-content-light {\r
-       border: none;\r
-       background: transparent;\r
-       padding: 15px 18px;\r
-}\r
-\r
-.i-panel-deco-light {\r
-       height: 0;\r
-       overflow: hidden;\r
-}\r
-\r
-\r
-\r
-/* Panel without padding (NO_PADDING style) */\r
-\r
-.i-panel-content-nopad {\r
-       padding: 0;\r
-}\r
-\r
-\r
-\r
-\r
-\r
-/* Light panel contained within another panel or a tabsheet */\r
-/* Use more precise selector to override IE specific rules automatically */\r
-\r
-.i-panel .i-panel-caption-light,\r
-.i-tabsheet .i-panel-caption-light {\r
-       margin-top: -1px;\r
-       padding-top: 14px;\r
-       border-top: 1px solid #babfc0;\r
-}\r
-\r
-\r
-\r
-\r
-\r
-/* IE specific rules (different selectors for IE6 and IE7.\r
- * These selectors must be separate because IE6 won't \r
- * apply them if they are grouped together.\r
-*/\r
-* html .i-panel-caption {\r
-       border: 1px solid #babfc0;\r
-       padding-top: 14px;\r
-}\r
-*+html .i-panel-caption {\r
-       border: 1px solid #babfc0;\r
-       padding-top: 14px;\r
-}\r
-\r
-* html .i-panel-caption-light {\r
-       border-left: none;\r
-       border-right: none;\r
-}\r
-*+html .i-panel-caption-light {\r
-       border-left: none;\r
-       border-right: none;\r
-}\r
-\r
-* html .i-panel-content {\r
-       border-bottom: 1px solid #babfc0;\r
-       padding: 15px 18px;\r
-}\r
-*+html .i-panel-content {\r
-       border-bottom: 1px solid #babfc0;\r
-       padding: 15px 18px;\r
-}\r
-\r
-* html .i-panel-deco {\r
-       display: none;\r
-}\r
-*+html .i-panel-deco {\r
-       display: none;\r
-}\r
-\r
-/* Without caption */\r
-* html .i-panel-nocaption {\r
-       height: 1px;\r
-       overflow: hidden;\r
-       background: #c1c6cc;\r
-       border: none;\r
-}\r
-\r
-/* Without padding */\r
-* html .i-panel-content-nopad {\r
-       padding: 0;\r
-}\r
-*+html .i-panel-content-nopad {\r
-       padding: 0;\r
+.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
index 9eb46b847a8d96a57f93920fa83d327a942e8600..b42e1498784c7aa01cbb4f5976cec69dbc997132 100644 (file)
        background: #fff;
 }
 
+* html .i-window-footer {
+       margin-bottom: 0;
+}
+*+html .i-window-footer {
+       margin-bottom: 0;
+}
+
 * html .i-window-resizebox {
        bottom: 0;
        width: 22px;