diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-05 09:05:52 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-05 09:05:52 -0500 |
commit | 0619c9db228ca94339bccd26f109ae2b2b389fa1 (patch) | |
tree | 8a6305fb0f56e3c5eb83f610cd3353f292db2934 /src/usr/local/www/jquery | |
parent | c10cb19609cc399f70fbf4e3261fd90f3079c122 (diff) | |
download | pfsense-0619c9db228ca94339bccd26f109ae2b2b389fa1.zip pfsense-0619c9db228ca94339bccd26f109ae2b2b389fa1.tar.gz |
Convert system_certmanager.php to font awesome icons
Automatically add confirmation dialog to all fa-trash icons
Diffstat (limited to 'src/usr/local/www/jquery')
-rw-r--r-- | src/usr/local/www/jquery/pfSense.js | 7 |
1 files changed, 4 insertions, 3 deletions
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); }); |