##// END OF EJS Templates
whitespace cleanup
marcink -
r3168:2fb94c52 beta
parent child Browse files
Show More
@@ -219,7 +219,7 b' class ApiController(JSONRPCController):'
219 elif HasRepoPermissionAnyApi('repository.admin',
219 elif HasRepoPermissionAnyApi('repository.admin',
220 'repository.write')(user=apiuser,
220 'repository.write')(user=apiuser,
221 repo_name=repo.repo_name):
221 repo_name=repo.repo_name):
222 #make sure normal user does not pass someone else userid,
222 #make sure normal user does not pass someone else userid,
223 #he is not allowed to do that
223 #he is not allowed to do that
224 if not isinstance(userid, Optional) and userid != apiuser.user_id:
224 if not isinstance(userid, Optional) and userid != apiuser.user_id:
225 raise JSONRPCError(
225 raise JSONRPCError(
@@ -270,7 +270,7 b' class ApiController(JSONRPCController):'
270 :param userid:
270 :param userid:
271 """
271 """
272 if HasPermissionAnyApi('hg.admin')(user=apiuser) is False:
272 if HasPermissionAnyApi('hg.admin')(user=apiuser) is False:
273 #make sure normal user does not pass someone else userid,
273 #make sure normal user does not pass someone else userid,
274 #he is not allowed to do that
274 #he is not allowed to do that
275 if not isinstance(userid, Optional) and userid != apiuser.user_id:
275 if not isinstance(userid, Optional) and userid != apiuser.user_id:
276 raise JSONRPCError(
276 raise JSONRPCError(
@@ -44,8 +44,8 b' def _get_ip_addr(environ):'
44 ip = environ.get(proxy_key2)
44 ip = environ.get(proxy_key2)
45 if ip:
45 if ip:
46 # HTTP_X_FORWARDED_FOR can have mutliple ips inside
46 # HTTP_X_FORWARDED_FOR can have mutliple ips inside
47 # the left-most being the original client, and each successive proxy
47 # the left-most being the original client, and each successive proxy
48 # that passed the request adding the IP address where it received the
48 # that passed the request adding the IP address where it received the
49 # request from.
49 # request from.
50 if ',' in ip:
50 if ',' in ip:
51 ip = ip.split(',')[0].strip()
51 ip = ip.split(',')[0].strip()
@@ -72,7 +72,7 b''
72 sortOptions: { sortFunction: nameSort }},
72 sortOptions: { sortFunction: nameSort }},
73 {key:"desc",label:"${_('Description')}",sortable:true},
73 {key:"desc",label:"${_('Description')}",sortable:true},
74 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
74 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
75 sortOptions: { sortFunction: revisionSort }},
75 sortOptions: { sortFunction: revisionSort }},
76 {key:"owner",label:"${_('Owner')}",sortable:true},
76 {key:"owner",label:"${_('Owner')}",sortable:true},
77 {key:"action",label:"${_('Action')}",sortable:false},
77 {key:"action",label:"${_('Action')}",sortable:false},
78 ];
78 ];
@@ -100,7 +100,7 b''
100 </div>
100 </div>
101 <div id="pullrequests_container" class="table" style="display:none">
101 <div id="pullrequests_container" class="table" style="display:none">
102 ## loaded via AJAX
102 ## loaded via AJAX
103 ${_('Loading...')}
103 ${_('Loading...')}
104 </div>
104 </div>
105 </div>
105 </div>
106
106
@@ -202,14 +202,14 b' function table_renderer(data){'
202 }
202 }
203 return res;
203 return res;
204 }
204 }
205
205
206 // main table sorting
206 // main table sorting
207 var myColumnDefs = [
207 var myColumnDefs = [
208 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
208 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
209 {key:"name",label:"${_('Name')}",sortable:true,
209 {key:"name",label:"${_('Name')}",sortable:true,
210 sortOptions: { sortFunction: nameSort }},
210 sortOptions: { sortFunction: nameSort }},
211 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
211 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
212 sortOptions: { sortFunction: revisionSort }},
212 sortOptions: { sortFunction: revisionSort }},
213 {key:"action",label:"${_('Action')}",sortable:false},
213 {key:"action",label:"${_('Action')}",sortable:false},
214 ];
214 ];
215
215
@@ -1,1 +0,0 b''
1
@@ -122,7 +122,7 b''
122 ${h.submit('remove_%s' % repo_name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
122 ${h.submit('remove_%s' % repo_name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
123 ${h.end_form()}
123 ${h.end_form()}
124 </div>
124 </div>
125 </div>
125 </div>
126 </%def>
126 </%def>
127
127
128 <%def name="user_actions(user_id, username)">
128 <%def name="user_actions(user_id, username)">
@@ -141,4 +141,3 b''
141 onclick="javascript:toggleFollowingRepo(this, ${repo_id},'${str(h.get_token())}')">
141 onclick="javascript:toggleFollowingRepo(this, ${repo_id},'${str(h.get_token())}')">
142 </span>
142 </span>
143 </%def>
143 </%def>
144
@@ -213,7 +213,7 b''
213 quick_repo_menu();
213 quick_repo_menu();
214 var func = function(node){
214 var func = function(node){
215 return node.parentNode.parentNode.parentNode.parentNode;
215 return node.parentNode.parentNode.parentNode.parentNode;
216 }
216 }
217 q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func);
217 q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func);
218 });
218 });
219
219
@@ -43,7 +43,7 b''
43 </div>
43 </div>
44 <div class="box box-right">
44 <div class="box box-right">
45 <!-- box / title -->
45 <!-- box / title -->
46
46
47 <div class="title">
47 <div class="title">
48 <h5>
48 <h5>
49 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/>
49 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/>
@@ -62,14 +62,14 b''
62 </li>
62 </li>
63 %endif
63 %endif
64 </ul>
64 </ul>
65 </div>
65 </div>
66
66
67 <!-- end box / title -->
67 <!-- end box / title -->
68 <div id="my_container" style="display:none">
68 <div id="my_container" style="display:none">
69 <div class="table yui-skin-sam" id="repos_list_wrap"></div>
69 <div class="table yui-skin-sam" id="repos_list_wrap"></div>
70 <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
70 <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
71 </div>
71 </div>
72
72
73 <div id="watched_container">
73 <div id="watched_container">
74 <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div>
74 <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div>
75 <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div>
75 <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div>
@@ -104,8 +104,8 b''
104 show_changeset_tooltip();
104 show_changeset_tooltip();
105 });
105 });
106 YUE.preventDefault(e);
106 YUE.preventDefault(e);
107 });
107 });
108
108
109 var show_my = function(e){
109 var show_my = function(e){
110 YUD.setStyle('watched_container','display','none');
110 YUD.setStyle('watched_container','display','none');
111 YUD.setStyle('my_container','display','');
111 YUD.setStyle('my_container','display','');
@@ -114,7 +114,7 b''
114
114
115 YUD.addClass('show_my', 'current');
115 YUD.addClass('show_my', 'current');
116 YUD.removeClass('show_watched','current');
116 YUD.removeClass('show_watched','current');
117
117
118 if(!YUD.hasClass('show_my', 'loaded')){
118 if(!YUD.hasClass('show_my', 'loaded')){
119 table_renderer(${c.data |n});
119 table_renderer(${c.data |n});
120 YUD.addClass('show_my', 'loaded');
120 YUD.addClass('show_my', 'loaded');
@@ -134,8 +134,8 b''
134 if(!YUD.hasClass('show_watched', 'loaded')){
134 if(!YUD.hasClass('show_watched', 'loaded')){
135 watched_renderer(${c.watched_data |n});
135 watched_renderer(${c.watched_data |n});
136 YUD.addClass('show_watched', 'loaded');
136 YUD.addClass('show_watched', 'loaded');
137 }
137 }
138
138
139 return
139 return
140 var nodes = YUQ('#watched_container .watched_repo a');
140 var nodes = YUQ('#watched_container .watched_repo a');
141 var target = 'q_filter';
141 var target = 'q_filter';
@@ -201,7 +201,7 b''
201 {key:"name",label:"${_('Name')}",sortable:true,
201 {key:"name",label:"${_('Name')}",sortable:true,
202 sortOptions: { sortFunction: nameSort }},
202 sortOptions: { sortFunction: nameSort }},
203 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
203 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
204 sortOptions: { sortFunction: revisionSort }},
204 sortOptions: { sortFunction: revisionSort }},
205 {key:"action",label:"${_('Action')}",sortable:false},
205 {key:"action",label:"${_('Action')}",sortable:false},
206 ];
206 ];
207
207
@@ -266,7 +266,7 b''
266 filterTimeout = setTimeout(updateFilter,600);
266 filterTimeout = setTimeout(updateFilter,600);
267 });
267 });
268 }
268 }
269
269
270 function table_renderer(data){
270 function table_renderer(data){
271 var myDataSource = new YAHOO.util.DataSource(data);
271 var myDataSource = new YAHOO.util.DataSource(data);
272 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
272 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
@@ -305,7 +305,7 b''
305 {key:"name",label:"${_('Name')}",sortable:true,
305 {key:"name",label:"${_('Name')}",sortable:true,
306 sortOptions: { sortFunction: nameSort }},
306 sortOptions: { sortFunction: nameSort }},
307 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
307 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
308 sortOptions: { sortFunction: revisionSort }},
308 sortOptions: { sortFunction: revisionSort }},
309 {key:"action",label:"${_('Action')}",sortable:false},
309 {key:"action",label:"${_('Action')}",sortable:false},
310 ];
310 ];
311
311
@@ -369,7 +369,7 b''
369 clearTimeout(filterTimeout);
369 clearTimeout(filterTimeout);
370 filterTimeout = setTimeout(updateFilter,600);
370 filterTimeout = setTimeout(updateFilter,600);
371 });
371 });
372 }
372 }
373
373
374 </script>
374 </script>
375 </%def>
375 </%def>
@@ -106,4 +106,3 b' merge" class="tooltip" href="/vcs_test_h'
106 RepoModel().delete('gr1/repo_in_group')
106 RepoModel().delete('gr1/repo_in_group')
107 ReposGroupModel().delete(repos_group='gr1', force_delete=True)
107 ReposGroupModel().delete(repos_group='gr1', force_delete=True)
108 Session().commit()
108 Session().commit()
109 No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now