##// END OF EJS Templates
pull requests: add show/hide comment functionality #4106
lisaq -
r517:bf98000c default
parent child Browse files
Show More
@@ -311,6 +311,10 b''
311 311 %endif
312 312 </td>
313 313 <td class="td-actions rc-form">
314 <div data-comment-id="${FID}" class="btn-link show-inline-comments comments-visible">
315 <span class="comments-show">${_('Show comments')}</span>
316 <span class="comments-hide">${_('Hide comments')}</span>
317 </div>
314 318 </td>
315 319 </tr>
316 320 <tr id="tr_${FID}">
@@ -559,6 +563,23 b''
559 563 $('#close_pull_request').on('click', function(e){
560 564 closePullRequest("${c.repo_name}", "${c.pull_request.pull_request_id}");
561 565 });
566
567 $('.show-inline-comments').on('click', function(e){
568 var boxid = $(this).attr('data-comment-id');
569 var button = $(this);
570
571 if(button.hasClass("comments-visible")) {
572 $('#{0} .inline-comments'.format(boxid)).each(function(index){
573 $(this).hide();
574 })
575 button.removeClass("comments-visible");
576 } else {
577 $('#{0} .inline-comments'.format(boxid)).each(function(index){
578 $(this).show();
579 })
580 button.addClass("comments-visible");
581 }
582 });
562 583 })
563 584 </script>
564 585
General Comments 0
You need to be logged in to leave comments. Login now