Changeset - fc4a0152a021
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-03-02 06:02:52
marcin@python-works.com
disallow opening multiple quick-menus on home page
1 file changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -614,6 +614,15 @@ var deleteNotification = function(url, n
 
 */
 
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');
0 comments (0 inline, 0 general)