bkruse: branch group/new_exp r1814 - /team/group/new_exp/scripts/astman.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Nov 19 15:20:18 CST 2007


Author: bkruse
Date: Mon Nov 19 15:20:17 2007
New Revision: 1814

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1814
Log:
fixing the ping response matching


Modified:
    team/group/new_exp/scripts/astman.js

Modified: team/group/new_exp/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/team/group/new_exp/scripts/astman.js?view=diff&rev=1814&r1=1813&r2=1814
==============================================================================
--- team/group/new_exp/scripts/astman.js (original)
+++ team/group/new_exp/scripts/astman.js Mon Nov 19 15:20:17 2007
@@ -271,11 +271,11 @@
 
 	CheckLogin: function(){
 		var verifyPingResult = function(t) {
-			if(t.match(ASTGUI.globals.msg_notLoggedIn)){
+			if(t.match('Response: Pong')){
+				session.justLoggedIn();
+			}else{
 				$(".accordionAndActive_div").hide();
 				ASTGUI.feedback( {msg: langs[lg]['loginmsg'] , showfor : 6, color: '#000000' , bgcolor: '#FFFFFF'} );
-			}else{
-				session.justLoggedIn();
 			}
 		};
 		makeRequest({ action:'ping', callback: verifyPingResult });
@@ -300,7 +300,7 @@
 
 	startPings: function(){
 		var verifyPingResult = function(t) {
-			if(t.match(ASTGUI.globals.msg_notLoggedIn)){ window.location.href=window.location.href; return true; }
+			if(!t.match('Response: Pong')){ window.location.href=window.location.href; return true; }
 		};
 		keepPinging = setInterval( function(){ makeRequest({ action :'ping', callback: verifyPingResult }); }, ASTGUI.globals.pingInterval );
 	},




More information about the asterisk-gui-commits mailing list