allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#5543] Require confirmation on post delete
Date Tue, 30 Jul 2013 21:03:34 GMT
Updated Branches:
  refs/heads/tv/5543 [created] f757331c3


[#5543] Require confirmation on post delete

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@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 <tvansteenburgh@gmail.com>
Authored: Tue Jul 30 21:03:18 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@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',


Mime
View raw message