pari: trunk r631 - /trunk/config/home.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Apr 9 15:17:43 MST 2007


Author: pari
Date: Mon Apr  9 17:17:43 2007
New Revision: 631

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=631
Log:
Show feedback on Invalid Login

Modified:
    trunk/config/home.html

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?view=diff&rev=631&r1=630&r2=631
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Mon Apr  9 17:17:43 2007
@@ -91,13 +91,19 @@
 
 demo.logins = function(msgs) {
 	_$('statusbar').innerHTML = msgs[0].headers['message'];
-	resp = msgs[0].headers['response'];
-	if (resp == "Success" || msgs[0].headers['message'] == "Invalid/unknown command" ){
+	if ( msgs[0].headers['response'] == "Success" ){
+		parent.gui_feedback("Login Successful",'blue',6000);
 		_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
 		parent.astmanEngine.pollEvents();
 		loggedOn();
-	}else
+	}else if( msgs[0].headers['message'] == "Authentication failed" ){
+		parent.gui_feedback("Invalid Username/Password",'default',6000);
+		_$('username').focus();
+		_$('username').select();
 		loggedOff();
+	}else{
+		loggedOff();
+	}
 };
 
 demo.pongs  = function(msgs) {
@@ -216,4 +222,4 @@
 	</tr>
 </table>
 </div>
-</body>
+</body>



More information about the asterisk-gui-commits mailing list