Show More
@@ -55,11 +55,18 b' function updateThread() {' | |||
|
55 | 55 | .success(function(data) { |
|
56 | 56 | var bottom = isPageBottom(); |
|
57 | 57 | |
|
58 | var lastUpdate = ''; | |
|
59 | ||
|
58 | 60 | var addedPosts = data.added; |
|
59 | 61 | for (var i = 0; i < addedPosts.length; i++) { |
|
60 | 62 | var postText = addedPosts[i]; |
|
61 | 63 | |
|
62 | 64 | var post = $(postText); |
|
65 | ||
|
66 | if (lastUpdate === '') { | |
|
67 | lastUpdate = post.find('.pub_time').text(); | |
|
68 | } | |
|
69 | ||
|
63 | 70 | post.appendTo(lastPost.parent()); |
|
64 | 71 | addRefLinkPreview(post[0]); |
|
65 | 72 | |
@@ -72,6 +79,11 b' function updateThread() {' | |||
|
72 | 79 | var postText = updatedPosts[i]; |
|
73 | 80 | |
|
74 | 81 | var post = $(postText); |
|
82 | ||
|
83 | if (lastUpdate === '') { | |
|
84 | lastUpdate = post.find('.pub_time').text(); | |
|
85 | } | |
|
86 | ||
|
75 | 87 | var postId = post.attr('id'); |
|
76 | 88 | |
|
77 | 89 | var oldPost = $('div.thread').children('.post[id=' + postId + ']'); |
@@ -92,8 +104,11 b' function updateThread() {' | |||
|
92 | 104 | $target.animate({scrollTop: $target.height()}, 1000); |
|
93 | 105 | } |
|
94 | 106 | |
|
95 | $('#reply-count').text(getReplyCount()); | |
|
96 | $('#image-count').text(getImageCount()); | |
|
107 | var hasPostChanges = (updatedPosts.length > 0) | |
|
108 | || (addedPosts.length > 0); | |
|
109 | if (hasPostChanges) { | |
|
110 | updateMetadataPanel(lastUpdate); | |
|
111 | } | |
|
97 | 112 | |
|
98 | 113 | updateBumplimitProgress(data.added.length); |
|
99 | 114 | updatePostBumpableStatus(); |
@@ -132,6 +147,23 b' function getImageCount() {' | |||
|
132 | 147 | return $('.thread').find('img').length |
|
133 | 148 | } |
|
134 | 149 | |
|
150 | function updateMetadataPanel(lastUpdate) { | |
|
151 | var replyCountField = $('#reply-count'); | |
|
152 | var imageCountField = $('#image-count'); | |
|
153 | ||
|
154 | replyCountField.text(getReplyCount()); | |
|
155 | imageCountField.text(getImageCount()); | |
|
156 | ||
|
157 | if (lastUpdate !== '') { | |
|
158 | var lastUpdateField = $('#last-update'); | |
|
159 | lastUpdateField.text(lastUpdate); | |
|
160 | blink(lastUpdateField); | |
|
161 | } | |
|
162 | ||
|
163 | blink(replyCountField); | |
|
164 | blink(imageCountField); | |
|
165 | } | |
|
166 | ||
|
135 | 167 | /** |
|
136 | 168 | * Update bumplimit progress bar |
|
137 | 169 | */ |
@@ -158,12 +190,10 b' function updateBumplimitProgress(postDel' | |||
|
158 | 190 | * If the bumplimit is reached, add dead_post class to all posts |
|
159 | 191 | */ |
|
160 | 192 | function updatePostBumpableStatus() { |
|
161 | var postCount = getReplyCount(); | |
|
162 | 193 | var postsToLimitElement = $('#left_to_limit'); |
|
163 | var postsToLimit = parseInt(postsToLimitElement.text()); | |
|
164 | 194 | |
|
165 |
if (postsToLimit |
|
|
166 |
$('.thread'). |
|
|
195 | if (postsToLimitElement === null) { | |
|
196 | $('.thread').children('.post').addClass('dead_post'); | |
|
167 | 197 | } |
|
168 | 198 | } |
|
169 | 199 | |
@@ -227,10 +257,9 b' function resetForm(form) {' | |||
|
227 | 257 | } else { |
|
228 | 258 | var errors = json.errors; |
|
229 | 259 | for (var i = 0; i < errors.length; i++) { |
|
230 | var error = errors[i]; | |
|
260 | var fieldErrors = errors[i]; | |
|
231 | 261 | |
|
232 |
var |
|
|
233 | var error = error.errors; | |
|
262 | var error = fieldErrors.errors; | |
|
234 | 263 | |
|
235 | 264 | var errorList = $('<div class="form-errors">' + error |
|
236 | 265 | + '<div>'); |
@@ -29,7 +29,7 b'' | |||
|
29 | 29 | <span class="title">{{ post.title }}</span> |
|
30 | 30 | <a class="post_id" href="{% post_url post.id %}"> |
|
31 | 31 | ({{ post.id }})</a> |
|
32 | [{{ post.pub_time }}] | |
|
32 | [<span class="pub_time">{{ post.pub_time }}</span>] | |
|
33 | 33 | [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}') |
|
34 | 34 | ; return false;">>></a>] |
|
35 | 35 |
@@ -57,7 +57,7 b'' | |||
|
57 | 57 | <span class="title">{{ post.title }}</span> |
|
58 | 58 | <a class="post_id" href="#{{ post.id }}"> |
|
59 | 59 | ({{ post.id }})</a> |
|
60 | [{{ post.pub_time }}] | |
|
60 | [<span class="pub_time">{{ post.pub_time }}</span>] | |
|
61 | 61 | {% if not thread.archived %} |
|
62 | 62 | [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}') |
|
63 | 63 | ; return false;">>></a>] |
@@ -137,7 +137,7 b'' | |||
|
137 | 137 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} |
|
138 | 138 | <span id="reply-count">{{ thread.get_reply_count }}</span> {% trans 'replies' %}, |
|
139 | 139 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. |
|
140 | {% trans 'Last update: ' %}{{ thread.last_edit_time }} | |
|
140 | {% trans 'Last update: ' %}<span id="last-update">{{ thread.last_edit_time }}</span> | |
|
141 | 141 | [<a href="rss/">RSS</a>] |
|
142 | 142 | {% endcache %} |
|
143 | 143 | </span> |
@@ -1,19 +1,4 b'' | |||
|
1 | 1 | = Features = |
|
2 | [DONE] Connecting tags to each other | |
|
3 | [DONE] Connect posts to the replies (in messages), get rid of the JS reply map | |
|
4 | [DONE] Better django admin pages to simplify admin operations | |
|
5 | [DONE] Regen script to update all posts | |
|
6 | [DONE] Remove jump links from refmaps | |
|
7 | [DONE] Ban reasons. Split bans into 2 types "read-only" and "read | |
|
8 | denied". Use second only for autoban for spam | |
|
9 | [DONE] Clean up tests and make them run ALWAYS | |
|
10 | [DONE] Use transactions in tests | |
|
11 | [DONE] Thread autoupdate (JS + API) | |
|
12 | [DONE] Split up post model into post and thread, | |
|
13 | and move everything that is used only in 1st post to thread model. | |
|
14 | [DONE] Show board speed in the lower panel (posts per day) | |
|
15 | [DONE] Save image thumbnails size to the separate field | |
|
16 | ||
|
17 | 2 | [NOT STARTED] Tree view (JS) |
|
18 | 3 | [NOT STARTED] Adding tags to images filename |
|
19 | 4 | [NOT STARTED] Federative network for s2s communication |
@@ -32,15 +17,9 b' post or its part (delimited by N charact' | |||
|
32 | 17 | [NOT STARTED] Post deletion confirmation page |
|
33 | 18 | [NOT STARTED] Moderating page. Tags editing and adding |
|
34 | 19 | [NOT STARTED] Get thread graph image using pygraphviz |
|
35 | [NOT STARTED] Creating post via AJAX without reloading page | |
|
36 | 20 | [NOT STARTED] Subscribing to tag via AJAX |
|
37 | 21 | |
|
38 | 22 | = Bugs = |
|
39 | [DONE] Fix bug with creating threads from tag view | |
|
40 | [DONE] Quote characters within quote causes quote parsing to fail | |
|
41 | ||
|
42 | [IN PROGRESS] Replies, images, last update time in bottom panel doesn't change when | |
|
43 | thread updates (last update changing left) | |
|
44 | 23 | |
|
45 | 24 | = Testing = |
|
46 | 25 | [NOT STARTED] Make tests for every view |
General Comments 0
You need to be logged in to leave comments.
Login now