Show More
@@ -38,7 +38,7 b'' | |||||
38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> | |
39 | </li> |
|
39 | </li> | |
40 | <li> |
|
40 | <li> | |
41 |
<span><a id="show_pullrequests" class="link-white" href="#p |
|
41 | <span><a id="show_pullrequests" class="link-white" href="#pullrequests">${_('My pull requests')}</a> </span> | |
42 | </li> |
|
42 | </li> | |
43 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
43 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
44 | <li> |
|
44 | <li> | |
@@ -109,18 +109,22 b' var filter_activate = function(){' | |||||
109 | } |
|
109 | } | |
110 | q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); |
|
110 | q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); | |
111 | } |
|
111 | } | |
112 | YUE.on('show_perms','click',function(e){ |
|
112 | ||
113 | YUD.addClass('show_perms', 'current'); |
|
113 | var show_perms = function(e){ | |
114 |
|
|
114 | YUD.addClass('show_perms', 'current'); | |
115 |
|
|
115 | YUD.removeClass('show_my','current'); | |
|
116 | YUD.removeClass('show_pullrequests','current'); | |||
116 |
|
117 | |||
117 | YUD.setStyle('my','display','none'); |
|
118 | YUD.setStyle('my','display','none'); | |
118 | YUD.setStyle('pullrequests','display','none'); |
|
119 | YUD.setStyle('pullrequests','display','none'); | |
119 | YUD.setStyle('perms','display',''); |
|
120 | YUD.setStyle('perms','display',''); | |
120 | YUD.setStyle('q_filter','display','none'); |
|
121 | YUD.setStyle('q_filter','display','none'); | |
121 | YUE.preventDefault(e); |
|
122 | } | |
|
123 | YUE.on('show_perms','click',function(e){ | |||
|
124 | show_perms(); | |||
122 | }) |
|
125 | }) | |
123 | YUE.on('show_my','click',function(e){ |
|
126 | ||
|
127 | var show_my = function(e){ | |||
124 | YUD.addClass('show_my', 'current'); |
|
128 | YUD.addClass('show_my', 'current'); | |
125 | YUD.removeClass('show_perms','current'); |
|
129 | YUD.removeClass('show_perms','current'); | |
126 | YUD.removeClass('show_pullrequests','current'); |
|
130 | YUD.removeClass('show_pullrequests','current'); | |
@@ -130,14 +134,18 b" YUE.on('show_my','click',function(e){" | |||||
130 | YUD.setStyle('my','display',''); |
|
134 | YUD.setStyle('my','display',''); | |
131 | YUD.setStyle('q_filter','display',''); |
|
135 | YUD.setStyle('q_filter','display',''); | |
132 |
|
136 | |||
133 | YUE.preventDefault(e); |
|
137 | ||
134 | var url = "${h.url('admin_settings_my_repos')}"; |
|
138 | var url = "${h.url('admin_settings_my_repos')}"; | |
135 | ypjax(url, 'my', function(){ |
|
139 | ypjax(url, 'my', function(){ | |
136 |
|
|
140 | table_sort(); | |
137 |
|
|
141 | filter_activate(); | |
138 | }); |
|
142 | }); | |
|
143 | } | |||
|
144 | YUE.on('show_my','click',function(e){ | |||
|
145 | show_my(e); | |||
139 | }) |
|
146 | }) | |
140 | YUE.on('show_pullrequests','click',function(e){ |
|
147 | ||
|
148 | var show_pullrequests = function(e){ | |||
141 | YUD.addClass('show_pullrequests', 'current'); |
|
149 | YUD.addClass('show_pullrequests', 'current'); | |
142 | YUD.removeClass('show_my','current'); |
|
150 | YUD.removeClass('show_my','current'); | |
143 | YUD.removeClass('show_perms','current'); |
|
151 | YUD.removeClass('show_perms','current'); | |
@@ -146,11 +154,27 b" YUE.on('show_pullrequests','click',funct" | |||||
146 | YUD.setStyle('perms','display','none'); |
|
154 | YUD.setStyle('perms','display','none'); | |
147 | YUD.setStyle('pullrequests','display',''); |
|
155 | YUD.setStyle('pullrequests','display',''); | |
148 | YUD.setStyle('q_filter','display','none'); |
|
156 | YUD.setStyle('q_filter','display','none'); | |
149 | YUE.preventDefault(e); |
|
157 | ||
150 | var url = "${h.url('admin_settings_my_pullrequests')}"; |
|
158 | var url = "${h.url('admin_settings_my_pullrequests')}"; | |
151 | ypjax(url, 'pullrequests'); |
|
159 | ypjax(url, 'pullrequests'); | |
|
160 | } | |||
|
161 | YUE.on('show_pullrequests','click',function(e){ | |||
|
162 | show_pullrequests(e) | |||
152 | }) |
|
163 | }) | |
153 |
|
164 | |||
|
165 | var tabs = { | |||
|
166 | 'perms': show_perms, | |||
|
167 | 'my': show_my, | |||
|
168 | 'pullrequests': show_pullrequests | |||
|
169 | } | |||
|
170 | var url = location.href.split('#'); | |||
|
171 | if (url[1]) { | |||
|
172 | //We have a hash | |||
|
173 | var tabHash = url[1]; | |||
|
174 | console.log(tabs, tabHash) | |||
|
175 | tabs[tabHash](); | |||
|
176 | } | |||
|
177 | ||||
154 | // main table sorting |
|
178 | // main table sorting | |
155 | var myColumnDefs = [ |
|
179 | var myColumnDefs = [ | |
156 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
180 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
General Comments 0
You need to be logged in to leave comments.
Login now