diff --git a/rhodecode/templates/pullrequests/pullrequest_show.html b/rhodecode/templates/pullrequests/pullrequest_show.html --- a/rhodecode/templates/pullrequests/pullrequest_show.html +++ b/rhodecode/templates/pullrequests/pullrequest_show.html @@ -311,6 +311,10 @@ %endif + @@ -559,6 +563,23 @@ $('#close_pull_request').on('click', function(e){ closePullRequest("${c.repo_name}", "${c.pull_request.pull_request_id}"); }); + + $('.show-inline-comments').on('click', function(e){ + var boxid = $(this).attr('data-comment-id'); + var button = $(this); + + if(button.hasClass("comments-visible")) { + $('#{0} .inline-comments'.format(boxid)).each(function(index){ + $(this).hide(); + }) + button.removeClass("comments-visible"); + } else { + $('#{0} .inline-comments'.format(boxid)).each(function(index){ + $(this).show(); + }) + button.addClass("comments-visible"); + } + }); })