##// END OF EJS Templates
comments: allow to properly initialize outdated comments that are attached...
marcink -
r2250:8a477b72 stable
parent child Browse files
Show More
@@ -475,7 +475,12 b' var CommentsController = function() {'
475 475
476 476 this.getLineNumber = function(node) {
477 477 var $node = $(node);
478 return $node.closest('td').attr('data-line-number');
478 var lineNo = $node.closest('td').attr('data-line-number');
479 if (lineNo === undefined && $node.data('commentInline')){
480 lineNo = $node.data('commentLineNo')
481 }
482
483 return lineNo
479 484 };
480 485
481 486 this.scrollToComment = function(node, offset, outdated) {
@@ -801,30 +806,4 b' var CommentsController = function() {'
801 806 return false;
802 807 };
803 808
804 this.renderInlineComments = function(file_comments) {
805 show_add_button = typeof show_add_button !== 'undefined' ? show_add_button : true;
806
807 for (var i = 0; i < file_comments.length; i++) {
808 var box = file_comments[i];
809
810 var target_id = $(box).attr('target_id');
811
812 // actually comments with line numbers
813 var comments = box.children;
814
815 for (var j = 0; j < comments.length; j++) {
816 var data = {
817 'rendered_text': comments[j].outerHTML,
818 'line_no': $(comments[j]).attr('line'),
819 'target_id': target_id
820 };
821 }
822 }
823
824 // since order of injection is random, we're now re-iterating
825 // from correct order and filling in links
826 linkifyComments($('.inline-comment-injected'));
827 firefoxAnchorFix();
828 };
829
830 809 };
@@ -21,6 +21,7 b''
21 21 line="${comment.line_no}"
22 22 data-comment-id="${comment.comment_id}"
23 23 data-comment-type="${comment.comment_type}"
24 data-comment-line-no="${comment.line_no}"
24 25 data-comment-inline=${h.json.dumps(inline)}
25 26 style="${'display: none;' if outdated_at_ver else ''}">
26 27
General Comments 0
You need to be logged in to leave comments. Login now