summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_nat.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-10-29 10:17:50 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-10-29 10:19:00 -0400
commit65a0e193c7ca1ccfe29693fcfa3719356de97e48 (patch)
tree5d77a0be230e41bf0e01c3d19517a64f29aa8fe8 /src/usr/local/www/firewall_nat.php
parent76827b9cedc8a816023aa2b882844b883a7fa8c8 (diff)
downloadpfsense-65a0e193c7ca1ccfe29693fcfa3719356de97e48.zip
pfsense-65a0e193c7ca1ccfe29693fcfa3719356de97e48.tar.gz
Completed #5356
Refactor row toggle javascript
Diffstat (limited to 'src/usr/local/www/firewall_nat.php')
-rw-r--r--src/usr/local/www/firewall_nat.php35
1 files changed, 7 insertions, 28 deletions
diff --git a/src/usr/local/www/firewall_nat.php b/src/usr/local/www/firewall_nat.php
index 2545072..87af5c2 100644
--- a/src/usr/local/www/firewall_nat.php
+++ b/src/usr/local/www/firewall_nat.php
@@ -352,9 +352,9 @@ foreach ($a_nat as $natent):
<?=htmlspecialchars($natent['descr'])?>
</td>
<td>
- <a class="btn btn-xs btn-info" title="<?=gettext("Edit rule"); ?>" href="firewall_nat_edit.php?id=<?=$i?>"><?=gettext("Edit"); ?></a>
- <a class="btn btn-xs btn-danger" title="<?=gettext("Delete rule")?>" href="firewall_nat.php?act=del&amp;id=<?=$i?>"><?=gettext("Del")?></a>
- <a class="btn btn-xs btn-success" title="<?=gettext("Add a new NAT based on this one")?>" href="firewall_nat_edit.php?dup=<?=$i?>"><?=gettext("Clone")?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit rule"); ?>" href="firewall_nat_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-clone" title="<?=gettext("Add a new NAT based on this one")?>" href="firewall_nat_edit.php?dup=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete rule")?>" href="firewall_nat.php?act=del&amp;id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this rule?")?>')"></a>
</td>
</tr>
<?php
@@ -375,37 +375,16 @@ endforeach;
</form>
<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;
+events.push(function() {
- for (i = 0; i < cellcnt-1; i++) {
- cells[i].style.backgroundColor = checkbox.checked ? "#DDF4FF" : "#FFFFFF";
- }
-}
-</script>
+ stripe_table();
-<script>
-events.push(function() {
- // Make rules draggable/sortable
+ // Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
update: function(event, ui) {
$('#order-store').removeAttr('disabled');
+ stripe_table();
}
});
OpenPOWER on IntegriCloud