Show More
@@ -193,7 +193,8 b' class PostForm(NeboardForm):' | |||
|
193 | 193 | else: |
|
194 | 194 | posting_delay = settings.POSTING_DELAY |
|
195 | 195 | |
|
196 | if LAST_POST_TIME in self.session: | |
|
196 | if board_settings.LIMIT_POSTING_SPEED and LAST_POST_TIME in \ | |
|
197 | self.session: | |
|
197 | 198 | now = time.time() |
|
198 | 199 | last_post_time = self.session[LAST_POST_TIME] |
|
199 | 200 |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -8,7 +8,7 b' msgid ""' | |||
|
8 | 8 | msgstr "" |
|
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
|
10 | 10 | "Report-Msgid-Bugs-To: \n" |
|
11 |
"POT-Creation-Date: 201 |
|
|
11 | "POT-Creation-Date: 2014-07-02 13:26+0300\n" | |
|
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
|
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
|
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -19,25 +19,14 b' msgstr ""' | |||
|
19 | 19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
|
20 | 20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" |
|
21 | 21 | |
|
22 |
#: static/js/refpopup.js:5 |
|
|
22 | #: static/js/refpopup.js:58 | |
|
23 | 23 | msgid "Loading..." |
|
24 | 24 | msgstr "ΠΠ°Π³ΡΡΠ·ΠΊΠ°..." |
|
25 | 25 | |
|
26 |
#: static/js/refpopup.js:7 |
|
|
26 | #: static/js/refpopup.js:77 | |
|
27 | 27 | msgid "Post not found" |
|
28 | 28 | msgstr "Π‘ΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½ΠΎ" |
|
29 | 29 | |
|
30 |
#: static/js/thread.js: |
|
|
31 | msgid "Normal" | |
|
32 | msgstr "ΠΠΎΡΠΌΠ°Π»ΡΠ½ΡΠΉ" | |
|
33 | ||
|
34 | #: static/js/thread.js:33 | |
|
35 | msgid "Gallery" | |
|
36 | msgstr "ΠΠ°Π»Π΅ΡΠ΅Ρ" | |
|
37 | ||
|
38 | #: static/js/thread_update.js:177 | |
|
39 | msgid "[new posts]" | |
|
40 | msgstr "[Π½ΠΎΠ²ΡΠ΅ ΠΏΠΎΡΡΡ]" | |
|
41 | ||
|
42 | #~ msgid "Replies" | |
|
43 | #~ msgstr "ΠΡΠ²Π΅ΡΡ" | |
|
30 | #: static/js/thread_update.js:279 | |
|
31 | msgid "Sending message..." | |
|
32 | msgstr "ΠΡΠΏΡΠ°Π²ΠΊΠ° ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΡ..." No newline at end of file |
@@ -15,4 +15,6 b" DEFAULT_THEME = 'md'" | |||
|
15 | 15 | LAST_REPLIES_COUNT = 3 |
|
16 | 16 | |
|
17 | 17 | # Enable archiving threads instead of deletion when the thread limit is reached |
|
18 | ARCHIVE_THREADS = True No newline at end of file | |
|
18 | ARCHIVE_THREADS = True | |
|
19 | # Limit posting speed | |
|
20 | LIMIT_POSTING_SPEED = False No newline at end of file |
@@ -27,7 +27,7 b' var THREAD_UPDATE_DELAY = 10000;' | |||
|
27 | 27 | |
|
28 | 28 | var loading = false; |
|
29 | 29 | var lastUpdateTime = null; |
|
30 | var unreadPosts = 0 | |
|
30 | var unreadPosts = 0; | |
|
31 | 31 | |
|
32 | 32 | function blink(node) { |
|
33 | 33 | var blinkCount = 2; |
@@ -226,7 +226,7 b' function updateOnPost(response, statusTe' | |||
|
226 | 226 | var json = $.parseJSON(response); |
|
227 | 227 | var status = json.status; |
|
228 | 228 | |
|
229 | form.children('.form-errors').remove(); | |
|
229 | showAsErrors(form, ''); | |
|
230 | 230 | |
|
231 | 231 | if (status === 'ok') { |
|
232 | 232 | resetForm(form); |
@@ -238,12 +238,25 b' function updateOnPost(response, statusTe' | |||
|
238 | 238 | |
|
239 | 239 | var error = fieldErrors.errors; |
|
240 | 240 | |
|
241 | var errorList = $('<div class="form-errors">' + error | |
|
241 | showAsErrors(form, error); | |
|
242 | } | |
|
243 | } | |
|
244 | } | |
|
245 | ||
|
246 | /** | |
|
247 | * Show text in the errors row of the form. | |
|
248 | * @param form | |
|
249 | * @param text | |
|
250 | */ | |
|
251 | function showAsErrors(form, text) { | |
|
252 | form.children('.form-errors').remove(); | |
|
253 | ||
|
254 | if (text.length > 0) { | |
|
255 | var errorList = $('<div class="form-errors">' + text | |
|
242 | 256 |
|
|
243 | 257 |
|
|
244 | 258 |
|
|
245 | 259 | } |
|
246 | } | |
|
247 | 260 | |
|
248 | 261 | /** |
|
249 | 262 | * Run js methods that are usually run on the document, on the new post |
@@ -257,11 +270,14 b' function processNewPost(post) {' | |||
|
257 | 270 | initAutoupdate(); |
|
258 | 271 | |
|
259 | 272 | // Post form data over AJAX |
|
260 |
var threadId = $('div.thread').children('.post').first().attr('id'); |
|
|
273 | var threadId = $('div.thread').children('.post').first().attr('id'); | |
|
261 | 274 | |
|
262 | 275 | var form = $('#form'); |
|
263 | 276 | |
|
264 | 277 | var options = { |
|
278 | beforeSubmit: function(arr, $form, options) { | |
|
279 | showAsErrors($('form'), gettext('Sending message...')); | |
|
280 | }, | |
|
265 | 281 | success: updateOnPost, |
|
266 | 282 | url: '/api/add_post/' + threadId + '/' |
|
267 | 283 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now