summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets/javascript
diff options
context:
space:
mode:
authorVinicius Coque <vcoque@gmail.com>2012-01-21 18:08:09 -0200
committerVinicius Coque <vcoque@gmail.com>2012-01-21 18:08:09 -0200
commit86cf36813dbf3ca89d6e8cd21df2625ddfb6d59f (patch)
treebd32366c93da863273da32b9ab8dabe6bafca95b /usr/local/www/widgets/javascript
parent30a8ef77e1b5eb26e38981f583576487a370bbe2 (diff)
downloadpfsense-86cf36813dbf3ca89d6e8cd21df2625ddfb6d59f.zip
pfsense-86cf36813dbf3ca89d6e8cd21df2625ddfb6d59f.tar.gz
making small fixes on jQuery code
Diffstat (limited to 'usr/local/www/widgets/javascript')
-rw-r--r--usr/local/www/widgets/javascript/cpu_graphs.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr/local/www/widgets/javascript/cpu_graphs.js b/usr/local/www/widgets/javascript/cpu_graphs.js
index 3d91b5f..c7b6e8b 100644
--- a/usr/local/www/widgets/javascript/cpu_graphs.js
+++ b/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 = $(element_id)) == null) {
+ if((owner = jQuery('#' + element_id)) == null) {
alert("GraphLink Error: Element ID '" + element_id + "' not found.");
return false;
}
@@ -71,14 +71,13 @@ function GraphInitialize(element_id, width, height, bar_width) {
}
graph_html += '</div>';
- owner.innerHTML = graph_html;
- graph['element_id'] = $('GraphLinkData' + graph['id']);
+ owner.html(graph_html);
+ graph['element_id'] = jQuery('#GraphLinkData' + graph['id']);
for(i = 0; i < bar_count; i++) {
- graph['spans'][i] = $('GraphLinkBar' + graph['id'] +
- '_' + i);
- graph['spans'][i].style.width = bar_width + 'px';
- graph['spans'][i].style.marginTop = height + 'px';
+ graph['spans'][i] = jQuery('#GraphLinkBar' + graph['id'] + '_' + i);
+ graph['spans'][i].css('width',bar_width + 'px');
+ graph['spans'][i].css('margin-top',height + 'px');
}
return graph;
@@ -243,4 +242,4 @@ function GraphDraw(graph) {
graph['spans'][i].style.marginTop = getMargin(i);
// jQuery('#' + graph['spans'][count - 1]).fadeIn(500);
-} \ No newline at end of file
+}
OpenPOWER on IntegriCloud