##// END OF EJS Templates
pullrequest: don't do in the ajax callback what can be done in no time right now
Mads Kiilerich -
r3513:a2a61978 beta
parent child Browse files
Show More
@@ -156,11 +156,14
156 }
156 }
157
157
158 YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}";
158 YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}";
159 ypjax(url,'pull_request_overview');
160
159 YUD.get('pull_request_overview_url').href = url; // shouldn't have as_form ... but ...
161 YUD.get('pull_request_overview_url').href = url; // shouldn't have as_form ... but ...
160 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','');
162 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','');
161 ypjax(url,'pull_request_overview', function(data){
163
162 var sel_box = YUQ('#pull_request_form #other_repo')[0];
164 var sel_box = YUQ('#pull_request_form #other_repo')[0];
163 var repo_name = sel_box.options[sel_box.selectedIndex].value;
165 var repo_name = sel_box.options[sel_box.selectedIndex].value;
166
164 YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description'];
167 YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description'];
165 // replace options of other_ref with the ones for the current other_repo
168 // replace options of other_ref with the ones for the current other_repo
166 var other_ref_selector = YUD.get('other_ref');
169 var other_ref_selector = YUD.get('other_ref');
@@ -172,13 +175,13
172 }
175 }
173 // browsers lost track of selected when appendChild was used
176 // browsers lost track of selected when appendChild was used
174 other_ref_selector.selectedIndex = new_selectedIndex;
177 other_ref_selector.selectedIndex = new_selectedIndex;
178
175 // reset && add the reviewer based on selected repo
179 // reset && add the reviewer based on selected repo
176 var _data = other_repos_info[repo_name];
180 var _data = other_repos_info[repo_name];
177 YUD.get('review_members').innerHTML = '';
181 YUD.get('review_members').innerHTML = '';
178 addReviewMember(_data.user.user_id, _data.user.firstname,
182 addReviewMember(_data.user.user_id, _data.user.firstname,
179 _data.user.lastname, _data.user.username,
183 _data.user.lastname, _data.user.username,
180 _data.user.gravatar_link);
184 _data.user.gravatar_link);
181 })
182 }
185 }
183
186
184 ## refresh automatically when something changes (org_repo can't change)
187 ## refresh automatically when something changes (org_repo can't change)
General Comments 0
You need to be logged in to leave comments. Login now