pari: branch 2.0 r3840 - /branches/2.0/config/welcome.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Sep 18 16:40:45 CDT 2008
Author: pari
Date: Thu Sep 18 16:40:44 2008
New Revision: 3840
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3840
Log:
Agent Logout link
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=3840&r1=3839&r2=3840
==============================================================================
--- branches/2.0/config/welcome.html (original)
+++ branches/2.0/config/welcome.html Thu Sep 18 16:40:44 2008
@@ -78,6 +78,19 @@
$(tmp_image).attr('border', '0');
var managerEvents = {};
+
+ managerEvents.agentLogoutLink = function(agent){
+ var tmp_qlogout = document.createElement('div');
+ 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(){}
+ });
+ });
+ return tmp_qlogout;
+};
+
managerEvents.updateUserImage = function(user , user_status){
var this_td = _$('TD_USER_DEVICE_STATUS_' + user );
@@ -511,8 +524,10 @@
newcell.align = 'center' ;
if(tmp_agent_Status != 'AGENT_LOGGEDOFF'){ // logged in
- newcell.innerHTML = "<img src='images/agent_loggedin.png' border=0><BR>" + tmp_agent
- + '<BR>Logged On: ' + this_chunk.LoggedInChan ;
+ newcell.innerHTML = "<img src='images/agent_loggedin.png' border=0 alt='Logged On: " + this_chunk.LoggedInChan + "'><BR>" + tmp_agent ;
+
+ newcell.appendChild( managerEvents.agentLogoutLink(tmp_agent) );
+
}else{
newcell.innerHTML = "<img src='images/agent_loggedout.png' border=0><BR>" + tmp_agent ;
}
More information about the asterisk-gui-commits
mailing list