pari: branch 2.0 r3775 - in /branches/2.0/config: js/astman.js welcome.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Sep 5 17:30:12 CDT 2008


Author: pari
Date: Fri Sep  5 17:30:11 2008
New Revision: 3775

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3775
Log:

 Show status of all user Extensions/Devices in welcome screen

 Real time status updates will be added soon.



Modified:
    branches/2.0/config/js/astman.js
    branches/2.0/config/welcome.html

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=3775&r1=3774&r2=3775
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Fri Sep  5 17:30:11 2008
@@ -445,6 +445,29 @@
 		return null;
 	},
 
+	getUser_DeviceStatus_Image : function( usr ){ // ASTGUI.getUser_DeviceStatus_Image(usr) 
+		var s =  this.getUser_DeviceStatus(usr) ;
+		switch(s){
+			case 'F': // No Device is Busy/InUse
+				return "<img src='images/status_green.png' border=0>";
+				break ;
+			case 'B': // Busy
+				return "<img src='images/status_red.png' border=0>";
+				break ;
+			case 'U': // UnAvailable
+				return "<img src='images/status_gray.png' border=0>";
+				break ;
+			case 'R': // Ringing
+				return "<img src='images/status_orange.png' border=0>";
+				break ;
+			case 'H': // Hold
+				return "<img src='images/status_yellow.png' border=0>";
+				break ;
+			default :
+				return "<img src='images/status_gray.png' border=0>";
+				break ;
+		}
+	},
 
 	mailboxCount : function(mbox){ // ASTGUI.mailboxCount(mox) ; --> returns the number of New/Old Messages in mbox's mailbox
 		if(!mbox.contains('@')){ mbox = mbox + '@default' ; }

Modified: branches/2.0/config/welcome.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/welcome.html?view=diff&rev=3775&r1=3774&r2=3775
==============================================================================
--- branches/2.0/config/welcome.html (original)
+++ branches/2.0/config/welcome.html Fri Sep  5 17:30:11 2008
@@ -213,7 +213,7 @@
 					var tmp_userstring = '<u>' + user + '</u>' ;
 				}
 
-				addCell( newRow , { html: '' } );
+				addCell( newRow , { html: ASTGUI.getUser_DeviceStatus_Image(user) } );
 				addCell( newRow ,
 					{	html: tmp_userstring ,
 						onclickFunction: function(){




More information about the asterisk-gui-commits mailing list