pari: branch 2.0 r4004 - /branches/2.0/config/welcome.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Oct 22 16:05:16 CDT 2008
Author: pari
Date: Wed Oct 22 16:05:16 2008
New Revision: 4004
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4004
Log:
Some more minor improvements to updating parked calls
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=4004&r1=4003&r2=4004
==============================================================================
--- branches/2.0/config/welcome.html (original)
+++ branches/2.0/config/welcome.html Wed Oct 22 16:05:16 2008
@@ -78,6 +78,7 @@
$(tmp_image).attr('border', '0');
var managerEvents = {};
+var manager_timers = {};
managerEvents.agentLogoutLink = function(agent){
var tmp_qlogout = document.createElement('div');
@@ -152,7 +153,10 @@
}else if( op_LC.contains('event: meetmeleave') || op_LC.contains('event: meetmejoin') ){
setTimeout( update_Conferences_Table , 1000 );
}else if( op_LC.contains('event: link') || op_LC.contains('event: unlink') ){
- update_parkedCalls_Table();
+
+ if(manager_timers.parkedCalls){ clearTimeout ( manager_timers.parkedCalls ) } ;
+ manager_timers.parkedCalls = setTimeout ( update_parkedCalls_Table , 2000 ) ;
+
} else if ( op_LC.contains('event: extensionstatus') ) {
var tmp_chunks = ASTGUI.miscFunctions.getChunksFromManagerOutput(op, 1) ;
tmp_chunks.each(function(this_chunk){
@@ -162,7 +166,10 @@
managerEvents.updateUserImage(tmp_user , new_status);
}
});
- update_parkedCalls_Table();
+
+ if(manager_timers.parkedCalls){ clearTimeout ( manager_timers.parkedCalls ) } ;
+ manager_timers.parkedCalls = setTimeout ( update_parkedCalls_Table , 2000 ) ;
+
}
}catch(err){}
})();
@@ -513,13 +520,14 @@
var newcell = newRow.insertCell( newRow.cells.length );
newcell.innerHTML = this_chunk.CallerID + ' (' + this_chunk.Channel + ') is Parked on ' + this_chunk.Exten ; // this_chunk.Timeout
});
- });
- if( !TBL.rows.length ){
+
+ if( !TBL.rows.length ){
newRow = TBL.insertRow(-1);
var newcell = newRow.insertCell( newRow.cells.length );
newcell.align = 'center' ;
newcell.innerHTML = 'No Parked Calls' ;
- }
+ }
+ });
};
var update_Conferences_Table = function(){
More information about the asterisk-gui-commits
mailing list