From 8c398c428a557d670ce729e0b1e1a788e4d5e4ba Mon Sep 17 00:00:00 2001 From: Hotte <root@ovanier.de> Date: Mon, 24 Oct 2016 21:05:23 +0200 Subject: [PATCH] config fix --- panels/mensaPlan/script.js | 3 +++ panels/werbung/script.js | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/panels/mensaPlan/script.js b/panels/mensaPlan/script.js index 3b1287d..a68ac40 100755 --- a/panels/mensaPlan/script.js +++ b/panels/mensaPlan/script.js @@ -1,7 +1,9 @@ this.tabtime=20; + this.checkShowCondition = function() { return 3*this.tabtime; } + this.show = function() { // switch tabs this.interval=setInterval(function() { @@ -25,6 +27,7 @@ this.show = function() { }, this.tabtime*1000); } + this.hide = function() { clearInterval(this.interval); } diff --git a/panels/werbung/script.js b/panels/werbung/script.js index 4fd8488..8cfbca1 100644 --- a/panels/werbung/script.js +++ b/panels/werbung/script.js @@ -9,7 +9,7 @@ this.loaded=function(panel,config) { this.show=function() { $(werbung_panel).find("#werbung_display").attr("src", "panels/werbung/img/"+werbung_config.files[nextWerbung].filename); - if(nextWerbung+1<config.files.length) { + if(nextWerbung+1<werbung_config.files.length) { nextWerbung += 1; } else { nextWerbung = 0; @@ -19,6 +19,9 @@ this.show=function() { this.resize=function() { } -this.checkShowCondition=function() { - return 0; +this.hide = function() { +} + +this.checkShowCondition = function() { + return 20; } -- GitLab