Show More
@@ -317,17 +317,19 b' function processNewPost(post) {' | |||||
317 |
|
317 | |||
318 | var form = $('#form'); |
|
318 | var form = $('#form'); | |
319 |
|
319 | |||
320 | var options = { |
|
320 | if (form.length > 0) { | |
321 | beforeSubmit: function(arr, $form, options) { |
|
321 | var options = { | |
322 | showAsErrors($('form'), gettext('Sending message...')); |
|
322 | beforeSubmit: function(arr, $form, options) { | |
323 | }, |
|
323 | showAsErrors($('form'), gettext('Sending message...')); | |
324 | success: updateOnPost, |
|
324 | }, | |
325 | url: '/api/add_post/' + threadId + '/' |
|
325 | success: updateOnPost, | |
326 | }; |
|
326 | url: '/api/add_post/' + threadId + '/' | |
|
327 | }; | |||
327 |
|
328 | |||
328 | form.ajaxForm(options); |
|
329 | form.ajaxForm(options); | |
329 |
|
330 | |||
330 | resetForm(form); |
|
331 | resetForm(form); | |
|
332 | } | |||
331 | } |
|
333 | } | |
332 |
|
334 | |||
333 | $('#autoupdate').click(getThreadDiff); |
|
335 | $('#autoupdate').click(getThreadDiff); |
@@ -61,12 +61,12 b'' | |||||
61 | </div> |
|
61 | </div> | |
62 |
|
62 | |||
63 | <script src="{% static 'js/jquery.form.min.js' %}"></script> |
|
63 | <script src="{% static 'js/jquery.form.min.js' %}"></script> | |
64 | <script src="{% static 'js/thread_update.js' %}"></script> |
|
|||
65 | <script src="{% static 'js/3party/centrifuge.js' %}"></script> |
|
|||
66 | {% endif %} |
|
64 | {% endif %} | |
67 |
|
65 | |||
68 | <script src="{% static 'js/form.js' %}"></script> |
|
66 | <script src="{% static 'js/form.js' %}"></script> | |
69 | <script src="{% static 'js/thread.js' %}"></script> |
|
67 | <script src="{% static 'js/thread.js' %}"></script> | |
|
68 | <script src="{% static 'js/thread_update.js' %}"></script> | |||
|
69 | <script src="{% static 'js/3party/centrifuge.js' %}"></script> | |||
70 |
|
70 | |||
71 | {% endcache %} |
|
71 | {% endcache %} | |
72 | {% endblock %} |
|
72 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now