mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Converting javascript code from prototype to jQuery
This commit is contained in:
parent
fc4fa6de31
commit
ea1cea05ee
@ -2576,7 +2576,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
|
||||
addOption(jQuery('#gateway'), gwtext, name);
|
||||
// Auto submit form?
|
||||
//document.iform.submit();
|
||||
//$('status').innerHTML = '<img src="/themes/metallic/images/misc/loader.gif">';
|
||||
//jQuery('#status').html('<img src="/themes/metallic/images/misc/loader.gif">');
|
||||
} else {
|
||||
report_failure();
|
||||
}
|
||||
@ -2596,7 +2596,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
|
||||
addOption_v6(jQuery('#gatewayv6'), gwtext_v6, name);
|
||||
// Auto submit form?
|
||||
//document.iform.submit();
|
||||
//$('statusv6').innerHTML = '<img src="/themes/metallic/images/misc/loader.gif">';
|
||||
//jQuery('#statusv6').html('<img src="/themes/metallic/images/misc/loader.gif">');
|
||||
} else {
|
||||
report_failure_v6();
|
||||
}
|
||||
|
||||
@ -66,8 +66,8 @@ if($_REQUEST['generatekey']) {
|
||||
exec("rm /tmp/key64.private /tmp/key64.public");
|
||||
$alertmessage = gettext("You will need to recreate any existing Voucher Rolls due to the public and private key changes. Click cancel if you do not wish to recreate the vouchers.");
|
||||
echo <<<EOF
|
||||
\$('publickey').value = '{$publickey}';
|
||||
\$('privatekey').value = '{$privatekey}';
|
||||
jQuery('#publickey').val('{$publickey}');
|
||||
jQuery('#privatekey').val('{$privatekey}');
|
||||
alert('{$alertmessage}');
|
||||
new Effect.Highlight('publickey');
|
||||
new Effect.Highlight('privatekey');
|
||||
@ -331,12 +331,12 @@ include("head.inc");
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function generatenewkey() {
|
||||
$('publickey').value = 'One moment please...';
|
||||
$('privatekey').value = 'One moment please...';
|
||||
new Ajax.Request("services_captiveportal_vouchers.php?zone=<?php echo($cpzone); ?>&generatekey=true", {
|
||||
method: 'get',
|
||||
onSuccess: function(transport) {
|
||||
eval(transport.responseText);
|
||||
jQuery('#publickey').val('One moment please...');
|
||||
jQuery('#privatekey').val('One moment please...');
|
||||
jQuery.ajax("services_captiveportal_vouchers.php?zone=<?php echo($cpzone); ?>&generatekey=true", {
|
||||
type: 'get',
|
||||
success: function(data) {
|
||||
eval(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -351,8 +351,8 @@ function before_save() {
|
||||
document.iform.msgnoaccess.disabled = false;
|
||||
document.iform.msgexpired.disabled = false;
|
||||
for(var x=0; x < <?php echo count($a_roll); ?>; x++)
|
||||
$('addeditdelete' + x).show();
|
||||
$('addnewroll').show();
|
||||
jQuery('#addeditdelete' + x).show();
|
||||
jQuery('#addnewroll').show();
|
||||
}
|
||||
function enable_change(enable_change) {
|
||||
var endis;
|
||||
@ -381,12 +381,12 @@ function enable_change(enable_change) {
|
||||
document.iform.msgnoaccess.disabled = true;
|
||||
document.iform.msgexpired.disabled = true;
|
||||
for(var x=0; x < <?php echo count($a_roll); ?>; x++)
|
||||
$('addeditdelete' + x).hide();
|
||||
$('addnewroll').hide();
|
||||
jQuery('#addeditdelete' + x).hide();
|
||||
jQuery('#addnewroll').hide();
|
||||
} else {
|
||||
for(var x=0; x < <?php echo count($a_roll); ?>; x++)
|
||||
$('addeditdelete' + x).show();
|
||||
$('addnewroll').show();
|
||||
jQuery('#addeditdelete' + x).show();
|
||||
jQuery('#addnewroll').show();
|
||||
}
|
||||
}
|
||||
//-->
|
||||
|
||||
@ -163,8 +163,8 @@ include("head.inc");
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
function check_deps() {
|
||||
if ($('hostres').checked == true) {
|
||||
$('mibii').checked = true;
|
||||
if (jQuery('#hostres').prop('checked') == true) {
|
||||
jQuery('#mibii').prop('checked',true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -312,10 +312,10 @@ function autokey_change() {
|
||||
|
||||
function useproxy_changed() {
|
||||
|
||||
if ($('proxy_authtype').value != 'none') {
|
||||
$('proxy_authtype_opts').show();
|
||||
if (jQuery('#proxy_authtype').val() != 'none') {
|
||||
jQuery('#proxy_authtype_opts').show();
|
||||
} else {
|
||||
$('proxy_authtype_opts').hide();
|
||||
jQuery('#proxy_authtype_opts').hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -282,7 +282,7 @@ function showchange() {
|
||||
foreach($showfields as $showfield) {
|
||||
$showfield = strtolower($showfield);
|
||||
//print "\t\t" . 'document.iform.' . $showfield . ".display =\"none\";\n";
|
||||
print "\t\t \$('". $showfield . "').hide();";
|
||||
print "\t\t jQuery('#". $showfield . "').hide();";
|
||||
}
|
||||
}
|
||||
print "\t" . '} else {' . "\n";
|
||||
@ -291,7 +291,7 @@ function showchange() {
|
||||
foreach($showfields as $showfield) {
|
||||
$showfield = strtolower($showfield);
|
||||
#print "\t\t" . 'document.iform.' . $showfield . ".display =\"\";\n";
|
||||
print "\t\t \$('". $showfield . "').show();";
|
||||
print "\t\t jQuery('#". $showfield . "').show();";
|
||||
}
|
||||
}
|
||||
print "\t" . '}' . "\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user