summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-03-05 15:06:29 +0000
committerBill Marquette <billm@pfsense.org>2005-03-05 15:06:29 +0000
commitd0ae0d040357cada7536ac9d7e1b8da9355456a5 (patch)
tree3b486526a5244a77dd220fdf48000ec608189ad0
parent6a8d35cab6d1d48f7754984079eafb1a6917846b (diff)
downloadpfsense-d0ae0d040357cada7536ac9d7e1b8da9355456a5.zip
pfsense-d0ae0d040357cada7536ac9d7e1b8da9355456a5.tar.gz
dynamic detection of cell count
-rwxr-xr-xusr/local/www/firewall_rules.php10
-rwxr-xr-xusr/local/www/row_toggle.js9
2 files changed, 11 insertions, 8 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index e0deebd..aa91b81 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -220,19 +220,19 @@ if (isset($_POST['del_x'])) {
<br><img src="<?=$iconfn;?>.gif" width="11" height="15" border="0">
<?php endif; ?>
</td>
- <td class="listlr" onClick="fr_toggle(<?=$nrules;?>)">
+ <td class="listlr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>">
<?=$textss;?><?php if (isset($filterent['protocol'])) echo strtoupper($filterent['protocol']); else echo "*"; ?><?=$textse;?>
</td>
- <td class="listr" onClick="fr_toggle(<?=$nrules;?>)">
+ <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>">
<?=$textss;?><?php echo htmlspecialchars(pprint_address($filterent['source'])); ?><?=$textse;?>
</td>
- <td class="listr" onClick="fr_toggle(<?=$nrules;?>)">
+ <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>">
<?=$textss;?><?php echo htmlspecialchars(pprint_port($filterent['source']['port'])); ?><?=$textse;?>
</td>
- <td class="listr" onClick="fr_toggle(<?=$nrules;?>)">
+ <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>">
<?=$textss;?><?php echo htmlspecialchars(pprint_address($filterent['destination'])); ?><?=$textse;?>
</td>
- <td class="listr" onClick="fr_toggle(<?=$nrules;?>)">
+ <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>">
<?=$textss;?><?php echo htmlspecialchars(pprint_port($filterent['destination']['port'])); ?><?=$textse;?>
</td>
<td class="listbg" onClick="fr_toggle(<?=$nrules;?>)" bcolor="#990000"><font color="white">
diff --git a/usr/local/www/row_toggle.js b/usr/local/www/row_toggle.js
index 4e8ad9a..acefb30 100755
--- a/usr/local/www/row_toggle.js
+++ b/usr/local/www/row_toggle.js
@@ -6,10 +6,13 @@ function fr_toggle(id) {
function fr_bgcolor(id) {
var row = document.getElementById('fr' + id);
var checkbox = document.getElementById('frc' + id);
- var cells = row.getElementsByTagName("td");
+ var cells = row.getElementsByTagName('td');
+ var cellcnt = cells.length;
- for (i = 2; i <= 6; i++) {
- cells[i].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#FFFFFF";
+ for (i = 2; i <= cellcnt; i++) {
+ // Check for cells with frd id only
+ if (cells[i].id == "frd" + id)
+ cells[i].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#FFFFFF";
}
//cells[7].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#990000";
}
OpenPOWER on IntegriCloud