pari: trunk r260 - in /trunk/config: home.html homeapp.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Jan 16 18:12:39 MST 2007


Author: pari
Date: Tue Jan 16 19:12:38 2007
New Revision: 260

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=260
Log:
BugFix: Clicking on the 'Home' panel while logged in is triggering two pollevents.

Modified:
    trunk/config/home.html
    trunk/config/homeapp.html

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?view=diff&rev=260&r1=259&r2=260
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Tue Jan 16 19:12:38 2007
@@ -51,7 +51,6 @@
 			localloggedon = 1;
 			parent.document.getElementById('logoutlink').innerHTML = "Logout";
 			parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
-			parent.astmanEngine.pollEvents();
 			alert("You are using the default password provided by AsteriskNOW !! \n\n It is strongly recommended that you chnage your default password ");
 			window.location.href="options.html";
 			return;
@@ -72,7 +71,6 @@
 		$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
 		parent.document.getElementById('logoutlink').innerHTML = "Logout";
 		parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
-		parent.astmanEngine.pollEvents();
 	}
 	
 	function loggedOff() {
@@ -94,6 +92,7 @@
 		resp = msgs[0].headers['response'];
 		if (resp == "Success" || msgs[0].headers['message'] == "Invalid/unknown command" ){
 			$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
+			parent.astmanEngine.pollEvents();
 			loggedOn();
 		}else
 			loggedOff();

Modified: trunk/config/homeapp.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/homeapp.html?view=diff&rev=260&r1=259&r2=260
==============================================================================
--- trunk/config/homeapp.html (original)
+++ trunk/config/homeapp.html Tue Jan 16 19:12:38 2007
@@ -58,7 +58,7 @@
 		$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
 		parent.document.getElementById('logoutlink').innerHTML = "Logout";
 		parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
-		parent.astmanEngine.pollEvents();
+		//parent.astmanEngine.pollEvents();
 	}
 	
 	function loggedOff() {
@@ -97,10 +97,12 @@
 	demo.logins = function(msgs) {
 		$('statusbar').innerHTML = msgs[0].headers['message'];
 		resp = msgs[0].headers['response'];
-		if (resp == "Success")
+		if (resp == "Success"){
+			parent.astmanEngine.pollEvents();
 			loggedOn();
-		else
+		}else{
 			loggedOff();
+		}
 	};
 	
 	demo.pongs  = function(msgs) {



More information about the asterisk-gui-commits mailing list