diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-10-29 10:17:50 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-10-29 10:19:00 -0400 |
commit | 65a0e193c7ca1ccfe29693fcfa3719356de97e48 (patch) | |
tree | 5d77a0be230e41bf0e01c3d19517a64f29aa8fe8 /src/usr/local/www/firewall_nat_out.php | |
parent | 76827b9cedc8a816023aa2b882844b883a7fa8c8 (diff) | |
download | pfsense-65a0e193c7ca1ccfe29693fcfa3719356de97e48.zip pfsense-65a0e193c7ca1ccfe29693fcfa3719356de97e48.tar.gz |
Completed #5356
Refactor row toggle javascript
Diffstat (limited to 'src/usr/local/www/firewall_nat_out.php')
-rw-r--r-- | src/usr/local/www/firewall_nat_out.php | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php index a17789c..70c2afc 100644 --- a/src/usr/local/www/firewall_nat_out.php +++ b/src/usr/local/www/firewall_nat_out.php @@ -304,7 +304,7 @@ print($form); <div class="panel panel-default"> <div class="panel-heading"><?=gettext('Mappings')?></div> <div class="panel-body table-responsive"> - <table class="table table-striped table-hover table-condensed"> + <table class="table table-hover table-condensed"> <thead> <tr> <th><!-- checkbox --></th> @@ -499,10 +499,10 @@ print($form); <!-- Action icons --> <td> - <a class="icon icon-pencil" title="<?=gettext("Edit mapping")?>" href="firewall_nat_out_edit.php?id=<?=$i?>"></a> - <a class="icon icon-ban-circle" title="<?=gettext("Delete mapping")?>" href="firewall_nat_out.php?act=del&id=<?=$i?>" + <a class="fa fa-pencil" title="<?=gettext("Edit mapping")?>" href="firewall_nat_out_edit.php?id=<?=$i?>"></a> + <a class="fa fa-clone" title="<?=gettext("Add a new mapping based on this one")?>" href="firewall_nat_out_edit.php?dup=<?=$i?>"></a> + <a class="fa fa-trash" title="<?=gettext("Delete mapping")?>" href="firewall_nat_out.php?act=del&id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this mapping?")?>')"></a> - <a class="icon icon-plus" title="<?=gettext("Add a new mapping based on this one")?>" href="firewall_nat_out_edit.php?dup=<?=$i?>"></a> </td> <?php $i++; @@ -534,7 +534,7 @@ if ($mode == "automatic" || $mode == "hybrid"): <div class="panel panel-default"> <div class="panel-heading"><?=gettext("Automatic rules:")?></div> <div class="panel-body table-responsive"> - <table class="table table-striped table-hover table-condensed"> + <table class="table table-hover table-condensed"> <thead> <tr> <th><!-- status --></th> @@ -652,37 +652,15 @@ endif; </div> <script> -function fr_toggle(id, prefix) { - if (!prefix) - prefix = 'fr'; - - var checkbox = document.getElementById(prefix + 'c' + id); - checkbox.checked = !checkbox.checked; - fr_bgcolor(id, prefix); -} - -function fr_bgcolor(id, prefix) { - if (!prefix) - prefix = 'fr'; - - var row = document.getElementById(prefix + id); - var checkbox = document.getElementById(prefix + 'c' + id); - var cells = row.getElementsByTagName('td'); - var cellcnt = cells.length; - - for (i = 0; i < cellcnt; i++) { - cells[i].style.backgroundColor = checkbox.checked ? "#DDF4FF" : "#FFFFFF"; - } -} -</script> - -<script> events.push(function() { - // Make rules draggable/sortable + stripe_table(); + + // Make rules sortable $('table tbody.user-entries').sortable({ cursor: 'grabbing', update: function(event, ui) { $('#order-store').removeAttr('disabled'); + stripe_table(); } }); |