espiceland: branch 2.0 r5172 - /branches/2.0/config/js/welcome.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Apr 5 12:18:36 CDT 2011
Author: espiceland
Date: Tue Apr 5 12:18:33 2011
New Revision: 5172
URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5172
Log:
Handle errors pertaining to unknown status from manager events more gracefully for 1.8 compatibility.
Modified:
branches/2.0/config/js/welcome.js
Modified: branches/2.0/config/js/welcome.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/welcome.js?view=diff&rev=5172&r1=5171&r2=5172
==============================================================================
--- branches/2.0/config/js/welcome.js (original)
+++ branches/2.0/config/js/welcome.js Tue Apr 5 12:18:33 2011
@@ -811,6 +811,9 @@
manager_events.updateExtension = function(exten, context, state) {
var exten_status_img = $('#exten_status_'+exten.toString()+' img');
+ if (typeof state == 'undefined') {
+ state = "Unknown";
+ }
switch(state.toString()) {
case '-1': /* Invalid */
var state = 'Invalid';
@@ -872,13 +875,8 @@
break;
default:
top.log.debug("updateExtension :: We have encountered an unknown extension state of " + state.toString());
- if ( top.sessionData.DEBUG_MODE ) {
- alert('updateExtension:\r\n'
- +'status: '+state.toString()+'\r\n'
- +'exten: '+exten.toString()+'\r\n'
- +'context: '+context.toString()+'\r\n'
- );
- }
+ var state = 'Unknown';
+ exten_status_img.attr('src','images/status_gray.png');
break;
}
More information about the asterisk-gui-commits
mailing list