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
 
@@ -593,48 +593,57 @@ var deleteNotification = function(url, n
 
    var callback = { 
 
		success:function(o){
 
		    var obj = YUD.get(String("notification_"+notification_id));
 
		    if(obj.parentNode !== undefined){
 
				obj.parentNode.removeChild(obj);
 
			}
 
			_run_callbacks(callbacks);
 
		},
 
	    failure:function(o){
 
	        alert("error");
 
	    },
 
	};
 
    var postData = '_method=delete';
 
    var sUrl = url.replace('__NOTIFICATION_ID__',notification_id);
 
    var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, 
 
    											  callback, postData);
 
};	
 

	
 

	
 
/**
 
 * 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');
 
        }
 
    })
 
};
 

	
 

	
 
/**
 
 * TABLE SORTING
 
 */
 

	
 
// returns a node from given html;
 
var fromHTML = function(html){
 
	  var _html = document.createElement('element');
 
	  _html.innerHTML = html;
 
	  return _html;
 
}
 
var get_rev = function(node){
 
    var n = node.firstElementChild.firstElementChild;
0 comments (0 inline, 0 general)