Author:   Lars Michelsen <[email protected]>
Date:     Sat Jul 23 19:13:27 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Sat Jul 23 19:13:27 2011 +0200

Small header code cleanups

---

 share/userfiles/templates/default.header.js |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/share/userfiles/templates/default.header.js 
b/share/userfiles/templates/default.header.js
index f23d953..dd15041 100644
--- a/share/userfiles/templates/default.header.js
+++ b/share/userfiles/templates/default.header.js
@@ -70,11 +70,13 @@ function headerToggle(store) {
 // Hide the given menus instant
 function ddMenuHide(aIds) {
     var h;
-    var c;
     for(var i = 0; i < aIds.length; i++) {
         h = document.getElementById(aIds[i] + '-ddheader');
-        c = document.getElementById(aIds[i] + '-ddcontent');
 
+        // Not imediately hide the hover menu. It might happen
+        // that the user opens a submenu. To prevent strange
+        // effects the timer is used to hide the menu after
+        // some time if no submenu was opened within this time.
         clearTimeout(h.timer);
         var id = aIds[i];
         h.timer = window.setTimeout(function () {
@@ -82,7 +84,6 @@ function ddMenuHide(aIds) {
         }, 50);
     }
 
-    c = null;
     h = null;
     return false;
 }
@@ -103,11 +104,10 @@ function ddMenu(id, d, reposition){
     }
 
     //clearInterval(c.timer);
-    if(d == 1) {
+    if(d == 1)
         c.style.display = 'block';
-    } else {
+    else
         c.style.display = 'none';
-    }
     return false;
 }
 
@@ -257,4 +257,4 @@ function getListNodeIndex(oList) {
 
 function sidebarGetListByTitle(title) {
     return title.parentNode.getElementsByTagName('ul')[0];
-}
\ No newline at end of file
+}


------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to