diff --git a/Web/Presenters/templates/components/comment.xml b/Web/Presenters/templates/components/comment.xml index c4e0de08..37c9cba2 100644 --- a/Web/Presenters/templates/components/comment.xml +++ b/Web/Presenters/templates/components/comment.xml @@ -44,7 +44,7 @@ {if !$timeOnly} {if $comment->canBeDeletedBy($thisUser)} | - {_delete} + {_delete} {/if} {if $comment->canBeEditedBy($thisUser)} | diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 7d3b7139..9d529b5c 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -606,6 +606,21 @@ function reportClub(club_id) { ]); } +$(document).on("click", "#_ajaxDelete", function(e) { + MessageBox(tr('warning'), tr('question_confirm'), [ + tr('yes'), + tr('no') + ], [ + () => { + window.router.route(e.target.href) + }, + Function.noop + ]); + + e.stopPropagation() + return e.preventDefault(); +}); + $(document).on("click", "#_photoDelete, #_videoDelete, #_anotherDelete", function(e) { var formHtml = "
"; formHtml += "";