[open-ils-commits] r16105 - trunk/Open-ILS/web/opac/common/js (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 2 12:29:02 EDT 2010
Author: erickson
Date: 2010-04-02 12:28:59 -0400 (Fri, 02 Apr 2010)
New Revision: 16105
Modified:
trunk/Open-ILS/web/opac/common/js/opac_utils.js
Log:
when auth session times out with embedded catalog, launch the xul login dialog (instead of flopping back to the home page)
Modified: trunk/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/opac_utils.js 2010-04-02 15:58:12 UTC (rev 16104)
+++ trunk/Open-ILS/web/opac/common/js/opac_utils.js 2010-04-02 16:28:59 UTC (rev 16105)
@@ -548,9 +548,27 @@
request.send(true);
var user = request.result();
- if(!user) {
- doLogout();
- return false; /* unable to grab the session */
+ if(!user || user.textcode == 'NO_SESSION') {
+
+ if(isXUL()) {
+ dojo.require('openils.XUL');
+ openils.XUL.getNewSession(
+ function(success, authtoken) {
+ if(success) {
+ ses = authtoken;
+ var request = new Request(FETCH_SESSION, ses, 1);
+ request.request.alertEvent = false;
+ request.send(true);
+ user = request.result();
+ }
+ }
+ );
+ }
+
+ if(!user || user.textcode == 'NO_SESSION') {
+ doLogout();
+ return false; /* unable to grab the session */
+ }
}
if( !(typeof user == 'object' && user._isfieldmapper) ) {
More information about the open-ils-commits
mailing list