Index: portal/portal-charon/charon/src/webapp/scripts/neoscripts.js =================================================================== --- portal/portal-charon/charon/src/webapp/scripts/neoscripts.js (revision 120897) +++ portal/portal-charon/charon/src/webapp/scripts/neoscripts.js (working copy) @@ -119,6 +119,20 @@ jQuery('#portalMask').remove(); } +function f_scrollTop() { + return f_filterResults ( + window.pageYOffset ? window.pageYOffset : 0, + document.documentElement ? document.documentElement.scrollTop : 0, + document.body ? document.body.scrollTop : 0 + ); +} +function f_filterResults(n_win, n_docel, n_body) { + var n_result = n_win ? n_win : 0; + if (n_docel && (!n_result || (n_result > n_docel))) + n_result = n_docel; + return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result; +} + /* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * @@ -150,6 +164,7 @@ if (timeoutDialogEnabled == true) { poll_session_data(); fetch_timeout_dialog(); + fetch_timeout_lapsed_dialog(); } } @@ -188,7 +203,13 @@ } else { //the timeout length has occurred, but there is a slight delay, do this until there isn't a user. - sessionTimeOut = setTimeout("poll_session_data()", 1000 * 10); + if (jQuery("#timeout_alert_body").get(0)) { + jQuery("#timeout_alert_body").remove(); + } + if (!jQuery("#session_lapsed").get(0)) { + jQuery("body").append(timeoutLapsedFragment); + jQuery('#session_lapsed').css('top', (f_scrollTop() + 100) + "px"); + } } }, error: function(XMLHttpRequest, status, error){ @@ -207,6 +228,15 @@ jQuery("#timeout_alert_body").remove(); } +function close_lapsed_dialog(){ + removeDHTMLMask(); + jQuery("#session_lapsed").remove(); +} + +function go_login() { + window.location.replace("http://" + window.location.host); +} + var timeoutDialogFragment; function fetch_timeout_dialog(){ jQuery.ajax({ @@ -222,6 +252,21 @@ }); } +var timeoutLapsedFragment; +function fetch_timeout_lapsed_dialog() { + jQuery.ajax({ + url: "/portal/timeout/lapsed", + cache: true, + dataType: "text", + success: function(data) { + timeoutLapsedFragment = data; + }, + error: function(XMLHttpRequest, status, error){ + timeoutDialogEnabled = false; + } + }); +} + function show_timeout_alert(min){ if (!timeoutDialogEnabled) { return; Index: portal/portal-render-engine-impl/pack/src/webapp/vm/neoskin/timeout.vm =================================================================== --- portal/portal-render-engine-impl/pack/src/webapp/vm/neoskin/timeout.vm (revision 120897) +++ portal/portal-render-engine-impl/pack/src/webapp/vm/neoskin/timeout.vm (working copy) @@ -1,9 +1,24 @@ -
+
+ For your security, if an hour and twenty minutes pass and Sakai does not receive an update or page request from you, it will + automatically end your session and log you off. By automatically ending your session, the chances that a + malicious user might access Sakai with your information are greatly reduced.
-+ +
-+ For your security, if an hour and twenty minutes pass and Sakai does not receive an update or page request from you, it will + automatically end your session and log you off. By automatically ending your session, the chances that a + malicious user might access Sakai with your information are greatly reduced. + +
+ If you were in the middle of writing something, completing an assignment, writing a long discussion post, + preparing an announcement, etc. you must manually save your work or it will be lost. To save your work, we + recommend: +
+ ++ If you have any questions, please contact the eLearning Lab at (937) 229-5039. +
+ + + +