Mercurial > kallithea
changeset 4707:b845d1e94e2e
javascripts: replace YUI with jquery in kallithea/templates/pullrequests/pullrequest_show.html
This patch removes the '.show-inline-comments' event handler.
'.show-inline-comments' does not exist in diff_block.diff_block_simple,
it exists in diff_block.diff_block.
author | Takumi IINO <trot.thunder@gmail.com> |
---|---|
date | Sat, 29 Nov 2014 16:04:48 +0900 |
parents | 94a7abdac8f6 |
children | 4ead043c3349 |
files | kallithea/templates/pullrequests/pullrequest_show.html |
diffstat | 1 files changed, 4 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/pullrequests/pullrequest_show.html Sat Nov 29 16:04:48 2014 +0900 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Sat Nov 29 16:04:48 2014 +0900 @@ -340,37 +340,20 @@ $(document).ready(function(){ PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); - YUE.on(YUQ('.show-inline-comments'),'change',function(e){ - var show = 'none'; - var target = e.currentTarget; - if(target.checked){ - var show = '' - } - var boxid = YUD.getAttribute(target,'id_for'); - var comments = YUQ('#{0} .inline-comments'.format(boxid)); - for(c in comments){ - YUD.setStyle(comments[c],'display',show); - } - var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); - for(c in btns){ - YUD.setStyle(btns[c],'display',show); - } - }) - - YUE.on(YUQ('.add-bubble'),'click',function(e){ + $('.add-bubble').click(function(e){ var tr = e.currentTarget; injectInlineForm(tr.parentNode.parentNode); }); // inject comments into they proper positions - var file_comments = YUQ('.inline-comment-placeholder'); + var file_comments = $('.inline-comment-placeholder').toArray(); renderInlineComments(file_comments); linkInlineComments(document.getElementsByClassName('firstlink'), document.getElementsByClassName("inline-comment")); - YUE.on(YUD.get('update_pull_request'),'click',function(e){ + $('#update_pull_request').click(function(e){ updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); - }) + }); // hack: re-navigate to target after JS is done ... if a target is set and setting href thus won't reload if (window.location.hash != "") {