Show More
@@ -38,7 +38,7 b'' | |||
|
38 | 38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
39 | 39 | </li> |
|
40 | 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 | 42 | </li> |
|
43 | 43 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
44 | 44 | <li> |
@@ -109,7 +109,8 b' var filter_activate = function(){' | |||
|
109 | 109 | } |
|
110 | 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 | var show_perms = function(e){ | |
|
113 | 114 |
|
|
114 | 115 |
|
|
115 | 116 |
|
@@ -118,9 +119,12 b" YUE.on('show_perms','click',function(e){" | |||
|
118 | 119 | YUD.setStyle('pullrequests','display','none'); |
|
119 | 120 | YUD.setStyle('perms','display',''); |
|
120 | 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 | 128 | YUD.addClass('show_my', 'current'); |
|
125 | 129 | YUD.removeClass('show_perms','current'); |
|
126 | 130 | YUD.removeClass('show_pullrequests','current'); |
@@ -130,14 +134,18 b" YUE.on('show_my','click',function(e){" | |||
|
130 | 134 | YUD.setStyle('my','display',''); |
|
131 | 135 | YUD.setStyle('q_filter','display',''); |
|
132 | 136 | |
|
133 | YUE.preventDefault(e); | |
|
137 | ||
|
134 | 138 | var url = "${h.url('admin_settings_my_repos')}"; |
|
135 | 139 | ypjax(url, 'my', function(){ |
|
136 | 140 |
|
|
137 | 141 |
|
|
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 | 149 | YUD.addClass('show_pullrequests', 'current'); |
|
142 | 150 | YUD.removeClass('show_my','current'); |
|
143 | 151 | YUD.removeClass('show_perms','current'); |
@@ -146,11 +154,27 b" YUE.on('show_pullrequests','click',funct" | |||
|
146 | 154 | YUD.setStyle('perms','display','none'); |
|
147 | 155 | YUD.setStyle('pullrequests','display',''); |
|
148 | 156 | YUD.setStyle('q_filter','display','none'); |
|
149 | YUE.preventDefault(e); | |
|
157 | ||
|
150 | 158 | var url = "${h.url('admin_settings_my_pullrequests')}"; |
|
151 | 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 | 178 | // main table sorting |
|
155 | 179 | var myColumnDefs = [ |
|
156 | 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