Show More
@@ -48,13 +48,8 | |||||
48 | <img id="other_repo_gravatar" alt="gravatar" src=""/> |
|
48 | <img id="other_repo_gravatar" alt="gravatar" src=""/> | |
49 | </div> |
|
49 | </div> | |
50 | <span style="font-size: 20px"> |
|
50 | <span style="font-size: 20px"> | |
51 |
${h.select('other_repo',c.default_pull_request |
|
51 | ${h.select('other_repo',c.default_pull_request,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_pull_request_rev,c.default_revs,class_='refs')} | |
52 | </span> |
|
52 | </span> | |
53 | <span style="padding:3px"> |
|
|||
54 | <a id="refresh" href="#" class="tooltip" title="${h.tooltip(_('refresh overview'))}"> |
|
|||
55 | <img style="margin:3px" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> |
|
|||
56 | </a> |
|
|||
57 | </span> |
|
|||
58 | <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> |
|
53 | <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> | |
59 | </div> |
|
54 | </div> | |
60 | <div style="clear:both;padding-top: 10px"></div> |
|
55 | <div style="clear:both;padding-top: 10px"></div> | |
@@ -182,15 +177,22 | |||||
182 | }) |
|
177 | }) | |
183 | } |
|
178 | } | |
184 |
|
179 | |||
|
180 | ## refresh automatically when something changes (org_repo can't change) | |||
|
181 | ||||
|
182 | YUE.on('org_ref', 'change', function(e){ | |||
|
183 | loadPreview(); | |||
|
184 | }); | |||
|
185 | ||||
185 | YUE.on('other_repo', 'change', function(e){ |
|
186 | YUE.on('other_repo', 'change', function(e){ | |
186 | var repo_name = e.currentTarget.value; |
|
187 | var repo_name = e.currentTarget.value; | |
187 | // replace the <select> of changed repo |
|
188 | // replace the <select> of changed repo | |
188 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; |
|
189 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; | |
|
190 | loadPreview(); | |||
189 | }); |
|
191 | }); | |
190 |
|
192 | |||
191 |
YUE.on(' |
|
193 | YUE.on('other_ref', 'change', function(e){ | |
192 | loadPreview() |
|
194 | loadPreview(); | |
193 | }) |
|
195 | }); | |
194 |
|
196 | |||
195 | //lazy load overview after 0.5s |
|
197 | //lazy load overview after 0.5s | |
196 | setTimeout(loadPreview, 500) |
|
198 | setTimeout(loadPreview, 500) |
General Comments 0
You need to be logged in to leave comments.
Login now