pari: branch 2.0 r3841 - /branches/2.0/config/welcome.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Sep 18 16:48:24 CDT 2008


Author: pari
Date: Thu Sep 18 16:48:24 2008
New Revision: 3841

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

 Option to make an agent logged-in from the gui, AgentCallBacklogin on his own extension (default)



Modified:
    branches/2.0/config/welcome.html

Modified: branches/2.0/config/welcome.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/welcome.html?view=diff&rev=3841&r1=3840&r2=3841
==============================================================================
--- branches/2.0/config/welcome.html (original)
+++ branches/2.0/config/welcome.html Thu Sep 18 16:48:24 2008
@@ -84,13 +84,21 @@
 	tmp_qlogout.innerHTML = '<u>Logout</u>';
 	$(tmp_qlogout).css({ cursor : 'pointer', 'font-size': '80%', color: '#ADADAD' });
 	ASTGUI.events.add( tmp_qlogout, 'click' , function(){
-		$.ajax({ type: 'GET', url: ASTGUI.paths.rawman, data: 'action=AgentLogoff&Agent='+ agent +'&Soft=true',
-			success: function(){}
-		});
+		$.ajax({ type: 'GET', url: ASTGUI.paths.rawman, data: 'action=AgentLogoff&Agent='+ agent +'&Soft=true', success: function(){} });
 	});
 	return tmp_qlogout;
 };
 
+
+ managerEvents.agentLoginLink = function(agent){ // 
+	var tmp_qlogout = document.createElement('div');
+	tmp_qlogout.innerHTML = '<u>Login</u>';
+	$(tmp_qlogout).css({ cursor : 'pointer', 'font-size': '80%', color: '#5a7dd6' });
+	ASTGUI.events.add( tmp_qlogout, 'click' , function(){
+		$.ajax({ type: 'GET', url: ASTGUI.paths.rawman, data: 'action=AgentCallbackLogin&Agent='+ agent +'&Exten='+ agent, success: function(){} });
+	});
+	return tmp_qlogout;
+};
 
 managerEvents.updateUserImage = function(user , user_status){
 	var this_td = _$('TD_USER_DEVICE_STATUS_' + user );
@@ -530,6 +538,7 @@
 
 				}else{
 					newcell.innerHTML = "<img src='images/agent_loggedout.png' border=0><BR>" + tmp_agent ;
+					newcell.appendChild( managerEvents.agentLoginLink(tmp_agent) );
 				}
 			}
 		});




More information about the asterisk-gui-commits mailing list