diff options
author | Francisco Cavalcante <francisco.cavalcante@bluepex.com> | 2016-01-22 14:20:24 -0200 |
---|---|---|
committer | Francisco Cavalcante <francisco.cavalcante@bluepex.com> | 2016-01-22 14:20:24 -0200 |
commit | 3f98044a3dcb281a433ea6335285ecdf5da23d96 (patch) | |
tree | 0a45c32d7e46de2eb7fa01914b0f68e342eed999 /src/usr/local/www/widgets | |
parent | 2f84d661d3d3687f71b89b141b6e1c24feb658d1 (diff) | |
download | pfsense-3f98044a3dcb281a433ea6335285ecdf5da23d96.zip pfsense-3f98044a3dcb281a433ea6335285ecdf5da23d96.tar.gz |
Replaced jQuery to $ in same files
Diffstat (limited to 'src/usr/local/www/widgets')
7 files changed, 70 insertions, 70 deletions
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 + '&ifname=' + ifDescription + '&timeint=' + refreshIntervalSec + '&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 { |