pari: branch 2.0 r4333 - /branches/2.0/config/js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Dec 10 12:49:22 CST 2008


Author: pari
Date: Wed Dec 10 12:49:21 2008
New Revision: 4333

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

  Log error instead of alert()



Modified:
    branches/2.0/config/js/astman.js
    branches/2.0/config/js/index.js
    branches/2.0/config/js/welcome2.js

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=4333&r1=4332&r2=4333
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Wed Dec 10 12:49:21 2008
@@ -704,7 +704,7 @@
 		},
 
 		Error: function( msg ){ // ASTGUI.Log.Error();
-			if( !top.sessionData || !top.sessionData.DEBUG_WHICH.Error ) return;
+			if( !msg || !top.sessionData || !top.sessionData.DEBUG_WHICH.Error ) return;
 			if( msg.length <=5 && ASTGUI.errorCodes[msg] ){
 				this.doLog( '<B>' + ASTGUI.errorCodes[msg] + '</B>' , '#992b23' );
 			}else{

Modified: branches/2.0/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/index.js?view=diff&rev=4333&r1=4332&r2=4333
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Wed Dec 10 12:49:21 2008
@@ -71,7 +71,7 @@
 						onLogInFunctions.makePings.stop();
 						top.window.location.replace(top.window.location.href); return true; 
 					}else{
-						ASTGUI.Log.Debug('PING Request: Success');
+						ASTGUI.Log.Ajax('PING Request: Success');
 					}
 				};
 				$.ajax({

Modified: branches/2.0/config/js/welcome2.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/welcome2.js?view=diff&rev=4333&r1=4332&r2=4333
==============================================================================
--- branches/2.0/config/js/welcome2.js (original)
+++ branches/2.0/config/js/welcome2.js Wed Dec 10 12:49:21 2008
@@ -22,12 +22,7 @@
 var REGISTRY_OUTPUT = {};
 var manager_events = {};
 var manager_timers = {};
-var extension_loads = {};
-extension_loads.all = true;
-extension_loads.analog = true;
-extension_loads.features = true;
-extension_loads.iax = true;
-extension_loads.sip = true;
+var extension_loads = { all: true, analog: true, features: true, iax: true, sip: true };
 
 var loadTrunks = function() {
 	EX_CF = config2json({filename:'extensions.conf', usf:0 });
@@ -714,7 +709,10 @@
 			break;
 		}
 	}
-	} catch (err) { alert(err);}
+	} catch (err) {
+		ASTGUI.Log.Error('Error Parsing waitevent response : manager_events.parseOutput() ');
+		ASTGUI.Log.Error(err.description);
+	}
 
 	this.watch();
 };
@@ -1031,9 +1029,9 @@
 	mins = mins % 60;
 	secs = secs % 60;
 	if (hrs != 0) {
-		return ''+hrs.toString()+':'+mins.toString()+':'+(secs<10 ?'0':'')+secs.toString();
+		return ''+hrs.toString()+':'+mins.toString()+':'+secs.addZero();
 	} else {
-		return ''+mins.toString()+':'+(secs<10?'0':'')+secs.toString();
+		return ''+mins.toString()+':'+secs.addZero();
 	}
 };
 




More information about the asterisk-gui-commits mailing list