From 07bef16e93052160a746b5f39bb1da1104c9b803 Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Tue, 25 Jan 2011 03:44:41 +0000 Subject: [PATCH] Added child frame functions for AUTO_LOGOUT_MINUTES (otherwise movement in child frames such as questinonaire do not count as non-idle time) --- include/limesurvey/common.php | 1 + js/childnap.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 js/childnap.js diff --git a/include/limesurvey/common.php b/include/limesurvey/common.php index 6ca8e8fd..87bb5ac8 100644 --- a/include/limesurvey/common.php +++ b/include/limesurvey/common.php @@ -3570,6 +3570,7 @@ function getHeader() $header.= ">\n\t\n" . $css_header . "\t\t\n" + . "\t\t\n" //queXS Addition . $js_header; return $header; diff --git a/js/childnap.js b/js/childnap.js new file mode 100644 index 00000000..2f735aad --- /dev/null +++ b/js/childnap.js @@ -0,0 +1,16 @@ +//jQuery for child window where parent window has jquery-nap-1.0.0.js running +//These functions add a listener to the child window and call the parent window when movement detected + +$(window).mousemove(function() { + parent.jQuery.fn.nap.interaction(); + }); +$(window).keyup(function() { + parent.jQuery.fn.nap.interaction(); + }); +$(window).mousedown(function() { + parent.jQuery.fn.nap.interaction(); + }); + +$(window).scroll(function() { + parent.jQuery.fn.nap.interaction(); + });