From 6b9c892adf7fff3e73a0e0152f048b1bd490fc11 Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Tue, 25 Jan 2011 04:12:07 +0000 Subject: [PATCH] Added AUTO_LOGOUT_MINUTES support to the main screen (when enabled) --- include/nap-1.0.0/js/jquery.nap-1.0.0.js | 6 +++++- index.php | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/include/nap-1.0.0/js/jquery.nap-1.0.0.js b/include/nap-1.0.0/js/jquery.nap-1.0.0.js index 642ead1e..04e3adf0 100644 --- a/include/nap-1.0.0/js/jquery.nap-1.0.0.js +++ b/include/nap-1.0.0/js/jquery.nap-1.0.0.js @@ -56,6 +56,10 @@ $.fn.nap.fallAsleepFunctions = new Array(); $.fn.nap.wakeUpFunctions = new Array(); + + $.fn.nap.test = function () { + alert("TEST CALLED"); + }; $.fn.nap.fallAsleep = function() { $.fn.nap.isAwake = false; @@ -94,4 +98,4 @@ } } -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/index.php b/index.php index d4ab17c6..adbe39af 100644 --- a/index.php +++ b/index.php @@ -91,7 +91,27 @@ if (isset($_GET['endcase'])) //if ($db->HasFailedTrans()) {print "

FAILED AT ENDCASE

"; exit();} } -xhtml_head(T_("queXS"), true, array("css/index.css","css/tabber.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css") , array("js/popup.js","js/tabber.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js")); +$js = array("js/popup.js","js/tabber.js","include/jquery-ui/js/jquery-1.4.2.min.js","include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"); +$body = true; +$script = ""; +if (AUTO_LOGOUT_MINUTES !== false) +{ + $js[] = "include/nap-1.0.0/js/jquery.nap-1.0.0.js"; + $script = ""; + $body = false; +} + +xhtml_head(T_("queXS"), $body, array("css/index.css","css/tabber.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css") , $js); +print $script; ?>