You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/09/21 15:49:29 UTC
allura git commit: [#8238] Display js confirm when delete a screenshot
Repository: allura
Updated Branches:
refs/heads/master 1c28d5dc2 -> 0f77ad5b8
[#8238] Display js confirm when delete a screenshot
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/0f77ad5b
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/0f77ad5b
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/0f77ad5b
Branch: refs/heads/master
Commit: 0f77ad5b8a2d996e8ada1ce2baf1327a3eccbd0d
Parents: 1c28d5d
Author: Shalitha Suranga <sh...@gmail.com>
Authored: Fri Sep 21 11:08:46 2018 +0530
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Fri Sep 21 15:48:34 2018 +0000
----------------------------------------------------------------------
Allura/allura/lib/widgets/resources/js/screenshots.js | 5 +++++
Allura/allura/templates/widgets/project_screenshots.html | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/0f77ad5b/Allura/allura/lib/widgets/resources/js/screenshots.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/screenshots.js b/Allura/allura/lib/widgets/resources/js/screenshots.js
index d2a3d33..134fe09 100644
--- a/Allura/allura/lib/widgets/resources/js/screenshots.js
+++ b/Allura/allura/lib/widgets/resources/js/screenshots.js
@@ -32,5 +32,10 @@ $(function() {
});
});
+
+ $('.delete_screenshot_form').submit(function() {
+ return confirm('Really delete this screenshot?');
+ });
+
});
http://git-wip-us.apache.org/repos/asf/allura/blob/0f77ad5b/Allura/allura/templates/widgets/project_screenshots.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/project_screenshots.html b/Allura/allura/templates/widgets/project_screenshots.html
index 4bc1fc7..57102c7 100644
--- a/Allura/allura/templates/widgets/project_screenshots.html
+++ b/Allura/allura/templates/widgets/project_screenshots.html
@@ -39,7 +39,7 @@
<input type="submit" value="Save Changes">
{{lib.csrf_token()}}
</form>
- <form action="delete_screenshot" method="post">
+ <form action="delete_screenshot" method="post" class="delete_screenshot_form">
<input type="hidden" value="{{ss._id}}" name="id">
<input type="submit" value="Delete">
{{lib.csrf_token()}}