Show More
@@ -26,31 +26,14 b' var firefoxAnchorFix = function() {' | |||
|
26 | 26 | }; |
|
27 | 27 | |
|
28 | 28 | var linkifyComments = function(comments) { |
|
29 | /* TODO: marcink: remove this - it should no longer needed */ | |
|
30 | for (var i = 0; i < comments.length; i++) { | |
|
31 |
|
|
|
32 | var prev_comment_id = $(comments[i - 1]).data('comment-id'); | |
|
33 | var next_comment_id = $(comments[i + 1]).data('comment-id'); | |
|
34 | ||
|
35 | // place next/prev links | |
|
36 | if (prev_comment_id) { | |
|
37 | $('#prev_c_' + comment_id).show(); | |
|
38 | $('#prev_c_' + comment_id + " a.arrow_comment_link").attr( | |
|
39 | 'href', '#comment-' + prev_comment_id).removeClass('disabled'); | |
|
40 | } | |
|
41 | if (next_comment_id) { | |
|
42 | $('#next_c_' + comment_id).show(); | |
|
43 | $('#next_c_' + comment_id + " a.arrow_comment_link").attr( | |
|
44 | 'href', '#comment-' + next_comment_id).removeClass('disabled'); | |
|
45 | } | |
|
46 | /* TODO(marcink): end removal here */ | |
|
47 | ||
|
48 | // place a first link to the total counter | |
|
49 | if (i === 0) { | |
|
50 | $('#inline-comments-counter').attr('href', '#comment-' + comment_id); | |
|
51 | } | |
|
29 | var firstCommentId = null; | |
|
30 | if (comments) { | |
|
31 | firstCommentId = $(comments[0]).data('comment-id'); | |
|
52 | 32 | } |
|
53 | 33 | |
|
34 | if (firstCommentId){ | |
|
35 | $('#inline-comments-counter').attr('href', '#comment-' + firstCommentId); | |
|
36 | } | |
|
54 | 37 | }; |
|
55 | 38 | |
|
56 | 39 | var bindToggleButtons = function() { |
General Comments 0
You need to be logged in to leave comments.
Login now