From 15c5b5d63710f28284a974902d0771ceefbb5e86 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 17 Aug 2010 12:59:31 -0400 Subject: Fix ajax updating of fields when the CPU graph widget is not in use. --- usr/local/www/javascript/index/ajax.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr') diff --git a/usr/local/www/javascript/index/ajax.js b/usr/local/www/javascript/index/ajax.js index 5eaa8c5..3259955 100644 --- a/usr/local/www/javascript/index/ajax.js +++ b/usr/local/www/javascript/index/ajax.js @@ -56,10 +56,10 @@ function updateCPU(x) { $("cpuwidtha").style.width = x + 'px'; if($('cpuwidthb')) $("cpuwidthb").style.width = (100 - x) + 'px'; - /* Load CPU Graph widget if enabled */ - if(typeof GraphValue == 'function') { - GraphValue(graph[0], x); - } + /* Load CPU Graph widget if enabled */ + if(widgetActive('cpu_graphs')) { + GraphValue(graph[0], x); + } } function updateTemp(x) { -- cgit v1.1