summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/jquery
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-11-05 10:46:09 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-11-05 10:46:09 -0500
commit33f0b0d57160b6335d586f78229730464c6583ce (patch)
treeb8550ccd8250d8a4ac531121695ff65a2967bf26 /src/usr/local/www/jquery
parent0619c9db228ca94339bccd26f109ae2b2b389fa1 (diff)
downloadpfsense-33f0b0d57160b6335d586f78229730464c6583ce.zip
pfsense-33f0b0d57160b6335d586f78229730464c6583ce.tar.gz
Delete confirmation vi fa-trash automated via pfSense.js
Diffstat (limited to 'src/usr/local/www/jquery')
-rw-r--r--src/usr/local/www/jquery/pfSense.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/usr/local/www/jquery/pfSense.js b/src/usr/local/www/jquery/pfSense.js
index d346403..45834e5 100644
--- a/src/usr/local/www/jquery/pfSense.js
+++ b/src/usr/local/www/jquery/pfSense.js
@@ -123,18 +123,20 @@ $(function() {
// Use element title in the confirmation message, or if not available
// the element value
$('.btn-danger, .fa-trash').on('click', function(e){
- var msg = $.trim(this.textContent);
-
- if(!msg)
- var msg = $.trim(this.value).toLowerCase();
+ if(!($(this).hasClass('no-confirm'))) {
+ var msg = $.trim(this.textContent);
- var q = 'Are you Sure you wish to '+ msg +'?';
+ if(!msg)
+ var msg = $.trim(this.value).toLowerCase();
+
+ var q = 'Are you Sure you wish to '+ msg +'?';
- if ($(this).attr('title') != undefined)
- q = $(this).attr('title')+'?';
+ if ($(this).attr('title') != undefined)
+ q = 'Are you Sure you wish to '+ $(this).attr('title') + '?';
- if (!confirm(q))
- e.preventDefault();
+ if (!confirm(q))
+ e.preventDefault();
+ }
});
// Add toggle-all when there are multiple checkboxes and none of them are radio buttons
OpenPOWER on IntegriCloud