changeset 4328:93e5683e3d2e

comments: introduce javascript confirm prompt for deleting comments - it was too easy (Arguably it shouldn't be possible to delete comments at all ...)
author Mads Kiilerich <madski@unity3d.com>
date Fri, 18 Jul 2014 18:44:54 +0200
parents 64d6e8e298a4
children f54dca244402
files kallithea/templates/changeset/changeset_file_comment.html
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/changeset/changeset_file_comment.html	Mon Jun 17 18:23:13 2013 +0200
+++ b/kallithea/templates/changeset/changeset_file_comment.html	Fri Jul 18 18:44:54 2014 +0200
@@ -45,7 +45,7 @@
 
       <a class="permalink" href="#comment-${co.comment_id}">&para;</a>
       %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or co.author.user_id == c.authuser.user_id:
-          <div onClick="deleteComment(${co.comment_id})" class="buttons delete-comment btn btn-mini">${_('Delete')}</div>
+          <div onClick="confirm('${_("Delete comment?")}') && deleteComment(${co.comment_id})" class="buttons delete-comment btn btn-mini">${_('Delete')}</div>
       %endif
       </div>
       <div class="text">