Mercurial > kallithea
comparison rhodecode/templates/pullrequests/pullrequest.html @ 3326:5ef64956c385 beta
pull request: update changeset list automatically - remove refresh icon
With most of the UI giving immediate response it was confusing that we had to
press 'refresh' manually'. The icon could also be misunderstood as a 'swap'
symbol or as reload/reset.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 04 Feb 2013 15:59:01 +0100 |
parents | c5dde6b5e976 |
children | f285faa3a602 |
comparison
equal
deleted
inserted
replaced
3325:c5dde6b5e976 | 3326:5ef64956c385 |
---|---|
46 <div class="fork_user"> | 46 <div class="fork_user"> |
47 <div class="gravatar"> | 47 <div class="gravatar"> |
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 ,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_pull_request_rev,c.default_revs,class_='refs')} | 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> |
61 </div> | 56 </div> |
62 <div style="clear:both;padding-top: 10px"></div> | 57 <div style="clear:both;padding-top: 10px"></div> |
180 // select back the revision that was just compared | 175 // select back the revision that was just compared |
181 setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); | 176 setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); |
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('refresh','click',function(e){ | 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) |
197 | 199 |
198 </script> | 200 </script> |