diff options
Diffstat (limited to 'src/usr/local/www/jquery/pfSense.js')
-rw-r--r-- | src/usr/local/www/jquery/pfSense.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/usr/local/www/jquery/pfSense.js b/src/usr/local/www/jquery/pfSense.js index d1c9f65..6f8642f 100644 --- a/src/usr/local/www/jquery/pfSense.js +++ b/src/usr/local/www/jquery/pfSense.js @@ -51,8 +51,7 @@ $(function() { var group = $(this).parents('div.form-group'); var clone = group.clone(true); - clone.find('*').val(''); //removeAttr('value'); -// clone.find('*').removeAttr('value'); + clone.find('*').val(''); clone.appendTo(group.parent()); }); @@ -81,8 +80,7 @@ $(function() { var group = $(this).parents('div.form-group'); var clone = group.clone(true); - clone.find('*').removeAttr('value'); -// clone.find('*').val(''); + clone.find('*').removeAttr('value'); clone.appendTo(group.parent()); }); @@ -122,8 +120,15 @@ $(function() { }); // Add confirm to all btn-danger buttons + // Use element title in the confirmation message, or if not available + // the element value $('.btn-danger').on('click', function(e){ - var q = 'Are you sure you wish to '+ $.trim(this.textContent) +'?'; + var msg = $.trim(this.textContent); + + if(!msg) + var msg = $.trim(this.value); + + var q = 'Are you sure you wish to '+ msg +'?'; if ($(this).attr('title') != undefined) q = $(this).attr('title')+'?'; |