summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Cavalcante <francisco.cavalcante@bluepex.com>2016-01-22 14:20:24 -0200
committerFrancisco Cavalcante <francisco.cavalcante@bluepex.com>2016-01-22 14:20:24 -0200
commit3f98044a3dcb281a433ea6335285ecdf5da23d96 (patch)
tree0a45c32d7e46de2eb7fa01914b0f68e342eed999 /src
parent2f84d661d3d3687f71b89b141b6e1c24feb658d1 (diff)
downloadpfsense-3f98044a3dcb281a433ea6335285ecdf5da23d96.zip
pfsense-3f98044a3dcb281a433ea6335285ecdf5da23d96.tar.gz
Replaced jQuery to $ in same files
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/edit.php32
-rw-r--r--src/usr/local/www/filebrowser/browser.js28
-rw-r--r--src/usr/local/www/filebrowser/browser.php8
-rw-r--r--src/usr/local/www/guiconfig.inc2
-rwxr-xr-xsrc/usr/local/www/pkg.php4
-rw-r--r--src/usr/local/www/pkg_edit.php18
-rw-r--r--src/usr/local/www/status_logs_filter.php2
-rwxr-xr-xsrc/usr/local/www/status_logs_filter_dynamic.php20
-rw-r--r--src/usr/local/www/status_openvpn.php14
-rw-r--r--src/usr/local/www/status_queues.php26
-rw-r--r--src/usr/local/www/widgets/javascript/cpu_graphs.js8
-rw-r--r--src/usr/local/www/widgets/javascript/thermal_sensors.js6
-rw-r--r--src/usr/local/www/widgets/javascript/traffic_graph.js8
-rw-r--r--src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php4
-rw-r--r--src/usr/local/www/widgets/widgets/ntp_status.widget.php4
-rw-r--r--src/usr/local/www/widgets/widgets/openvpn.widget.php6
-rw-r--r--src/usr/local/www/widgets/widgets/system_information.widget.php104
-rw-r--r--src/usr/local/www/wizard.php4
18 files changed, 149 insertions, 149 deletions
diff --git a/src/usr/local/www/edit.php b/src/usr/local/www/edit.php
index a11f472..1b6a43d 100644
--- a/src/usr/local/www/edit.php
+++ b/src/usr/local/www/edit.php
@@ -207,19 +207,19 @@ require("head.inc");
});
function loadFile() {
- jQuery("#fileStatus").html("");
- jQuery("#fileStatusBox").show(500);
- jQuery.ajax(
+ $("#fileStatus").html("");
+ $("#fileStatusBox").show(500);
+ $.ajax(
"<?=$_SERVER['SCRIPT_NAME']?>", {
type: "post",
- data: "action=load&file=" + jQuery("#fbTarget").val(),
+ data: "action=load&file=" + $("#fbTarget").val(),
complete: loadComplete
}
);
}
function loadComplete(req) {
- jQuery("#fileContent").show(1000);
+ $("#fileContent").show(1000);
var values = req.responseText.split("|");
values.shift(); values.pop();
@@ -227,30 +227,30 @@ require("head.inc");
var file = values.shift();
var fileContent = window.atob(values.join("|"));
- jQuery("#fileContent").val(fileContent);
+ $("#fileContent").val(fileContent);
} else {
- jQuery("#fileStatus").html(values[0]);
- jQuery("#fileContent").val("");
+ $("#fileStatus").html(values[0]);
+ $("#fileContent").val("");
}
- jQuery("#fileContent").show(1000);
+ $("#fileContent").show(1000);
}
function saveFile(file) {
- jQuery("#fileStatus").html("");
- jQuery("#fileStatusBox").show(500);
+ $("#fileStatus").html("");
+ $("#fileStatusBox").show(500);
- var fileContent = Base64.encode(jQuery("#fileContent").val());
+ var fileContent = Base64.encode($("#fileContent").val());
fileContent = fileContent.replace(/\+/g, "%2B");
- jQuery.ajax(
+ $.ajax(
"<?=$_SERVER['SCRIPT_NAME']?>", {
type: "post",
- data: "action=save&file=" + jQuery("#fbTarget").val() +
+ data: "action=save&file=" + $("#fbTarget").val() +
"&data=" + fileContent,
complete: function(req) {
var values = req.responseText.split("|");
- jQuery("#fileStatus").html(values[1]);
+ $("#fileStatus").html(values[1]);
}
}
);
@@ -397,7 +397,7 @@ var Base64 = {
<?php if ($_GET['action'] == "load"): ?>
events.push(function() {
- jQuery("#fbTarget").val("<?=htmlspecialchars($_GET['path'])?>");
+ $("#fbTarget").val("<?=htmlspecialchars($_GET['path'])?>");
loadFile();
});
<?php endif; ?>
diff --git a/src/usr/local/www/filebrowser/browser.js b/src/usr/local/www/filebrowser/browser.js
index 54e07ee..6e75272 100644
--- a/src/usr/local/www/filebrowser/browser.js
+++ b/src/usr/local/www/filebrowser/browser.js
@@ -1,22 +1,22 @@
-jQuery(document).ready(
+$(document).ready(
function() {
- jQuery("#fbOpen").click(
+ $("#fbOpen").click(
function() {
- jQuery("#fbBrowser").fadeIn(750);
- fbBrowse(jQuery("#fbTarget").val());
+ $("#fbBrowser").fadeIn(750);
+ fbBrowse($("#fbTarget").val());
}
);
}
);
function fbBrowse(path) {
- jQuery("#fileContent").fadeOut();
+ $("#fileContent").fadeOut();
- if (jQuery("#fbCurrentDir")) {
- jQuery("#fbCurrentDir").html("Loading ...");
+ if ($("#fbCurrentDir")) {
+ $("#fbCurrentDir").html("Loading ...");
}
- jQuery.ajax(
+ $.ajax(
"/filebrowser/browser.php?path=" + encodeURI(path ? path : "/"),
{ type: "get", complete: fbComplete }
);
@@ -24,20 +24,20 @@ function fbBrowse(path) {
}
function fbComplete(req) {
- jQuery("#fbBrowser").html(req.responseText);
+ $("#fbBrowser").html(req.responseText);
var actions = {
fbHome: function() { fbBrowse("/"); },
- fbClose: function() { jQuery("#fbBrowser").fadeOut(750); },
+ fbClose: function() { $("#fbBrowser").fadeOut(750); },
fbDir: function() { fbBrowse(this.id); },
- fbFile: function() { jQuery("#fbTarget").val(this.id); }
+ fbFile: function() { $("#fbTarget").val(this.id); }
}
for (var type in actions) {
- jQuery("#fbBrowser ." + type).each(
+ $("#fbBrowser ." + type).each(
function() {
- jQuery(this).click(actions[type]);
- jQuery(this).css("cursor","pointer");
+ $(this).click(actions[type]);
+ $(this).css("cursor","pointer");
}
);
}
diff --git a/src/usr/local/www/filebrowser/browser.php b/src/usr/local/www/filebrowser/browser.php
index 30876aa..c048187 100644
--- a/src/usr/local/www/filebrowser/browser.php
+++ b/src/usr/local/www/filebrowser/browser.php
@@ -46,11 +46,11 @@ if (is_file($path)) {
<table width="100%">
<tr>
<td class="fbHome text-left" width="25px">
- <img onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('/');" src="/filebrowser/images/icon_home.gif" alt="Home" title="Home" />
+ <img onClick="$('#fbTarget').val('<?=$realDir?>'); fbBrowse('/');" src="/filebrowser/images/icon_home.gif" alt="Home" title="Home" />
</td>
<td><b><?=$path;?></b></td>
<td class="fbClose text-right">
- <img onClick="jQuery('#fbBrowser').fadeOut();" border="0" src="/filebrowser/images/icon_cancel.gif" alt="Close" title="Close" />
+ <img onClick="$('#fbBrowser').fadeOut();" border="0" src="/filebrowser/images/icon_cancel.gif" alt="Close" title="Close" />
</td>
</tr>
<tr>
@@ -82,7 +82,7 @@ foreach ($dirs as $dir):
<tr>
<td></td>
<td class="fbDir vexpl text-left" id="<?=$realDir;?>">
- <div onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('<?=$realDir?>');">
+ <div onClick="$('#fbTarget').val('<?=$realDir?>'); fbBrowse('<?=$realDir?>');">
<img src="/filebrowser/images/folder_generic.gif" />
&nbsp;<?=$dir;?>
</div>
@@ -149,7 +149,7 @@ foreach ($files as $file):
<td></td>
<td class="fbFile vexpl text-left" id="<?=$fqpn;?>">
<?php $filename = str_replace("//","/", "{$path}/{$file}"); ?>
- <div onClick="jQuery('#fbTarget').val('<?=$filename?>'); loadFile(); jQuery('#fbBrowser').fadeOut();">
+ <div onClick="$('#fbTarget').val('<?=$filename?>'); loadFile(); $('#fbBrowser').fadeOut();">
<img src="/filebrowser/images/file_<?=$type;?>.gif" alt="" title="">
&nbsp;<?=$file;?>
</div>
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index 21e96ba..b86a0ba 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -354,7 +354,7 @@ function print_info_box_np_undo($msg, $name = "apply", $value = "Apply changes",
$nifty_blackbox = "#000000";
if (!$savebutton) {
- $savebutton = "<td class=\"infoboxsave\"><input value=\"" . gettext("Close") . "\" type=\"button\" onclick=\"jQuery(this).parents('table[id=redboxtable]').hide();\" /></td>";
+ $savebutton = "<td class=\"infoboxsave\"><input value=\"" . gettext("Close") . "\" type=\"button\" onclick=\"$(this).parents('table[id=redboxtable]').hide();\" /></td>";
}
echo <<<EOFnp
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php
index 1ef9589..ff2203d 100755
--- a/src/usr/local/www/pkg.php
+++ b/src/usr/local/www/pkg.php
@@ -254,7 +254,7 @@ if (isset($tab_array)) {
events.push(function() {
function setFilter(filtertext) {
- jQuery('#pkg_filter').val(filtertext);
+ $('#pkg_filter').val(filtertext);
document.pkgform.submit();
}
@@ -268,7 +268,7 @@ events.push(function() {
opacity: 0.8,
helper: function(e, ui) {
ui.children().each(function() {
- jQuery(this).width(jQuery(this).width());
+ $(this).width($(this).width());
});
return ui;
},
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php
index e43cb43..81ded09 100644
--- a/src/usr/local/www/pkg_edit.php
+++ b/src/usr/local/www/pkg_edit.php
@@ -1533,20 +1533,20 @@ if ($pkg['fields']['field'] != "") { ?>
<?php
foreach ($pkg['fields']['field'] as $field) {
if (isset($field['enablefields']) or isset($field['checkenablefields'])) {
- echo "\tif (jQuery('input[name=\"{$field['fieldname']}\"]').prop('checked') == false) {\n";
+ echo "\tif ($('input[name=\"{$field['fieldname']}\"]').prop('checked') == false) {\n";
if (isset($field['enablefields'])) {
foreach (explode(',', $field['enablefields']) as $enablefield) {
- echo "\t\tif (jQuery('input[name=\"{$enablefield}\"]').length > 0) {\n";
- echo "\t\t\tjQuery('input[name=\"{$enablefield}\"]').prop('disabled',true);\n";
+ echo "\t\tif ($('input[name=\"{$enablefield}\"]').length > 0) {\n";
+ echo "\t\t\t$('input[name=\"{$enablefield}\"]').prop('disabled',true);\n";
echo "\t\t}\n";
}
}
if (isset($field['checkenablefields'])) {
foreach (explode(',', $field['checkenablefields']) as $checkenablefield) {
- echo "\t\tif (jQuery('input[name=\"{$checkenablefield}\"]').length > 0) {\n";
- echo "\t\t\tjQuery('input[name=\"{$checkenablefield}\"]').prop('checked',true);\n";
+ echo "\t\tif ($('input[name=\"{$checkenablefield}\"]').length > 0) {\n";
+ echo "\t\t\t$('input[name=\"{$checkenablefield}\"]').prop('checked',true);\n";
echo "\t\t}\n";
}
}
@@ -1555,16 +1555,16 @@ if ($pkg['fields']['field'] != "") { ?>
if (isset($field['enablefields'])) {
foreach (explode(',', $field['enablefields']) as $enablefield) {
- echo "\t\tif (jQuery('input[name=\"{$enablefield}\"]').length > 0) {\n";
- echo "\t\t\tjQuery('input[name=\"{$enablefield}\"]').prop('disabled',false);\n";
+ echo "\t\tif ($('input[name=\"{$enablefield}\"]').length > 0) {\n";
+ echo "\t\t\t$('input[name=\"{$enablefield}\"]').prop('disabled',false);\n";
echo "\t\t}\n";
}
}
if (isset($field['checkenablefields'])) {
foreach (explode(',', $field['checkenablefields']) as $checkenablefield) {
- echo "\t\tif (jQuery('input[name=\"{$checkenablefield}\"]').length > 0) {\n";
- echo "\t\t\tjQuery('input[name=\"{$checkenablefield}\"]').prop('checked',false);\n";
+ echo "\t\tif ($('input[name=\"{$checkenablefield}\"]').length > 0) {\n";
+ echo "\t\t\t$('input[name=\"{$checkenablefield}\"]').prop('checked',false);\n";
echo "\t\t}\n";
}
}
diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php
index e964442..2a2f008 100644
--- a/src/usr/local/www/status_logs_filter.php
+++ b/src/usr/local/www/status_logs_filter.php
@@ -398,7 +398,7 @@ function resolve_ip_callback(transport) {
var resolve_class = htmlspecialchars(response.resolve_ip.replace(/[.:]/g, '-'));
var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '<\/small>';
- jQuery('span.RESOLVE-' + resolve_class).html(resolve_text);
+ $('span.RESOLVE-' + resolve_class).html(resolve_text);
}
// From http://stackoverflow.com/questions/5499078/fastest-method-to-escape-html-tags-as-html-entities
diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php
index b4be38a..92e95dc 100755
--- a/src/usr/local/www/status_logs_filter_dynamic.php
+++ b/src/usr/local/www/status_logs_filter_dynamic.php
@@ -322,7 +322,7 @@ function update_table_rows(data) {
data = data.slice(startat, data.length);
- var rows = jQuery('#filter-log-entries>tr');
+ var rows = $('#filter-log-entries>tr');
// Number of rows to move by
var move = rows.length + data.length - nentries;
@@ -333,38 +333,38 @@ function update_table_rows(data) {
if (isReverse == false) {
for (var i = move; i < rows.length; i++) {
- jQuery(rows[i - move]).html(jQuery(rows[i]).html());
+ $(rows[i - move]).html($(rows[i]).html());
}
- var tbody = jQuery('#filter-log-entries');
+ var tbody = $('#filter-log-entries');
for (var i = 0; i < data.length; i++) {
var rowIndex = rows.length - move + i;
if (rowIndex < rows.length) {
- jQuery(rows[rowIndex]).html(data[i]);
+ $(rows[rowIndex]).html(data[i]);
} else {
- jQuery(tbody).append('<tr>' + data[i] + '</tr>');
+ $(tbody).append('<tr>' + data[i] + '</tr>');
}
}
} else {
for (var i = rows.length - 1; i >= move; i--) {
- jQuery(rows[i]).html(jQuery(rows[i - move]).html());
+ $(rows[i]).html($(rows[i - move]).html());
}
- var tbody = jQuery('#filter-log-entries');
+ var tbody = $('#filter-log-entries');
for (var i = 0; i < data.length; i++) {
var rowIndex = move - 1 - i;
if (rowIndex >= 0) {
- jQuery(rows[rowIndex]).html(data[i]);
+ $(rows[rowIndex]).html(data[i]);
} else {
- jQuery(tbody).prepend('<tr>' + data[i] + '</tr>');
+ $(tbody).prepend('<tr>' + data[i] + '</tr>');
}
}
}
// Much easier to go through each of the rows once they've all be added.
- rows = jQuery('#filter-log-entries>tr');
+ rows = $('#filter-log-entries>tr');
for (var i = 0; i < rows.length; i++) {
rows[i].className = i % 2 == 0 ? 'listMRodd' : 'listMReven';
}
diff --git a/src/usr/local/www/status_openvpn.php b/src/usr/local/www/status_openvpn.php
index fe70a47..d958a67 100644
--- a/src/usr/local/www/status_openvpn.php
+++ b/src/usr/local/www/status_openvpn.php
@@ -96,14 +96,14 @@ include("head.inc"); ?>
//<![CDATA[
function killClient(mport, remipp) {
var busy = function(index,icon) {
- jQuery(icon).bind("onclick","");
- jQuery(icon).attr('src',jQuery(icon).attr('src').replace("\.gif", "_d.gif"));
- jQuery(icon).css("cursor","wait");
+ $(icon).bind("onclick","");
+ $(icon).attr('src',$(icon).attr('src').replace("\.gif", "_d.gif"));
+ $(icon).css("cursor","wait");
}
- jQuery('img[name="i:' + mport + ":" + remipp + '"]').each(busy);
+ $('img[name="i:' + mport + ":" + remipp + '"]').each(busy);
- jQuery.ajax(
+ $.ajax(
"<?=$_SERVER['SCRIPT_NAME'];?>" +
"?action=kill&port=" + mport + "&remipp=" + remipp,
{ type: "get", complete: killComplete }
@@ -117,8 +117,8 @@ include("head.inc"); ?>
return;
}
- jQuery('tr[name="r:' + values[1] + ":" + values[2] + '"]').each(
- function(index,row) { jQuery(row).fadeOut(1000); }
+ $('tr[name="r:' + values[1] + ":" + values[2] + '"]').each(
+ function(index,row) { $(row).fadeOut(1000); }
);
}
//]]>
diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php
index 9568b75..bc27f26 100644
--- a/src/usr/local/www/status_queues.php
+++ b/src/usr/local/www/status_queues.php
@@ -129,13 +129,13 @@ if ($_REQUEST['getactivity']) {
if ($packet_s < 0) {
$packet_s = 0;
}
- $finscript .= "jQuery('#queue{$q->queuename}width').css('width','{$packet_s}%');";
- $finscript .= "jQuery('#queue{$q->queuename}pps').val('" . number_format($q->pps, 1) . "');";
- $finscript .= "jQuery('#queue{$q->queuename}bps').val('" . format_bits($q->bandwidth) . "');";
- $finscript .= "jQuery('#queue{$q->queuename}borrows').val('{$q->borrows}');";
- $finscript .= "jQuery('#queue{$q->queuename}suspends').val('{$q->suspends}');";
- $finscript .= "jQuery('#queue{$q->queuename}drops').val('{$q->drops}');";
- $finscript .= "jQuery('#queue{$q->queuename}length').val('{$q->queuelength}');";
+ $finscript .= "$('#queue{$q->queuename}width').css('width','{$packet_s}%');";
+ $finscript .= "$('#queue{$q->queuename}pps').val('" . number_format($q->pps, 1) . "');";
+ $finscript .= "$('#queue{$q->queuename}bps').val('" . format_bits($q->bandwidth) . "');";
+ $finscript .= "$('#queue{$q->queuename}borrows').val('{$q->borrows}');";
+ $finscript .= "$('#queue{$q->queuename}suspends').val('{$q->suspends}');";
+ $finscript .= "$('#queue{$q->queuename}drops').val('{$q->drops}');";
+ $finscript .= "$('#queue{$q->queuename}length').val('{$q->queuelength}');";
}
unset($statistics, $altqstats);
header("Content-type: text/javascript");
@@ -160,8 +160,8 @@ if (!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) <
//<![CDATA[
function getqueueactivity() {
var url = "/status_queues.php";
- var pars = "getactivity=yes&stats=" + jQuery("#selStatistic").val();
- jQuery.ajax(
+ var pars = "getactivity=yes&stats=" + $("#selStatistic").val();
+ $.ajax(
url,
{
type: 'post',
@@ -172,7 +172,7 @@ if (!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) <
function activitycallback(transport) {
setTimeout('getqueueactivity()', 5100);
}
- jQuery(document).ready(function() {
+ $(document).ready(function() {
setTimeout('getqueueactivity()', 150);
});
//]]>
@@ -224,11 +224,11 @@ else: ?>
<script type="text/javascript">
//<![CDATA[
function StatsShowHide(classname) {
- var firstrow = jQuery("." + classname).first();
+ var firstrow = $("." + classname).first();
if (firstrow.is(':visible')) {
- jQuery("." + classname).hide();
+ $("." + classname).hide();
} else {
- jQuery("." + classname).show();
+ $("." + classname).show();
}
}
//]]>
diff --git a/src/usr/local/www/widgets/javascript/cpu_graphs.js b/src/usr/local/www/widgets/javascript/cpu_graphs.js
index 1fc690a..2e00e67 100644
--- a/src/usr/local/www/widgets/javascript/cpu_graphs.js
+++ b/src/usr/local/www/widgets/javascript/cpu_graphs.js
@@ -36,7 +36,7 @@ var GL_DYNAMIC = 1;
function GraphInitialize(element_id, width, height, bar_width) {
// Find the page element which will contain the graph
var owner;
- if((owner = jQuery('#' + element_id)) == null) {
+ if((owner = $('#' + element_id)) == null) {
alert("GraphLink Error: Element ID '" + element_id + "' not found.");
return false;
}
@@ -72,10 +72,10 @@ function GraphInitialize(element_id, width, height, bar_width) {
graph_html += '</div>';
owner.html(graph_html);
- graph['element_id'] = jQuery('#GraphLinkData' + graph['id']);
+ graph['element_id'] = $('#GraphLinkData' + graph['id']);
for(i = 0; i < bar_count; i++) {
- graph['spans'][i] = jQuery('#GraphLinkBar' + graph['id'] + '_' + i);
+ graph['spans'][i] = $('#GraphLinkBar' + graph['id'] + '_' + i);
graph['spans'][i].css('width',bar_width + 'px');
graph['spans'][i].css('margin-top',height + 'px');
}
@@ -241,5 +241,5 @@ function GraphDraw(graph) {
for(var i = 0; i < count; i++)
graph['spans'][i].css("marginTop", getMargin(i));
-// jQuery('#' + graph['spans'][count - 1]).fadeIn(500);
+// $('#' + graph['spans'][count - 1]).fadeIn(500);
}
diff --git a/src/usr/local/www/widgets/javascript/thermal_sensors.js b/src/usr/local/www/widgets/javascript/thermal_sensors.js
index 4733f67..cc575e7 100644
--- a/src/usr/local/www/widgets/javascript/thermal_sensors.js
+++ b/src/usr/local/www/widgets/javascript/thermal_sensors.js
@@ -65,7 +65,7 @@ function showThermalSensorsData() {
//IE fix to disable cache when using http:// , just append timespan
+ new Date().getTime();
- jQuery.ajax(url, {
+ $.ajax(url, {
type: 'get',
success: function(data) {
var thermalSensorsData = data || "";
@@ -112,9 +112,9 @@ function loadThermalSensorsContainer (thermalSensorsContent) {
if (thermalSensorsContent && thermalSensorsContent != "") {
//load generated graph (or raw data) into thermalSensorsContainer (thermalSensorsContainer DIV defined in "thermal_sensors.widget.php")
- jQuery('#thermalSensorsContainer').html(thermalSensorsContent);
+ $('#thermalSensorsContainer').html(thermalSensorsContent);
} else {
- jQuery('#thermalSensorsContainer').html("No Thermal Sensors data available.");
+ $('#thermalSensorsContainer').html("No Thermal Sensors data available.");
}
}
diff --git a/src/usr/local/www/widgets/javascript/traffic_graph.js b/src/usr/local/www/widgets/javascript/traffic_graph.js
index 383a549..51f55ed 100644
--- a/src/usr/local/www/widgets/javascript/traffic_graph.js
+++ b/src/usr/local/www/widgets/javascript/traffic_graph.js
@@ -1,13 +1,13 @@
function trafficshowDiv(incDiv,ifDescription,refreshIntervalSec,swapButtons) {
// put the graph object HTML in the element and make it appear
selectedDiv = incDiv + "graphdiv";
- jQuery('#' + selectedDiv).html(
+ $('#' + selectedDiv).html(
'<object data="graph.php?ifnum=' + incDiv + '&amp;ifname=' + ifDescription + '&amp;timeint=' + refreshIntervalSec + '&amp;initdelay=0" height="100%" width="100%">' +
'<param name="id" value="graph" />' +
'<param name="type" value="image/svg+xml" />' +
'<param name="pluginspage" value="http://www.adobe.com/svg/viewer/install/auto" />' +
'</object>');
- jQuery('#' + selectedDiv).effect('blind',{mode:'show'},1000);
+ $('#' + selectedDiv).effect('blind',{mode:'show'},1000);
d = document;
if (swapButtons) {
selectIntLink = selectedDiv + "-min";
@@ -24,8 +24,8 @@ function trafficshowDiv(incDiv,ifDescription,refreshIntervalSec,swapButtons) {
function trafficminimizeDiv(incDiv,swapButtons) {
// remove the graph object HTML from the element (so it does not keep using CPU) and fade
selectedDiv = incDiv + "graphdiv";
- jQuery('#' + selectedDiv).html('');
- jQuery('#' + selectedDiv).effect('blind',{mode:'hide'},1000);
+ $('#' + selectedDiv).html('');
+ $('#' + selectedDiv).effect('blind',{mode:'hide'},1000);
d = document;
if (swapButtons) {
selectIntLink = selectedDiv + "-open";
diff --git a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
index e6454cb..a875526 100644
--- a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
@@ -158,7 +158,7 @@ if ($_REQUEST['getdyndnsstatus']) {
scroll(0,0);
var url = "/widgets/widgets/dyn_dns_status.widget.php";
var pars = 'getdyndnsstatus=yes';
- jQuery.ajax(
+ $.ajax(
url,
{
type: 'get',
@@ -173,7 +173,7 @@ if ($_REQUEST['getdyndnsstatus']) {
var responseStrings = transport.responseText.split("|");
for (var count=0; count<responseStrings.length; count++) {
var divlabel = '#dyndnsstatus' + count;
- jQuery(divlabel).prop('innerHTML',responseStrings[count]);
+ $(divlabel).prop('innerHTML',responseStrings[count]);
}
}
// Do the first status check 2 seconds after the dashboard opens
diff --git a/src/usr/local/www/widgets/widgets/ntp_status.widget.php b/src/usr/local/www/widgets/widgets/ntp_status.widget.php
index d20e008..98af1a1 100644
--- a/src/usr/local/www/widgets/widgets/ntp_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/ntp_status.widget.php
@@ -501,7 +501,7 @@ clockUpdate();
scroll(0,0);
var url = "/widgets/widgets/ntp_status.widget.php";
var pars = 'updateme=yes';
- jQuery.ajax(
+ $.ajax(
url,
{
type: 'get',
@@ -515,7 +515,7 @@ clockUpdate();
function ntpstatuscallback(transport) {
// The server returns formatted html code
var responseStringNtp = transport.responseText
- jQuery('#ntpstatus').prop('innerHTML',responseStringNtp);
+ $('#ntpstatus').prop('innerHTML',responseStringNtp);
}
// Do the first status check 1 second after the dashboard opens
setTimeout('ntp_getstatus()', 1000);
diff --git a/src/usr/local/www/widgets/widgets/openvpn.widget.php b/src/usr/local/www/widgets/widgets/openvpn.widget.php
index a321f2a..f23e95c 100644
--- a/src/usr/local/www/widgets/widgets/openvpn.widget.php
+++ b/src/usr/local/www/widgets/widgets/openvpn.widget.php
@@ -83,7 +83,7 @@ $clients = openvpn_get_active_clients();
//<![CDATA[
function killClient(mport, remipp) {
- jQuery.ajax(
+ $.ajax(
"widgets/widgets/openvpn.widget.php" +
"?action=kill&port=" + mport + "&remipp=" + remipp,
{ type: "get", complete: killComplete }
@@ -97,8 +97,8 @@ $clients = openvpn_get_active_clients();
return;
}
- jQuery('tr[name="r:' + values[1] + ":" + values[2] + '"]').each(
- function(index,row) { jQuery(row).fadeOut(1000); }
+ $('tr[name="r:' + values[1] + ":" + values[2] + '"]').each(
+ function(index,row) { $(row).fadeOut(1000); }
);
}
//]]>
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php
index 870029b..d624e42 100644
--- a/src/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/src/usr/local/www/widgets/widgets/system_information.widget.php
@@ -326,7 +326,7 @@ function systemStatusGetUpdateStatus() {
function updateMeters() {
url = '/getstats.php';
- jQuery.ajax(url, {
+ $.ajax(url, {
type: 'get',
success: function(data) {
response = data || "";
@@ -352,7 +352,7 @@ var Seconds = 11;
var update_interval = (Math.abs(Math.ceil(Seconds))-1)*1000 + 990;
function setProgress(barName, percent) {
- jQuery('#' + barName).css('width', percent + '%').attr('aria-valuenow', percent);
+ $('#' + barName).css('width', percent + '%').attr('aria-valuenow', percent);
}
function setTimer() {
@@ -361,7 +361,7 @@ function setTimer() {
function stats(x) {
var values = x.split("|");
- if (jQuery.each(values,function(key,value){
+ if ($.each(values,function(key,value){
if (value == 'undefined' || value == null)
return true;
else
@@ -385,35 +385,35 @@ function stats(x) {
}
function updateMemory(x) {
- if (jQuery('#memusagemeter')) {
- jQuery("#memusagemeter").html(x);
+ if ($('#memusagemeter')) {
+ $("#memusagemeter").html(x);
}
- if (jQuery('#memUsagePB')) {
+ if ($('#memUsagePB')) {
setProgress('memUsagePB', parseInt(x));
}
}
function updateMbuf(x) {
- if (jQuery('#mbuf')) {
- jQuery("#mbuf").html(x);
+ if ($('#mbuf')) {
+ $("#mbuf").html(x);
}
}
function updateMbufMeter(x) {
- if (jQuery('#mbufusagemeter')) {
- jQuery("#mbufusagemeter").html(x + '%');
+ if ($('#mbufusagemeter')) {
+ $("#mbufusagemeter").html(x + '%');
}
- if (jQuery('#mbufPB')) {
+ if ($('#mbufPB')) {
setProgress('mbufPB', parseInt(x));
}
}
function updateCPU(x) {
- if (jQuery('#cpumeter')) {
- jQuery("#cpumeter").html(x + '%');
+ if ($('#cpumeter')) {
+ $("#cpumeter").html(x + '%');
}
- if (jQuery('#cpuPB')) {
+ if ($('#cpuPB')) {
setProgress('cpuPB', parseInt(x));
}
@@ -424,37 +424,37 @@ function updateCPU(x) {
}
function updateTemp(x) {
- if (jQuery("#tempmeter")) {
- jQuery("#tempmeter").html(x + '\u00B0' + 'C');
+ if ($("#tempmeter")) {
+ $("#tempmeter").html(x + '\u00B0' + 'C');
}
- if (jQuery('#tempPB')) {
- jQuery("#tempPB").progressbar( { value: parseInt(x) } );
+ if ($('#tempPB')) {
+ $("#tempPB").progressbar( { value: parseInt(x) } );
}
}
function updateDateTime(x) {
- if (jQuery('#datetime')) {
- jQuery("#datetime").html(x);
+ if ($('#datetime')) {
+ $("#datetime").html(x);
}
}
function updateUptime(x) {
- if (jQuery('#uptime')) {
- jQuery("#uptime").html(x);
+ if ($('#uptime')) {
+ $("#uptime").html(x);
}
}
function updateState(x) {
- if (jQuery('#pfstate')) {
- jQuery("#pfstate").html('(' + x + ')');
+ if ($('#pfstate')) {
+ $("#pfstate").html('(' + x + ')');
}
}
function updateStateMeter(x) {
- if (jQuery('#pfstateusagemeter')) {
- jQuery("#pfstateusagemeter").html(x + '%');
+ if ($('#pfstateusagemeter')) {
+ $("#pfstateusagemeter").html(x + '%');
}
- if (jQuery('#statePB')) {
+ if ($('#statePB')) {
setProgress('statePB', parseInt(x));
}
}
@@ -464,10 +464,10 @@ function updateGatewayStats(x) {
gateways_split = x.split(",");
for (var y=0; y<gateways_split.length; y++) {
gateways_field_split = gateways_split[y].split("^");
- if (jQuery('#gateway' + (y + 1))) {
- jQuery('#gateway' + (y + 1)).html(gateways_field_split[0]);
+ if ($('#gateway' + (y + 1))) {
+ $('#gateway' + (y + 1)).html(gateways_field_split[0]);
if (gateways_field_split[1]) {
- jQuery('#gateway' + (y + 1)).css('background-color',gateways_field_split[1]);
+ $('#gateway' + (y + 1)).css('background-color',gateways_field_split[1]);
}
}
}
@@ -475,14 +475,14 @@ function updateGatewayStats(x) {
}
function updateCpuFreq(x) {
- if (jQuery('#cpufreq')) {
- jQuery("#cpufreq").html(x);
+ if ($('#cpufreq')) {
+ $("#cpufreq").html(x);
}
}
function updateLoadAverage(x) {
- if (jQuery('#load_average')) {
- jQuery("#load_average").html(x);
+ if ($('#load_average')) {
+ $("#load_average").html(x);
}
}
@@ -491,8 +491,8 @@ function updateInterfaceStats(x) {
statistics_split = x.split(",");
var counter = 1;
for (var y=0; y<statistics_split.length-1; y++) {
- if (jQuery('#stat' + counter)) {
- jQuery('#stat' + counter).html(statistics_split[y]);
+ if ($('#stat' + counter)) {
+ $('#stat' + counter).html(statistics_split[y]);
counter++;
}
}
@@ -511,25 +511,25 @@ function updateInterfaces(x) {
}
switch(details[1]) {
case "up":
- jQuery('#' + details[0] + '-up').css("display","inline");
- jQuery('#' + details[0] + '-down').css("display","none");
- jQuery('#' + details[0] + '-block').css("display","none");
- jQuery('#' + details[0] + '-ip').html(ipv4_details);
- jQuery('#' + details[0] + '-ipv6').html(details[3]);
- jQuery('#' + details[0] + '-media').html(details[4]);
+ $('#' + details[0] + '-up').css("display","inline");
+ $('#' + details[0] + '-down').css("display","none");
+ $('#' + details[0] + '-block').css("display","none");
+ $('#' + details[0] + '-ip').html(ipv4_details);
+ $('#' + details[0] + '-ipv6').html(details[3]);
+ $('#' + details[0] + '-media').html(details[4]);
break;
case "down":
- jQuery('#' + details[0] + '-down').css("display","inline");
- jQuery('#' + details[0] + '-up').css("display","none");
- jQuery('#' + details[0] + '-block').css("display","none");
- jQuery('#' + details[0] + '-ip').html(ipv4_details);
- jQuery('#' + details[0] + '-ipv6').html(details[3]);
- jQuery('#' + details[0] + '-media').html(details[4]);
+ $('#' + details[0] + '-down').css("display","inline");
+ $('#' + details[0] + '-up').css("display","none");
+ $('#' + details[0] + '-block').css("display","none");
+ $('#' + details[0] + '-ip').html(ipv4_details);
+ $('#' + details[0] + '-ipv6').html(details[3]);
+ $('#' + details[0] + '-media').html(details[4]);
break;
case "block":
- jQuery('#' + details[0] + '-block').css("display","inline");
- jQuery('#' + details[0] + '-down').css("display","none");
- jQuery('#' + details[0] + '-up').css("display","none");
+ $('#' + details[0] + '-block').css("display","inline");
+ $('#' + details[0] + '-down').css("display","none");
+ $('#' + details[0] + '-up').css("display","none");
break;
}
});
@@ -537,7 +537,7 @@ function updateInterfaces(x) {
}
function widgetActive(x) {
- var widget = jQuery('#' + x + '-container');
+ var widget = $('#' + x + '-container');
if ((widget != null) && (widget.css('display') != null) && (widget.css('display') != "none")) {
return true;
} else {
diff --git a/src/usr/local/www/wizard.php b/src/usr/local/www/wizard.php
index 4fc0066..54a82e6 100644
--- a/src/usr/local/www/wizard.php
+++ b/src/usr/local/www/wizard.php
@@ -332,7 +332,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") { ?>
foreach ($showfields as $showfield) {
$showfield = strtolower($showfield);
//print "\t\t" . 'document.iform.' . $showfield . ".display =\"none\";\n";
- print "\t\t jQuery('#". $showfield . "').hide();";
+ print "\t\t $('#". $showfield . "').hide();";
}
}
print "\t" . '} else {' . "\n";
@@ -341,7 +341,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") { ?>
foreach ($showfields as $showfield) {
$showfield = strtolower($showfield);
#print "\t\t" . 'document.iform.' . $showfield . ".display =\"\";\n";
- print "\t\t jQuery('#". $showfield . "').show();";
+ print "\t\t $('#". $showfield . "').show();";
}
}
print "\t" . '}' . "\n";
OpenPOWER on IntegriCloud