Author: tmckay
Date: 2011-05-20 20:33:09 +0000 (Fri, 20 May 2011)
New Revision: 4775
Modified:
trunk/cumin/python/cumin/widgets.strings
Log:
Kiosk update mode
BZ697075
Modified: trunk/cumin/python/cumin/widgets.strings
===================================================================
--- trunk/cumin/python/cumin/widgets.strings 2011-05-20 16:47:25 UTC (rev 4774)
+++ trunk/cumin/python/cumin/widgets.strings 2011-05-20 20:33:09 UTC (rev 4775)
@@ -110,7 +110,13 @@
[CuminMainView.javascript]
cumin.set_updated = function () {
- $('heartbeat').set('text', "Updated " + new
Date().format("%Y-%m-%d %H:%M:%S"));
+ var updateStr;
+ var kiosk = wooly.session.branch()["kiosk"];
+ if (kiosk != null && kiosk != undefined)
+ updateStr = "**Updated "
+ else
+ updateStr = "Updated "
+ $('heartbeat').set('text', updateStr + new
Date().format("%Y-%m-%d %H:%M:%S"));
$('shock').style.display = "none";
$('heartbeat').style.display = "inline";
$('heartbeat').style.color = "#000000";
@@ -129,18 +135,23 @@
cumin.expireID = null;
}
}
- cumin.expireID = setTimeout(function () {
- wooly.cancelIntervalUpdate();
- setTimeout(function () {
- $('heartbeat').style.display = "none";
- $('shock').style.display = "block"}, 1000);
- $('shock').onclick = function () {
- wooly.updateNow();
- wooly.resumeIntervalUpdate();
- cumin.expireIntervalUpdate();
- cumin.set_updated();
- }
- }, 30*60*1000);
+ // A "kiosk" NV pair in the URL prevents timeouts
+ var kiosk = wooly.session.branch()["kiosk"]
+ if (kiosk == null || kiosk == undefined)
+ {
+ cumin.expireID = setTimeout(function () {
+ wooly.cancelIntervalUpdate();
+ setTimeout(function () {
+ $('heartbeat').style.display = "none";
+ $('shock').style.display = "block"}, 1000);
+ $('shock').onclick = function () {
+ wooly.updateNow();
+ wooly.resumeIntervalUpdate();
+ cumin.expireIntervalUpdate();
+ cumin.set_updated();
+ }
+ }, 30*60*1000);
+ };
};
cumin.expireIntervalUpdate();
window.addEvent('domready', function () {
Show replies by date