* We do not want the CSRF protection enabled for the AJAX post requests, it causes only trouble.\r
* Get the csrftoken cookie and pass it to the X-CSRFToken HTTP request property.\r
*/\r
+\r
$('html').ajaxSend(function(event, xhr, settings) {\r
function getCookie(name) {\r
var cookieValue = null;\r
}\r
});\r
\r
+function canned_comment(post_id, comment) {\r
+ $('#comment-' + post_id + '-form textarea').val(comment);\r
+}\r
+\r
var response_commands = {\r
refresh_page: function() {\r
window.location.reload(true)\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
tag_link.attr('rel','tag');\r
tag_link.attr('href', scriptUrl + $.i18n._('tags/') + tagname + '/');\r
tag_link.html(tagname);\r
- var del_link = $('<img></img>');\r
+ var del_link = $('<img />');\r
del_link.addClass('delete-icon');\r
del_link.attr('src', mediaUrl('media/images/close-small-dark.png'));\r
\r