Commits

Marcin Kuzminski  committed 382df4e

quick_repo_menu changed from mouseclick to popup

  • Participants
  • Parent commits fc4a015

Comments (0)

Files changed (1)

File rhodecode/public/js/rhodecode.js

  * QUICK REPO MENU
  */
 var quick_repo_menu = function(){
-    YUE.on(YUQ('.quick_repo_menu'),'click',function(e){
-    	//close all opened ones before !
-    	var actives = YUQ('.quick_repo_menu.active');
-    	for(var i=0;i<actives.length;i++){
-    		var el = actives[i];  
-    		if(el != e.currentTarget){
-	    		YUD.removeClass(el,'active');    	
-	    		YUD.addClass(el.firstElementChild.firstElementChild,'hidden');
-    		}
-    	}
-        var menu = e.currentTarget.firstElementChild.firstElementChild;
-        if(YUD.hasClass(menu,'hidden')){
-            YUD.addClass(e.currentTarget,'active');
-            YUD.removeClass(menu,'hidden');
-        }else{
-            YUD.removeClass(e.currentTarget,'active');
-            YUD.addClass(menu,'hidden');
-        }
-    })
+    YUE.on(YUQ('.quick_repo_menu'),'mouseenter',function(e){
+            var menu = e.currentTarget.firstElementChild.firstElementChild;
+            if(YUD.hasClass(menu,'hidden')){
+                YUD.replaceClass(e.currentTarget,'hidden', 'active');
+                YUD.replaceClass(menu, 'hidden', 'active');
+            }
+        })
+    YUE.on(YUQ('.quick_repo_menu'),'mouseleave',function(e){
+            var menu = e.currentTarget.firstElementChild.firstElementChild;
+            if(YUD.hasClass(menu,'active')){
+                YUD.replaceClass(e.currentTarget, 'active', 'hidden');
+                YUD.replaceClass(menu, 'active', 'hidden');
+            }
+        })
 };