You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/07/30 23:03:34 UTC
git commit: [#5543] Require confirmation on post delete
Updated Branches:
refs/heads/tv/5543 [created] f757331c3
[#5543] Require confirmation on post delete
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/f757331c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f757331c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f757331c
Branch: refs/heads/tv/5543
Commit: f757331c3e4be56873f4332e83498fef6274c82a
Parents: be9d822
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Jul 30 21:03:18 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Jul 30 21:03:18 2013 +0000
----------------------------------------------------------------------
Allura/allura/lib/widgets/discuss.py | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f757331c/Allura/allura/lib/widgets/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py
index e62a993..eaec991 100644
--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -289,6 +289,9 @@ class Post(HierWidget):
$('.moderate_post', post).click(function(e){
e.preventDefault();
var mod = $(this).text();
+ if (mod === 'Delete' && !confirm('Really delete this post?')) {
+ return;
+ }
var id_post = $(post).attr('id');
$.ajax({
type: 'POST',