Changeset - d1009f6bbc9c
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2011-02-11 15:25:29
marcin@python-works.com
small fix for users groups choose dialog
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/admin/users_groups/users_group_edit.html
Show inline comments
 
@@ -100,54 +100,54 @@ ${h.end_form()}
 
            var E = YAHOO.util.Event;
 
            
 
            //definition of containers ID's
 
            var available_container = 'available_members';
 
            var selected_container = 'users_group_members';
 
            
 
            //form containing containers id
 
            var form_id = 'edit_users_group';
 
            
 
            //temp container for selected storage.
 
            var cache = new Array();
 
            var av_cache = new Array();
 
            var c =  D.get(selected_container);
 
            var ac = D.get(available_container);
 
            
 
            //get only selected options for further fullfilment
 
            for(var i = 0;node =c.options[i];i++){
 
                if(node.selected){
 
                    //push selected to my temp storage left overs :)
 
                    cache.push(node);
 
                }
 
            }
 
            
 
            //clear 'selected' select
 
            c.options.length = 0;
 
            //c.options.length = 0;
 

	
 
            //fill it with remembered options
 
            for(var i = 0;node = cache[i];i++){
 
                c.options[i]=new Option(node.text, node.value, false, false);
 
            }
 
            //for(var i = 0;node = cache[i];i++){
 
            //   c.options[i]=new Option(node.text, node.value, false, false);
 
            //}
 
            
 
           
 
            //get all available options to cache
 
            for(var i = 0;node =ac.options[i];i++){
 
                    //push selected to my temp storage left overs :)
 
                    av_cache.push(node);
 
            }            
 
            
 
            //fill available only with those not in choosen
 
            ac.options.length=0;
 
            tmp_cache = new Array();
 
            
 
            for(var i = 0;node = av_cache[i];i++){
 
            	var add = true;
 
	            for(var i2 = 0;node_2 = cache[i2];i2++){
 
	                if(node.value == node_2.value){
 
	                	add=false;
 
	                	break;
 
	                }
 
	            }
 
	            if(add){
 
	            	tmp_cache.push(new Option(node.text, node.value, false, false));
 
	            }
 
            }            
0 comments (0 inline, 0 general)