You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/10/02 23:30:28 UTC
[30/34] git commit: [#4637] Added confirmation before removing short
URLs
[#4637] Added confirmation before removing short URLs
Signed-off-by: Cory Johns <jo...@geek.net>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7bb1cd41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7bb1cd41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7bb1cd41
Branch: refs/heads/db/4968
Commit: 7bb1cd41a321f0c9b8df645d23b9630da86db70f
Parents: 773e7e2
Author: Cory Johns <jo...@geek.net>
Authored: Thu Sep 27 19:00:14 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Thu Sep 27 19:10:45 2012 +0000
----------------------------------------------------------------------
ForgeShortUrl/forgeshorturl/templates/index.html | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7bb1cd41/ForgeShortUrl/forgeshorturl/templates/index.html
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/templates/index.html b/ForgeShortUrl/forgeshorturl/templates/index.html
index 0ea37bf..c145182 100644
--- a/ForgeShortUrl/forgeshorturl/templates/index.html
+++ b/ForgeShortUrl/forgeshorturl/templates/index.html
@@ -89,11 +89,13 @@
$(function() {
var cval = $.cookie('_session_id');
$('#remove-url-{{su.short_name}}').click(function() {
- var row = $(this).parents('tr');
- var data = {_session_id: cval, shorturl: '{{ su.short_name }}'};
- $.post(this.href, data, function(data, status, xhr) {
- if (data.status == 'ok') row.remove();
- });
+ if (confirm('Remove URL {{su.short_name}}?')) {
+ var row = $(this).parents('tr');
+ var data = {_session_id: cval, shorturl: '{{ su.short_name }}'};
+ $.post(this.href, data, function(data, status, xhr) {
+ if (data.status == 'ok') row.remove();
+ });
+ }
return false;
});
});