Mercurial > kallithea
comparison pylons_app/templates/base/base.html @ 373:3171614c0067
Added permissions check on repo switcher,
and cached that for super short cache.
repo switcher css updates
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 28 Jul 2010 02:25:47 +0200 |
parents | 5cd6616b8673 |
children | ca54622e39a1 |
comparison
equal
deleted
inserted
replaced
372:1fa58ca0a77e | 373:3171614c0067 |
---|---|
89 YAHOO.util.Dom.removeClass('repo_switcher','selected'); | 89 YAHOO.util.Dom.removeClass('repo_switcher','selected'); |
90 YAHOO.util.Dom.get('repo_switcher').removeAttribute('style'); | 90 YAHOO.util.Dom.get('repo_switcher').removeAttribute('style'); |
91 } | 91 } |
92 else{ | 92 else{ |
93 YAHOO.util.Dom.setStyle('switch_repos','display',''); | 93 YAHOO.util.Dom.setStyle('switch_repos','display',''); |
94 //YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF'); | |
95 //YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5'); | |
96 YAHOO.util.Dom.addClass('repo_switcher','selected'); | 94 YAHOO.util.Dom.addClass('repo_switcher','selected'); |
97 } | 95 } |
98 }); | 96 }); |
99 YAHOO.util.Event.addListener('repos_list','change',function(e){ | 97 YAHOO.util.Event.addListener('repos_list','change',function(e){ |
100 var wa = YAHOO.util.Dom.get('repos_list').value; | 98 var wa = YAHOO.util.Dom.get('repos_list').value; |
101 | 99 |
102 var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa); | 100 var url = "${h.url('summary_home',repo_name='__REPO__')}".replace('__REPO__',wa); |
103 window.location = url; | 101 window.location = url; |
104 }) | 102 }) |
105 }); | 103 }); |
106 </script> | 104 </script> |
107 | 105 |
113 <span class="icon"> | 111 <span class="icon"> |
114 <img src="/images/icons/database.png" alt="${_('Products')}" /> | 112 <img src="/images/icons/database.png" alt="${_('Products')}" /> |
115 </span> | 113 </span> |
116 <span>↓</span> | 114 <span>↓</span> |
117 </a> | 115 </a> |
118 <div id="switch_repos" style="display:none;position: absolute;height: 25px;z-index: 1"> | 116 <div id="switch_repos" style="display:none;"> |
119 <select id="repos_list" size="=10" style="min-width: 150px"> | 117 <select id="repos_list" size="10"> |
120 %for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()): | 118 %for repo in c.repo_switcher_list: |
121 <option value="${repo}">${repo}</option> | 119 <option value="${repo}">${repo}</option> |
122 %endfor | 120 %endfor |
123 </select> | 121 </select> |
124 </div> | 122 </div> |
125 </li> | 123 </li> |