incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#5543] Require confirmation on post delete
Date Wed, 31 Jul 2013 18:49:14 GMT
Updated Branches:
  refs/heads/master 158cd46bc -> 4343ee036


[#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/4343ee03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4343ee03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4343ee03

Branch: refs/heads/master
Commit: 4343ee0366e682727db54bb4ac8694ef6f0ca391
Parents: 158cd46
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Jul 30 21:03:18 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Jul 31 18:49:08 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/4343ee03/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