diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-18 13:27:09 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-18 13:28:05 -0500 |
commit | 88afaf7d77c4909ef0b552270254d34adc298d97 (patch) | |
tree | 05878901af0a459abf0176353524a627868b3092 /src/usr | |
parent | f633de3388610244c923578ab92c6445b51b95a4 (diff) | |
download | pfsense-88afaf7d77c4909ef0b552270254d34adc298d97.zip pfsense-88afaf7d77c4909ef0b552270254d34adc298d97.tar.gz |
Fixed #5779
Save/restore group label on delete row
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/jquery/pfSenseHelpers.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/usr/local/www/jquery/pfSenseHelpers.js b/src/usr/local/www/jquery/pfSenseHelpers.js index d9a599f..e9cc715 100644 --- a/src/usr/local/www/jquery/pfSenseHelpers.js +++ b/src/usr/local/www/jquery/pfSenseHelpers.js @@ -274,10 +274,21 @@ function renumber() { }); } -function delete_row(row) { - $('#' + row).parent('div').parent('div').remove(); +function delete_row(rowDelBtn) { + var label; + + // If we are deleting row zero, we need to save/restore the label + if (rowDelBtn == "deleterow0") { + label = $('#' + rowDelBtn).parent('div').parent('div').find('label').text(); + } + + $('#' + rowDelBtn).parent('div').parent('div').remove(); renumber(); checkLastRow(); + + if (rowDelBtn == "deleterow0") { + $('#' + rowDelBtn).parent('div').parent('div').find('label').text(label); + } } function checkLastRow() { |