Mercurial > kallithea
changeset 3325:c5dde6b5e976 beta
pull request: only bind action to other_repo change once
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 04 Feb 2013 15:54:35 +0100 |
parents | c9b85375776d |
children | 5ef64956c385 |
files | rhodecode/templates/pullrequests/pullrequest.html |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/templates/pullrequests/pullrequest.html Mon Feb 04 14:24:25 2013 +0100 +++ b/rhodecode/templates/pullrequests/pullrequest.html Mon Feb 04 15:54:35 2013 +0100 @@ -169,12 +169,6 @@ url = url.replace('__'+k+'__',rev_data[k]); } - YUE.on('other_repo', 'change', function(e){ - var repo_name = e.currentTarget.value; - // replace the <select> of changed repo - YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; - }); - ypjax(url,'pull_request_overview', function(data){ var sel_box = YUQ('#pull_request_form #other_repo')[0]; var repo_name = sel_box.options[sel_box.selectedIndex].value; @@ -187,6 +181,13 @@ setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); }) } + + YUE.on('other_repo', 'change', function(e){ + var repo_name = e.currentTarget.value; + // replace the <select> of changed repo + YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; + }); + YUE.on('refresh','click',function(e){ loadPreview() })