Mercurial > kallithea
changeset 1667:fab837f40cf7 beta
fixed repo counter on main page
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 11 Nov 2011 19:00:48 +0200 |
parents | a404060706c0 |
children | f1c87ffcfb95 |
files | rhodecode/public/js/rhodecode.js rhodecode/templates/index_base.html |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/public/js/rhodecode.js Fri Nov 11 18:46:39 2011 +0200 +++ b/rhodecode/public/js/rhodecode.js Fri Nov 11 19:00:48 2011 +0200 @@ -263,6 +263,8 @@ var l = nodes.length; var i; + var showing = 0; + for (i=0;i<l;i++ ){ var n = nodes[i]; var target_element = display_element(n) @@ -271,9 +273,16 @@ } else{ show_node(target_element); + showing+=1; } } + // if repo_count is set update the number + var cnt = YUD.get('repo_count'); + if(cnt){ + YUD.get('repo_count').innerHTML = showing; + } + } }
--- a/rhodecode/templates/index_base.html Fri Nov 11 18:46:39 2011 +0200 +++ b/rhodecode/templates/index_base.html Fri Nov 11 19:00:48 2011 +0200 @@ -3,7 +3,7 @@ <!-- box / title --> <div class="title"> <h5> - <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count"></span> ${_('repositories')} + <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">${len(c.repos_list)}</span> ${_('repositories')} </h5> %if c.rhodecode_user.username != 'default': %if h.HasPermissionAny('hg.admin','hg.create.repository')():