]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/media/js/osqa.main.js
OSQA-719, implements a new feature that allows administrators and moderators to manag...
[osqa.git] / forum / skins / default / media / js / osqa.main.js
index ebc9cf072415f83d9169977b192694fc5a246827..8a3dbf9a44b227e90cd333e4404fd95a0ded063b 100644 (file)
@@ -123,6 +123,10 @@ var response_commands = {
         $('#comment-' + comment_id).slideDown('slow');\r
     },\r
 \r
         $('#comment-' + comment_id).slideDown('slow');\r
     },\r
 \r
+    canned_comment: function(post_id, comment) {\r
+        $('#comment-' + post_id + '-form textarea').val(comment);\r
+    },\r
+\r
     update_comment: function(comment_id, comment_text) {\r
         var $comment = $('#comment-' + comment_id);\r
         $comment.find('.comment-text').html(comment_text);\r
     update_comment: function(comment_id, comment_text) {\r
         var $comment = $('#comment-' + comment_id);\r
         $comment.find('.comment-text').html(comment_text);\r
@@ -572,7 +576,7 @@ $(function() {
                 }\r
 \r
                 start_command();\r
                 }\r
 \r
                 start_command();\r
-                $.post($form.attr('action'), post_data, function(data) {\r
+                $.post($form.attr('action'), $form.serialize(), function(data) {\r
                     process_ajax_response(data, evt, function(error) {\r
                         if (!error) {\r
                             cleanup_form();\r
                     process_ajax_response(data, evt, function(error) {\r
                         if (!error) {\r
                             cleanup_form();\r