From 2114d3f614c0ecc75de9fde689fcbb9f90ca80fe Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Thu, 2 May 2013 22:49:56 +0000 Subject: [PATCH] fuck all javascript --- raspberry-kiosk/kiosk.css | 3 +-- raspberry-kiosk/kiosk.js | 13 +++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/raspberry-kiosk/kiosk.css b/raspberry-kiosk/kiosk.css index ac38af5..4ba94a6 100644 --- a/raspberry-kiosk/kiosk.css +++ b/raspberry-kiosk/kiosk.css @@ -98,7 +98,6 @@ div.status { div.sensorgraphs { text-align:center; width:399px; - //height:35em; padding-bottom:1em; margin-left:auto; margin-right:auto; @@ -108,7 +107,7 @@ table.status { width:397px; display:inline; margin-left: 0; - margin:right: 0; + margin-right: 0; margin-top:0; margin-bottom:1ex; } diff --git a/raspberry-kiosk/kiosk.js b/raspberry-kiosk/kiosk.js index db879b5..5b670ed 100644 --- a/raspberry-kiosk/kiosk.js +++ b/raspberry-kiosk/kiosk.js @@ -171,7 +171,8 @@ $(document).ready(function() loadGooglePlusEvents(); setInterval("updateAnwesenheitStatus()", 10*1000); setInterval("loadCalendar()", 123*1000); - setInterval("updateSensors()",145*1000); + //setInterval("updateSensors()",145*1000); + setInterval("updateSensors()",1000); setInterval("loadGooglePlusEvents()", 1207*1000); }); @@ -236,7 +237,7 @@ function IsImageOk(img) { } var img_orig_src = {}; -function reloadImg(element) +function reloadImgAlt(element) { if(element.complete) { @@ -256,3 +257,11 @@ function reloadImg(element) } } } +function reloadImg(element) +{ + if (! img_orig_src[element.id]) + { + img_orig_src[element.id] = element.src; + } + element.src = img_orig_src[element.id] + "?dt="+Math.floor(new Date().getTime() / 1000).toString(); +} -- 1.7.10.4