From df39dd8ab4e41c3b668ce8dd9c8b86d7dcceb743 Mon Sep 17 00:00:00 2001 From: Vinicius Coque Date: Mon, 10 Oct 2011 20:59:32 -0300 Subject: [PATCH] replacing prototype by jQuery on firewall_* --- usr/local/www/firewall_nat_out_edit.php | 28 +++++++++++----------- usr/local/www/firewall_rules.php | 6 ++--- usr/local/www/firewall_virtual_ip_edit.php | 18 +++++++------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php index c21ad9ef50..a5be31388a 100755 --- a/usr/local/www/firewall_nat_out_edit.php +++ b/usr/local/www/firewall_nat_out_edit.php @@ -373,21 +373,21 @@ function proto_change() { } } function poolopts_change() { - if ($('target').options[$('target').selectedIndex].text.substring(0,4) == "Host") { - $('poolopts_tr').style.display = ''; - $('target_network').style.display = 'none'; - } else if ($('target').options[$('target').selectedIndex].text.substring(0,6) == "Subnet") { - $('poolopts_tr').style.display = ''; - $('target_network').style.display = 'none'; - } else if ($('target').options[$('target').selectedIndex].text.substring(0,5) == "Other") { - $('poolopts_tr').style.display = ''; - $('target_network').style.display = ''; + if (jQuery('#target option:selected').text().substring(0,4) == "Host") { + jQuery('#poolopts_tr').css('display',''); + jQuery('#target_network').css('display','none'); + } else if (jQuery('#target option:selected').text().substring(0,6) == "Subnet") { + jQuery('#poolopts_tr').css('display',''); + jQuery('#target_network').css('display','none'); + } else if (jQuery('#target option:selected').text().substring(0,5) == "Other") { + jQuery('#poolopts_tr').css('display',''); + jQuery('#target_network').css('display',''); } else { - $('poolopts').selectedIndex = 0; - $('poolopts_tr').style.display = 'none'; - $('target_network').style.display = 'none'; - $('targetip').value = ''; - $('targetip_subnet').value = '0'; + jQuery('#poolopts').prop('selectedIndex',0); + jQuery('#poolopts_tr').css('display','none'); + jQuery('#target_network').css('display','none'); + jQuery('#targetip').val(''); + jQuery('#targetip_subnet').val('0'); } } //--> diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index a2099741fd..d0827fbe45 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -907,13 +907,13 @@ if($_REQUEST['undodrag']) { function updateOrder(order) { if(document.getElementById("redboxtable")) - $('redboxtable').hide(); - $('loading').show(); + jQuery('#redboxtable').hide(); + jQuery('#loading').show(); document.body.style.cursor = 'wait'; document.location = 'firewall_rules.php?if=&dragdroporder=true&' + Sortable.serialize('dragtable', 'tr'); return; } - $('loading').hide(); + jQuery('#loading').hide(); diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 90a733c196..b8ba2ac32f 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -309,7 +309,7 @@ function enable_change(enable_over) { document.iform.subnet_bits.disabled = 0; document.iform.subnet.disabled = 0; document.iform.noexpand.disabled = 1; - $('noexpandrow').style.display = 'none'; + jQuery('#noexpandrow').css('display','none'); if (note.firstChild == null) { note.appendChild(carpnote); } else { @@ -325,7 +325,7 @@ function enable_change(enable_over) { document.iform.subnet_bits.disabled = 1; document.iform.subnet.disabled = 0; document.iform.noexpand.disabled = 0; - $('noexpandrow').style.display = ''; + jQuery('#noexpandrow').css('display',''); if (note.firstChild == null) { note.appendChild(proxyarpnote); } else { @@ -340,7 +340,7 @@ function enable_change(enable_over) { } document.iform.subnet.disabled = 0; document.iform.noexpand.disabled = 1; - $('noexpandrow').style.display = 'none'; + jQuery('#noexpandrow').css('display','none'); } if (get_radio_value(document.iform.mode) == "ipalias") { document.iform.type.disabled = 1; @@ -349,7 +349,7 @@ function enable_change(enable_over) { document.iform.subnet_bits.disabled = 0; document.iform.subnet.disabled = 0; document.iform.noexpand.disabled = 1; - $('noexpandrow').style.display = 'none'; + jQuery('#noexpandrow').css('display','none'); } if (get_radio_value(document.iform.mode) == "carpdev-dhcp") { document.iform.type.disabled = 1; @@ -364,7 +364,7 @@ function enable_change(enable_over) { document.iform.advskew.disabled = 0; document.iform.advbase.disabled = 0; document.iform.noexpand.disabled = 1; - $('noexpandrow').style.display = 'none'; + jQuery('#noexpandrow').css('display','none'); } typesel_change(); } @@ -374,13 +374,13 @@ function typesel_change() { document.iform.subnet.disabled = 0; if((get_radio_value(document.iform.mode) == "proxyarp")) document.iform.subnet_bits.disabled = 1; document.iform.noexpand.disabled = 1; - $('noexpandrow').style.display = 'none'; + jQuery('#noexpandrow').css('display','none'); break; case 1: // network document.iform.subnet.disabled = 0; document.iform.subnet_bits.disabled = 0; document.iform.noexpand.disabled = 0; - $('noexpandrow').style.display = ''; + jQuery('#noexpandrow').css('display',''); //document.iform.range_from.disabled = 1; //document.iform.range_to.disabled = 1; break; @@ -388,7 +388,7 @@ function typesel_change() { document.iform.subnet.disabled = 1; document.iform.subnet_bits.disabled = 1; document.iform.noexpand.disabled = 1; - $('noexpandrow').style.display = 'none'; + jQuery('#noexpandrow').css('display','none'); //document.iform.range_from.disabled = 0; //document.iform.range_to.disabled = 0; break; @@ -396,7 +396,7 @@ function typesel_change() { document.iform.subnet.disabled = 1; document.iform.subnet_bits.disabled = 0; document.iform.noexpand.disabled = 1; - $('noexpandrow').style.display = 'none'; + jQuery('#noexpandrow').css('display','none'); //document.iform.range_from.disabled = 0; //document.iform.range_to.disabled = 0; break;