Show More
@@ -493,8 +493,8 b' def make_map(config):' | |||||
493 | controller='compare', action='index', |
|
493 | controller='compare', action='index', | |
494 | conditions=dict(function=check_repo), |
|
494 | conditions=dict(function=check_repo), | |
495 | requirements=dict( |
|
495 | requirements=dict( | |
496 | org_ref_type='(branch|book|tag|rev|org_ref_type)', |
|
496 | org_ref_type='(branch|book|tag|rev|__org_ref_type__)', | |
497 | other_ref_type='(branch|book|tag|rev|other_ref_type)') |
|
497 | other_ref_type='(branch|book|tag|rev|__other_ref_type__)') | |
498 | ) |
|
498 | ) | |
499 |
|
499 | |||
500 | rmap.connect('pullrequest_home', |
|
500 | rmap.connect('pullrequest_home', |
@@ -138,40 +138,35 b'' | |||||
138 |
|
138 | |||
139 | var loadPreview = function(){ |
|
139 | var loadPreview = function(){ | |
140 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none'); |
|
140 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none'); | |
|
141 | //url template | |||
141 | var url = "${h.url('compare_url', |
|
142 | var url = "${h.url('compare_url', | |
142 | repo_name='org_repo', |
|
143 | repo_name='__org_repo__', | |
143 |
org_ref_type='org_ref_type |
|
144 | org_ref_type='__org_ref_type__', | |
144 |
o |
|
145 | org_ref='__org_ref__', | |
145 |
other_re |
|
146 | other_repo='__other_repo__', | |
|
147 | other_ref_type='__other_ref_type__', | |||
|
148 | other_ref='__other_ref__', | |||
146 | as_form=True, |
|
149 | as_form=True, | |
147 | rev_start=request.GET.get('rev_start',''), |
|
150 | rev_start=request.GET.get('rev_start',''), | |
148 | rev_end=request.GET.get('rev_end',''))}"; |
|
151 | rev_end=request.GET.get('rev_end',''))}"; | |
149 |
|
152 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; | ||
|
153 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); | |||
|
154 | ||||
|
155 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; | |||
|
156 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); | |||
|
157 | ||||
150 | var select_refs = YUQ('#pull_request_form select.refs') |
|
158 | var select_refs = YUQ('#pull_request_form select.refs') | |
151 | var rev_data = {}; // gather the org/other ref and repo here |
|
159 | var rev_data = { | |
152 | for(var i=0;i<select_refs.length;i++){ |
|
160 | 'org_repo': org_repo, | |
153 | var select_ref = select_refs[i]; |
|
161 | 'org_ref': org_ref[1], | |
154 | var select_ref_data = select_ref.value.split(':'); |
|
162 | 'org_ref_type': org_ref[0], | |
155 | var key = null; |
|
163 | 'other_repo': other_repo, | |
156 | var val = null; |
|
164 | 'other_ref': other_ref[1], | |
157 |
|
165 | 'other_ref_type': other_ref[0], | ||
158 | if(select_ref_data.length>1){ |
|
166 | }; // gather the org/other ref and repo here | |
159 | key = select_ref.name+"_type"; |
|
167 | ||
160 | val = select_ref_data[0]; |
|
168 | for (k in rev_data){ | |
161 |
|
|
169 | url = url.replace('__'+k+'__',rev_data[k]); | |
162 | rev_data[key] = val; |
|
|||
163 |
|
||||
164 | key = select_ref.name; |
|
|||
165 | val = select_ref_data[1]; |
|
|||
166 | url = url.replace(key,val); |
|
|||
167 | rev_data[key] = val; |
|
|||
168 |
|
||||
169 | }else{ |
|
|||
170 | key = select_ref.name; |
|
|||
171 | val = select_ref.value; |
|
|||
172 | url = url.replace(key,val); |
|
|||
173 | rev_data[key] = val; |
|
|||
174 | } |
|
|||
175 | } |
|
170 | } | |
176 |
|
171 | |||
177 | YUE.on('other_repo', 'change', function(e){ |
|
172 | YUE.on('other_repo', 'change', function(e){ |
General Comments 0
You need to be logged in to leave comments.
Login now