pari: trunk r887 - in /trunk/config: cfgbasic.html scripts/astman.js
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon May 7 09:39:37 MST 2007
Author: pari
Date: Mon May 7 11:39:36 2007
New Revision: 887
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=887
Log:
If session timed out during keepPinging, then show login page
Modified:
trunk/config/cfgbasic.html
trunk/config/scripts/astman.js
Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=887&r1=886&r2=887
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Mon May 7 11:39:36 2007
@@ -59,10 +59,10 @@
parameters: "action=ping",
asynchronous: true,
onComplete: function(t){
- //if( t.responseText.match("Authentication failed") || t.responseText =="" ){
- // window.clearInterval(keepPinging);
- //}
- // For some reason, I could not get clearInterval to work. I will fix this soon. - pari
+ if( t.responseText.match(asterisk_guipingerror) ){
+ window.location.href=window.location.href;
+ }
+
}
};
tmp = new Ajax.Request( asterisk_rawmanPath, opt);
Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=887&r1=886&r2=887
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Mon May 7 11:39:36 2007
@@ -20,6 +20,7 @@
*/
var sc_displaytime = 1000;
+var asterisk_guipingerror = "Message: Authentication Required";
var asterisk_guiappname = "Asterisk GUI (Beta)";
var asterisk_guitools = "asterisk_guitools";
var asterisk_guitoolsversion = "0.7";
@@ -1603,7 +1604,7 @@
me.eventcallback(msgs);
};
this.eventResponse = function(t) {
- if( t.responseText.match("Message: Authentication Required") ){
+ if( t.responseText.match(asterisk_guipingerror) ){
parent.window.location.href = parent.window.location.href ;
}
var _nu = navigator.userAgent;
More information about the asterisk-gui-commits
mailing list