Show More
@@ -92,6 +92,9 b' function updateThread() {' | |||||
92 | var $target = $('html,body'); |
|
92 | var $target = $('html,body'); | |
93 | $target.animate({scrollTop: $target.height()}, 1000); |
|
93 | $target.animate({scrollTop: $target.height()}, 1000); | |
94 | } |
|
94 | } | |
|
95 | ||||
|
96 | $('#reply-count').text(getReplyCount()); | |||
|
97 | $('#image-count').text(getImageCount()); | |||
95 | }) |
|
98 | }) | |
96 | .error(function(data) { |
|
99 | .error(function(data) { | |
97 | // TODO Show error message that server is unavailable? |
|
100 | // TODO Show error message that server is unavailable? | |
@@ -114,3 +117,11 b' function initAutoupdate() {' | |||||
114 |
|
117 | |||
115 | setInterval(updateThread, THREAD_UPDATE_DELAY); |
|
118 | setInterval(updateThread, THREAD_UPDATE_DELAY); | |
116 | } |
|
119 | } | |
|
120 | ||||
|
121 | function getReplyCount() { | |||
|
122 | return $('.thread').children('.post').length - 1 | |||
|
123 | } | |||
|
124 | ||||
|
125 | function getImageCount() { | |||
|
126 | return $('.thread').find('img').length | |||
|
127 | } |
@@ -154,8 +154,8 b'' | |||||
154 |
|
154 | |||
155 | <span class="metapanel" data-last-update="{{ last_update }}"> |
|
155 | <span class="metapanel" data-last-update="{{ last_update }}"> | |
156 | {% cache 600 thread_meta posts.0.last_edit_time moderator LANGUAGE_CODE %} |
|
156 | {% cache 600 thread_meta posts.0.last_edit_time moderator LANGUAGE_CODE %} | |
157 | {{ posts.0.get_reply_count }} {% trans 'replies' %}, |
|
157 | <span id="reply-count">{{ posts.0.get_reply_count }}</span> {% trans 'replies' %}, | |
158 | {{ posts.0.get_images_count }} {% trans 'images' %}. |
|
158 | <span id="image-count">{{ posts.0.get_images_count }}</span> {% trans 'images' %}. | |
159 | {% trans 'Last update: ' %}{{ posts.0.last_edit_time }} |
|
159 | {% trans 'Last update: ' %}{{ posts.0.last_edit_time }} | |
160 | [<a href="rss/">RSS</a>] |
|
160 | [<a href="rss/">RSS</a>] | |
161 | {% endcache %} |
|
161 | {% endcache %} |
@@ -39,7 +39,7 b' post or its part (delimited by N charact' | |||||
39 | [DONE] Fix bug with creating threads from tag view |
|
39 | [DONE] Fix bug with creating threads from tag view | |
40 | [DONE] Quote characters within quote causes quote parsing to fail |
|
40 | [DONE] Quote characters within quote causes quote parsing to fail | |
41 |
|
41 | |||
42 |
[ |
|
42 | [IN PROGRESS] Replies, images, last update time in bottom panel doesn't change when | |
43 | thread updates |
|
43 | thread updates | |
44 |
|
44 | |||
45 | = Testing = |
|
45 | = Testing = |
General Comments 0
You need to be logged in to leave comments.
Login now