diff --git a/rhodecode/templates/index_base.html b/rhodecode/templates/index_base.html --- a/rhodecode/templates/index_base.html +++ b/rhodecode/templates/index_base.html @@ -40,7 +40,7 @@
| @@ -190,9 +193,25 @@ F.filterTimeout = null; + function set_count(count){ + + if(count == 0){ + YUD.setStyle('repos_list','display','none'); + YUD.setStyle('welcome','display',''); + } + else{ + YUD.setStyle('repos_list','display',''); + YUD.setStyle('welcome','display','none'); + } + YUD.get('repo_count').innerHTML = count; + + } + + //set initial count for repos var nodes = S.query('div.table tr td div a.repo_name'); - YUD.get('repo_count').innerHTML = nodes.length; + + set_count(nodes.length) F.updateFilter = function() { // Reset timeout F.filterTimeout = null; @@ -216,7 +235,7 @@ } } // set new count into dashboard - YUD.get('repo_count').innerHTML = nodes.length - obsolete.length; + set_count(nodes.length - obsolete.length) } E.on(q_filter,'keyup',function(e){ |
|---|