From d45d56dfebe29b55ee1ee00b2f31e371134bc8a5 Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Fri, 2 Mar 2012 21:55:49 +0100 Subject: Enable auto reloading --- main.js | 12 ++++++++++++ slideshows/advanced/template/events.js | 5 +++++ slideshows/dark/template/events.js | 5 +++++ slideshows/default/template/events.js | 5 +++++ 4 files changed, 27 insertions(+) mode change 100644 => 100755 main.js diff --git a/main.js b/main.js old mode 100644 new mode 100755 index f52d1ad..4b25c4e --- a/main.js +++ b/main.js @@ -1,5 +1,17 @@ #! /usr/bin/env node +var args = require('optimist') + .usage('Usage: $0 -c configuration [-h]') + .default('c', './config') + .describe('c', 'Configuration file') + .describe('h', 'This help message') + .argv; + +if(args.h) { + args.showHelp(fn=console.error); + return; +} + var path = require('path'); process.on('uncaughtException', function(err) { diff --git a/slideshows/advanced/template/events.js b/slideshows/advanced/template/events.js index e01df1c..82095f4 100644 --- a/slideshows/advanced/template/events.js +++ b/slideshows/advanced/template/events.js @@ -26,8 +26,13 @@ $(document).ready(function(){ $('.eventEl').click(function() { showWindow($(this)); }) + setTimeout("reloadPage()", 21600000); }); +function reloadPage() { + location.reload(); +}; + function showWindow(data) { var title = $('.summary',data).text(); diff --git a/slideshows/dark/template/events.js b/slideshows/dark/template/events.js index b0efe13..8c4a33e 100644 --- a/slideshows/dark/template/events.js +++ b/slideshows/dark/template/events.js @@ -28,8 +28,13 @@ $(document).ready(function(){ showWindow($(this)); }); + setTimeout("reloadPage()", 21600000); }); +function reloadPage() { + location.reload(); +}; + function showWindow(data) { var title = $('.summary',data).text(); diff --git a/slideshows/default/template/events.js b/slideshows/default/template/events.js index 9d69547..702878c 100644 --- a/slideshows/default/template/events.js +++ b/slideshows/default/template/events.js @@ -22,4 +22,9 @@ $(document).ready(function(){ $(this).show(); } }); + setTimeout("reloadPage()", 21600000); }); + +function reloadPage() { + location.reload(); +}; -- cgit v1.2.1