From 8cee8e4c6371efd5ebef35bb8c20312f52d2ee9c Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 13 Mar 2006 19:13:39 +0000 Subject: [PATCH] test for session timeout git-svn-id: svn://svn.open-ils.org/ILS/trunk@3348 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/chrome/content/util/network.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Open-ILS/xul/staff_client/chrome/content/util/network.js b/Open-ILS/xul/staff_client/chrome/content/util/network.js index 13a0a3611c..68cbde859d 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/network.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/network.js @@ -37,6 +37,7 @@ util.network.prototype = { function(req) { obj.error.sdump('D_SES_RESULT','asynced result #' + obj.link_id + '\n\n' + js2JSON(req.getResultObject())); + obj.test_session_timeout(req); f(req); } ); @@ -44,6 +45,7 @@ util.network.prototype = { return null; } else { request.send(true); + obj.test_session_timeout(request); var result = request.getResultObject(); this.error.sdump('D_SES_RESULT','synced result #' + obj.link_id + '\n\n' + js2JSON(result)); return result; @@ -55,6 +57,17 @@ util.network.prototype = { } throw(E); } + }, + + 'test_session_timeout' : function(req) { + try { + var robj = req.getResultObject(); + if (robj.ilsevent && robj.ilsevent == 1001) { + alert("Your session has timed out. In the future we may give you the ability to log back in without losing your work, but for now, the behavior at this point is undefined and this message will almost certainly be followed by error messages. Please logout of the staff client and then back in."); + } + } catch(E) { + this.error.sdump('D_ERROR',E); + } } } -- 2.43.2