X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/6ebde88b50458c1ba0d81d42ab3bc59e131537b1..9a977e5ab9fbc074e28aeb85c90a8707ffd66158:/forum/skins/default/media/js/osqa.main.js?ds=inline diff --git a/forum/skins/default/media/js/osqa.main.js b/forum/skins/default/media/js/osqa.main.js index 8a3dbf9..0c532e3 100644 --- a/forum/skins/default/media/js/osqa.main.js +++ b/forum/skins/default/media/js/osqa.main.js @@ -2,6 +2,7 @@ * We do not want the CSRF protection enabled for the AJAX post requests, it causes only trouble. * Get the csrftoken cookie and pass it to the X-CSRFToken HTTP request property. */ + $('html').ajaxSend(function(event, xhr, settings) { function getCookie(name) { var cookieValue = null; @@ -24,6 +25,10 @@ $('html').ajaxSend(function(event, xhr, settings) { } }); +function canned_comment(post_id, comment) { + $('#comment-' + post_id + '-form textarea').val(comment); +} + var response_commands = { refresh_page: function() { window.location.reload(true) @@ -123,10 +128,6 @@ var response_commands = { $('#comment-' + comment_id).slideDown('slow'); }, - canned_comment: function(post_id, comment) { - $('#comment-' + post_id + '-form textarea').val(comment); - }, - update_comment: function(comment_id, comment_text) { var $comment = $('#comment-' + comment_id); $comment.find('.comment-text').html(comment_text); @@ -732,7 +733,7 @@ function pickedTags(){ tag_link.attr('rel','tag'); tag_link.attr('href', scriptUrl + $.i18n._('tags/') + tagname + '/'); tag_link.html(tagname); - var del_link = $(''); + var del_link = $(''); del_link.addClass('delete-icon'); del_link.attr('src', mediaUrl('media/images/close-small-dark.png'));