Author: sdumitriu
Date: 2008-02-18 03:22:36 +0100 (Mon, 18 Feb 2008)
New Revision: 7785

Modified:
   xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/xwiki.js
   xwiki-platform/skins/trunk/toucan/src/main/resources/toucan/style.css
Log:
XSTOUCAN-1: Create Toucan skin from xwiki.org
Fixed: IE6: the top level menu items are offset to the right by several pixels

Also cleaned up the showsubmenu function a bit


Modified: 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/xwiki.js
===================================================================
--- xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/xwiki.js  
2008-02-18 01:58:04 UTC (rev 7784)
+++ xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/xwiki.js  
2008-02-18 02:22:36 UTC (rev 7785)
@@ -31,24 +31,12 @@
         doHide();
       }
     }
-    /*if(element.lastChild.style.display == "block") return;*/
-    element.lastChild.style.left = (computeAbsoluteLeft(element)  - 10) + "px";
-    element.lastChild.style.top = computeAbsoluteTop(element)   + "px";
+    var coords = Position.positionedOffset(element);
+    element.lastChild.style.left = (coords[0]  - 10) + "px";
+    element.lastChild.style.top = (coords[1] + element.offsetHeight) + "px";
     element.lastChild.className = 
element.lastChild.className.replace("hidden", "visible");
   }
 }
-function computeAbsoluteLeft(element) {
-  if(window.ActiveXObject){
-    return element.offsetLeft - 
element.parentNode.parentNode.parentNode.currentStyle.marginLeft.match("[0-9]+")
 - element.lastChild.currentStyle.marginLeft.substring(0, 1);
-  }
-  return element.offsetLeft;
-}
-function computeAbsoluteTop(element) {
-  if(window.ActiveXObject){
-    return element.offsetHeight;
-  }
-  return element.offsetTop + element.offsetHeight;
-}
 function hidesubmenu(element){
   if(element.lastChild.tagName.toLowerCase() == "span"){
     window.hideelement = element.lastChild;

Modified: xwiki-platform/skins/trunk/toucan/src/main/resources/toucan/style.css
===================================================================
--- xwiki-platform/skins/trunk/toucan/src/main/resources/toucan/style.css       
2008-02-18 01:58:04 UTC (rev 7784)
+++ xwiki-platform/skins/trunk/toucan/src/main/resources/toucan/style.css       
2008-02-18 02:22:36 UTC (rev 7785)
@@ -1264,7 +1264,6 @@
   position: absolute;
   margin-top: 0px;
   margin-left: 0px !important;
-  margin-left: 30px;/* position IE 6 */
   padding: 5px;
   border: 1px solid #222;
   background-color: transparent;

_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to