replacing prototype by jQuery on firewall_*

This commit is contained in:
Vinicius Coque 2011-10-10 20:59:32 -03:00
parent 0491163b1a
commit df39dd8ab4
3 changed files with 26 additions and 26 deletions

View File

@ -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');
}
}
//-->

View File

@ -907,13 +907,13 @@ if($_REQUEST['undodrag']) {
<?php endfor; ?>
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=<?=htmlspecialchars($if);?>&dragdroporder=true&' + Sortable.serialize('dragtable', 'tr');
return;
}
$('loading').hide();
jQuery('#loading').hide();
</script>
</form>
<?php include("fend.inc"); ?>

View File

@ -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;