healed minitabs
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 12 Feb 2009 12:01:05 +0000 (12:01 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 12 Feb 2009 12:01:05 +0000 (12:01 +0000)
planetlab/minitabs/minitabs.css
planetlab/minitabs/minitabs.js

index 4ef0ef3..3ce302d 100644 (file)
@@ -11,7 +11,7 @@
     float: left;
     font-size: small;  /* could be specified at a higher level */
     margin: 0;
-    padding: 0 10px 0 10px;
+    padding: 0 5px 0 5px; 
     /* thickness and color for the fixed thin horizontal bar */
     border-bottom: 1px solid #696;
     position:relative;
@@ -26,6 +26,8 @@ input.minitabs-submit {
     border: 0;
     /* buttons are normally outlined */
     background-color: transparent;
+    /*padding-bottom: 6px;*/
+    border-bottom: 0px;
 }    
 #minitabs-list li {
     float: left;
@@ -49,7 +51,7 @@ input.minitabs-submit {
 
 #minitabs-list input.active {
     /* border-bottom: 4px solid #696; */
-    padding-bottom: 2px;
+    /* padding-bottom: 2px; */
     /* color when mouse is on button */
     color: #696;
 }
@@ -62,5 +64,6 @@ input.minitabs-submit {
     padding-bottom: 2px;
     /* color for the sliding bar */
     border-bottom: 4px solid #696;
+    margin-bottom: 0px;
 }
 
index 11c614b..c31c175 100644 (file)
 
 */
 
-function plc_debug (txt,value) {
-  window.console.log (txt + ' => ' + value);
-}  
-
-function plc_element (txt,elem) {
-  var message=txt + ':';
-  message += ' type=' + elem.nodeName;
-  message += ' id=' + elem.id;
-  message += ' cls=' + elem.className;
-  window.console.log (message);
-}  
-
-/* lists all attributes - or the specified one - 
- * verbose means the attribute value gets printed as well */
-function plc_introspect (txt,obj,verbose,attribute) {
-  window.console.log ('=== beg intro ' + txt);
-  for (var prop in obj) {
-    if ( (attribute === undefined) || ( prop == attribute ) ) 
-      if (verbose) 
-       window.console.log (prop + '=' + obj[prop]);
-      else
-       window.console.log (prop);
-  }
-  window.console.log ('=== end intro ' + txt);
-}
-
 /* I'm done with this - write it ourselves - don't care about perfs so much anyway */
 /* define getElementsByClassName on Element if missing */
 function getElementsByClassName (elt,cls) {
@@ -93,21 +67,21 @@ var miniTab = {
          if(elem.tagName && elem.tagName == "LI") pos++;
  
        }
-       miniTab.initSlide(pos);
+       miniTab.initSlide(pos,true);
       }
     }
  
     miniTab.ul.onmouseout = function(e) {
-      miniTab.initSlide(miniTab.currentTab);
+      miniTab.initSlide(miniTab.currentTab,true);
       miniTab.setActive (miniTab.activeTab,false);
     };
  
-    for(var i = 0, a; a = miniTab.inputArr[i]; i++) {
-      if(a.className.search("active") != -1) {
+    for(var i = 0, input; input = miniTab.inputArr[i]; i++) {
+      if(input.className.search("active") != -1) {
        miniTab.activeTab = miniTab.currentTab = i;
       }
-      a.style.borderBottom  = "0px";
-      /*a.style.paddingBottom = "6px";*/
+      /*input.style.borderBottom  = "0px";*/
+      /*input.style.paddingBottom = "6px";*/
     }
  
     miniTab.slideObj                = miniTab.ul.parentNode.appendChild(document.createElement("div"));