You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/03/15 11:34:08 UTC
svn commit: r923159 - in
/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard:
script/tobago-menu.js style/style.css
Author: lofwyr
Date: Mon Mar 15 10:34:08 2010
New Revision: 923159
URL: http://svn.apache.org/viewvc?rev=923159&view=rev
Log:
TOBAGO-832: Menu
- Bugfix: IE6: select tag is shining through the menu
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js?rev=923159&r1=923158&r2=923159&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js Mon Mar 15 10:34:08 2010
@@ -36,9 +36,11 @@
<span ... </span>
<div class="tobago-menu-store"> // container for the sub menus.
<ol id="m1::menu">
+---> insert iframe here
<li class="tobago-menu-parent">
<a>Sub Menu 1.1</a>
<ol>
+---> insert iframe here
<li class="tobago-menu-parent">
<a>Sub Sub Menu 1.1.1</a>
</li>
@@ -139,6 +141,19 @@ function xxx_tobagoMenuOpen(event) {
// show
sub.css('visibility', 'visible');
+
+ // IE6 select-tag fix
+ if (jQuery.browser.msie && parseInt(jQuery.browser.version) <= 6) {
+ // sub.css('width', sub.width());
+ // sub.css('height', sub.height());
+ // sub.css('display', 'none');
+ // sub.css('display', 'block');
+ var iframe = sub.children("iframe:first");
+ iframe.css('width', sub.outerWidth());
+ iframe.css('height', sub.outerHeight());
+ iframe.css('left', -(parseInt(sub.css('border-left-width')) + parseInt(sub.css('padding-left'))));
+ iframe.css('top', -(parseInt(sub.css('border-top-width')) + parseInt(sub.css('padding-top'))));
+ }
}
// old "hover" off
@@ -212,6 +227,14 @@ function xxx_tobagoMenuInit() {
event.stopPropagation();
});
+
+ // IE6 select-tag fix
+ // put a iframe inside the div, so that a <select> tag doesn't shine through.
+ // the iframe must be resized (see above)
+ if (jQuery.browser.msie && parseInt(jQuery.browser.version) <= 6) {
+ jQuery(".tobago-page-menuStore ol").prepend("<iframe class='tobago-menu-ie6bugfix'></iframe>");
+ }
+
});
}
@@ -223,7 +246,6 @@ jQuery.tobagoMenuParent = function(eleme
return result;
};
-
/*
jQuery(this) is a list of "a" element of a menu item as jQuery object.
Returns a list of "ol" objects. All sub menus as jQuery object.
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=923159&r1=923158&r2=923159&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Mon Mar 15 10:34:08 2010
@@ -15,16 +15,7 @@
* limitations under the License.
*/
-/*
-a:link.tobago-link-default, a:visited.tobago-link-default, a:active.tobago-link-default {
- color: #000000;
- font-size: 15px;
-}
-*/
-
-table.tobago-gridLayout-default {
- table-layout: fixed;
-}
+/* Global settings ------------------------------------------------------------------ */
form {
margin: 0;
@@ -43,7 +34,6 @@ html, body {
overflow: hidden;
}
-
/* Tab ------------------------------------------------------------------ */
.tobago-tab-link {
@@ -229,7 +219,7 @@ span.tobago-progress {
}
.tobago-treeListbox-level {
-/* after ie6: .tobago-treeListbox-default > div > div */
+/* without ie6 support we can use: .tobago-treeListbox-default > div > div */
width: 160px;
height: 100%;
position: absolute;
@@ -237,7 +227,7 @@ span.tobago-progress {
}
.tobago-treeListbox-select {
-/* after ie6: .tobago-treeListbox-default > div > div > select */
+/* without ie6 support we can use: .tobago-treeListbox-default > div > div > select */
position: absolute;
width: 100%;
height: 100%;
@@ -1159,6 +1149,18 @@ li.tobago-menu-selected {
border-style: solid;
}
+/* workaround for IE6 */
+iframe.tobago-menu-ie6bugfix {
+ position: absolute;
+ display: block;
+ z-index: -1;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ filter: mask();
+}
+
/* Sheet ------------------------------------------------------------------ */
.tobago-sheet-outer-div {