Changeset - f48bce87475b
[Not reviewed]
beta
0 4 0
Marcin Kuzminski - 14 years ago 2012-01-27 23:51:13
marcin@python-works.com
code cleanup
3 files changed with 3 insertions and 14 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/repos_groups.py
Show inline comments
 
@@ -157,13 +157,12 @@ class ReposGroupsController(BaseControll
 
            log.error(traceback.format_exc())
 
            h.flash(_('error occurred during update of repos group %s') \
 
                    % request.POST.get('group_name'), category='error')
 

	
 
        return redirect(url('repos_groups'))
 

	
 

	
 
    @HasPermissionAnyDecorator('hg.admin')
 
    def delete(self, id):
 
        """DELETE /repos_groups/id: Delete an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="DELETE" />
 
        # Or using helpers:
rhodecode/templates/admin/users/user_edit_my_account.html
Show inline comments
 
@@ -134,15 +134,15 @@
 
	    </thead>
 
	     <tbody>
 
	     %if c.user_repos:
 
		     %for repo in c.user_repos:
 
		        <tr>
 
		            <td>
 
                     %if repo['dbrepo']['repo_type'] =='hg':
 
                     %if h.is_hg(repo['dbrepo']['repo_type']):
 
                       <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
 
                     %elif repo['dbrepo']['repo_type'] =='git':
 
                     %elif h.is_git(repo['dbrepo']['repo_type']):
 
                       <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
 
                     %else:
 

	
 
                     %endif
 
		             %if repo['dbrepo']['private']:
 
		                <img class="icon" alt="${_('private')}" src="${h.url('/images/icons/lock.png')}"/>
rhodecode/templates/admin/users_groups/users_group_edit.html
Show inline comments
 
@@ -162,21 +162,12 @@ ${h.end_form()}
 
                if(node.selected){
 
                    //push selected to my temp storage left overs :)
 
                    cache.push(node);
 
                }
 
            }
 

	
 
            //clear 'selected' select
 
            //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);
 
            //}
 

	
 

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

	
 
@@ -271,20 +262,19 @@ ${h.end_form()}
 
                    }
 
                    choosen.options.length = 0;
 
                }
 

	
 
            }
 

	
 

	
 
            E.addListener(['add_element','remove_element',
 
                           'add_all_elements','remove_all_elements'],'click',
 
                           prompts_action_callback)
 

	
 
            E.addListener(form_id,'submit',function(){
 
                var choosen = D.get(selected_container);
 
                for (var i = 0; i < choosen.options.length; i++) {
 
                    choosen.options[i].selected = 'selected';
 
                }
 
            })
 
  });
 
        });
 
</script>
 
</%def>
0 comments (0 inline, 0 general)