From 00833eeafd6e0f71390504ac10ddf86bbaceb39f Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sun, 15 Sep 2013 14:03:27 +1000 Subject: js/ajax.js: post with ajax --- js/quick-reply.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'js/quick-reply.js') diff --git a/js/quick-reply.js b/js/quick-reply.js index 824286f6..5f81f51e 100644 --- a/js/quick-reply.js +++ b/js/quick-reply.js @@ -123,6 +123,9 @@ var show_quick_reply = function(){ } // Move anti-spam nonsense and remove + $th.contents().filter(function() { + return this.nodeType == 3; // Node.TEXT_NODE + }).remove(); $th.contents().appendTo($dummyStuff); $th.remove(); @@ -180,7 +183,9 @@ var show_quick_reply = function(){ }); $postForm.find('textarea[name="body"]').removeAttr('id').removeAttr('cols').attr('placeholder', _('Comment')); - + + $postForm.find('textarea:not([name="body"]),input[type="hidden"]').appendTo($dummyStuff); + $postForm.find('br').remove(); $postForm.find('table').prepend('' + _('Quick Reply') + ''); @@ -232,6 +237,8 @@ var show_quick_reply = function(){ } $postForm.show(); + $(window).trigger('quick-reply'); + $origPostForm = $('form[name="post"]'); $(window).ready(function() { -- cgit v1.3