summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_nat_1to1.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_1to1.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_1to1.php')
-rw-r--r--src/usr/local/www/firewall_nat_1to1.php35
1 files changed, 7 insertions, 28 deletions
diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php
index e59af92..dd6df85 100644
--- a/src/usr/local/www/firewall_nat_1to1.php
+++ b/src/usr/local/www/firewall_nat_1to1.php
@@ -245,9 +245,9 @@ display_top_tabs($tab_array);
</td>
<td>
- <a class="btn btn-xs btn-info" title="<?=gettext("Edit rule")?>" href="firewall_nat_1to1.php?id=<?=$i?>"><?=gettext("Edit")?></a>
- <a class="btn btn-xs btn-danger" title="<?=gettext("Delete rule")?>" href="firewall_nat_1to1.php?act=del&amp;id=<?=$i?>"><?=gettext("Del")?></a>
- <a class="btn btn-xs btn-success" title="<?=gettext("Add a new rule based on this one")?>" href="firewall_nat_1to1_edit.php?dup=<?=$i?>"><?=gettext("Clone")?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit rule")?>" href="firewall_nat_1to1.php?id=<?=$i?>"></a>
+ <a class="fa fa-clone" title="<?=gettext("Add a new rule based on this one")?>" href="firewall_nat_1to1_edit.php?dup=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete rule")?>" href="firewall_nat_1to1.php?act=del&amp;id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this rule?")?>')"></a>
</td>
</tr>
@@ -280,37 +280,16 @@ print_info_box(gettext('Depending on the way your WAN connection is setup, you m
</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;
+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