From 0619c9db228ca94339bccd26f109ae2b2b389fa1 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Thu, 5 Nov 2015 09:05:52 -0500 Subject: Convert system_certmanager.php to font awesome icons Automatically add confirmation dialog to all fa-trash icons --- src/usr/local/www/jquery/pfSense.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/usr/local/www/jquery') diff --git a/src/usr/local/www/jquery/pfSense.js b/src/usr/local/www/jquery/pfSense.js index 1e74d63..d346403 100644 --- a/src/usr/local/www/jquery/pfSense.js +++ b/src/usr/local/www/jquery/pfSense.js @@ -119,16 +119,16 @@ $(function() { input.change(); }); - // Add confirm to all btn-danger buttons + // Add confirm to all btn-danger buttons and fa-trash icons // Use element title in the confirmation message, or if not available // the element value - $('.btn-danger').on('click', function(e){ + $('.btn-danger, .fa-trash').on('click', function(e){ var msg = $.trim(this.textContent); if(!msg) var msg = $.trim(this.value).toLowerCase(); - var q = 'Are you sure you wish to '+ msg +'?'; + var q = 'Are you Sure you wish to '+ msg +'?'; if ($(this).attr('title') != undefined) q = $(this).attr('title')+'?'; @@ -178,6 +178,7 @@ $(function() { $('input[type=checkbox][data-toggle="collapse"]:not(:checked)').each(function() { $( $(this).data('target') ).addClass('collapse'); }); + $('input[type=checkbox][data-toggle="disable"]:not(:checked)').each(function() { $( $(this).data('target') ).prop('disabled', true); }); -- cgit v1.1