Module: check_mk
Branch: master
Commit: 15cc9048a811700580fdf5f16598b517f825a0e9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=15cc9048a81170…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 24 11:24:19 2012 +0200
FIX: fix repeated stacked refresh when toggling columns
---
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9e82da7..6b7a508 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@
* FIX: animation of rotation treeangle in trees works again
* FIX: Logwatch: Changed font color back to black
* FIX: show toggle button for checkboxes in deactivated state
+ * FIX: fix repeated stacked refresh when toggling columns
Mobile:
* FIX: Fixed logtime filter settings in all mobile views
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 47fc4e4..a30c98c 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -659,9 +659,10 @@ function setReload(secs, url) {
}
function startReloadTimer(url) {
- if(gReloadTimer)
+ if (gReloadTimer)
clearTimeout(gReloadTimer);
- gReloadTimer = setTimeout("handleReload('" + url + "')",
Math.ceil(parseFloat(gReloadTime) * 1000));
+ if (gReloadTime)
+ gReloadTimer = setTimeout("handleReload('" + url +
"')", Math.ceil(parseFloat(gReloadTime) * 1000));
}
function updateHeaderTime() {
@@ -719,17 +720,18 @@ function handleReload(url) {
// FiXME: Nicht mehr die ganze Seite neu laden, wenn es ein DIV
"data_container" gibt.
// In dem Fall wird die aktuelle URL aus "window.location.href" geholt, für
den Refresh
// modifiziert, der Inhalt neu geholt und in das DIV geschrieben.
- if(!document.getElementById('data_container') || url !== '') {
+ if (!document.getElementById('data_container') || url !== '') {
if (url === '')
window.location.reload(false);
else
window.location.href = url;
- } else {
+ }
+ else {
// Enforce specific display_options to get only the content data
var display_options = getUrlParam('display_options');
var opts = [ 'h', 't', 'b', 'f', 'c',
'o', 'd', 'e', 'r', 'w' ];
- for(var i = 0; i < opts.length; i++) {
- if(display_options.indexOf(opts[i].toUpperCase()) > -1)
+ for (var i = 0; i < opts.length; i++) {
+ if (display_options.indexOf(opts[i].toUpperCase()) > -1)
display_options = display_options.replace(opts[i].toUpperCase(),
opts[i]);
else
display_options += opts[i];