summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/frontend/doorsign.html
diff options
context:
space:
mode:
authorMichael Scherle2017-03-22 16:55:23 +0100
committerMichael Scherle2017-03-22 16:55:23 +0100
commit21da9400fd8e411eef083a0b8ade0da31a994c10 (patch)
tree5b6418e37f653f88833f3188cbbdc55089ee9ee0 /modules-available/locationinfo/frontend/doorsign.html
parentfrontend: -calendar scrolls to actual time, if space is to small to show full... (diff)
downloadslx-admin-21da9400fd8e411eef083a0b8ade0da31a994c10.tar.gz
slx-admin-21da9400fd8e411eef083a0b8ade0da31a994c10.tar.xz
slx-admin-21da9400fd8e411eef083a0b8ade0da31a994c10.zip
frontend: fixed roomupdate & removed 10 sec delay
Diffstat (limited to 'modules-available/locationinfo/frontend/doorsign.html')
-rwxr-xr-xmodules-available/locationinfo/frontend/doorsign.html22
1 files changed, 7 insertions, 15 deletions
diff --git a/modules-available/locationinfo/frontend/doorsign.html b/modules-available/locationinfo/frontend/doorsign.html
index 0b50fcfe..cd800283 100755
--- a/modules-available/locationinfo/frontend/doorsign.html
+++ b/modules-available/locationinfo/frontend/doorsign.html
@@ -279,13 +279,7 @@ optional:
var roomsToshow = 0;
var roomIds;
//Todo change these
- var CalendarUpdateTime = 60 * 1000;
- var RoomUpdateTime = 60 * 1000;
-
var date;
-
- var configJson;
-
var supportSvg = typeof SVGRect != "undefined";
var calendarQueryUrl;
var translation = {
@@ -317,12 +311,7 @@ optional:
}
};
- var overlay = {
- "1": { name:"1.svg",
- class:"overlay1"
- }
- }
$(document).ready(function () {
@@ -343,7 +332,7 @@ optional:
cache: false,
timeout: 30000,
success: function (result) {
- if (configJson == null) {
+ if (room == null) {
if (result.room == null) {
// Todo Error Handling: wrong id?
return;
@@ -621,23 +610,25 @@ optional:
// Main Update loop, this loop runs every 1 seconds and calls all
// function which should be called periodically
- var timeSteps = 0;
+ var timeSteps = 10;
+
function mainUpdateLoop() {
// check ervery 10 sec if rooms need new calendar data or room data
// groups request
+
if(timeSteps > 9) {
timeSteps = 0;
var calendarUpdateIds ="";
var rommUpdateIds="";
for (var property in rooms) {
- if (rooms[property].config.lastCalendarUpdate == null || rooms[property].config.lastCalendarUpdate + rooms[property].config.calupdate *60* 1000 < MyDate().getTime()) {
+ if (rooms[property].config.lastCalendarUpdate == null || rooms[property].config.lastCalendarUpdate + rooms[property].config.calupdate < MyDate().getTime()) {
calendarUpdateIds = addIdToUpdateList(calendarUpdateIds,rooms[property].id);
rooms[property].config.lastCalendarUpdate = MyDate().getTime();
}
- if (rooms[property].config.lastRoomUpdate == null || rooms[property].config.lastRoomUpdate + rooms[property].config.roomupdate *1000 < MyDate().getTime()) {
+ if (rooms[property].config.lastRoomUpdate == null || rooms[property].config.lastRoomUpdate + rooms[property].config.roomupdate < MyDate().getTime()) {
rommUpdateIds= addIdToUpdateList(rommUpdateIds,rooms[property].id);
rooms[property].config.lastRoomUpdate = MyDate().getTime();
}
@@ -731,6 +722,7 @@ optional:
}
// inilizes the Calendar for an room
+
function setUpCalendar(percent, daysToShow, room) {
generateCalendarDiv(percent, room);
var $calendar = $("#calendar_" + room.id).weekCalendar({