rbrindley: branch 2.0 r4571 - in /branches/2.0/config: ./ js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Mar 5 08:32:39 CST 2009


Author: rbrindley
Date: Thu Mar  5 08:32:35 2009
New Revision: 4571

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

- merged latest changes from astman_revamp branch


Modified:
    branches/2.0/config/asterisklogs.html
    branches/2.0/config/home.html
    branches/2.0/config/js/astman.js
    branches/2.0/config/js/backup.js
    branches/2.0/config/js/bulkadd.js
    branches/2.0/config/js/dialplans.js
    branches/2.0/config/js/flashupdate.js
    branches/2.0/config/js/hardware.js
    branches/2.0/config/js/hardware_aa50.js
    branches/2.0/config/js/hardware_dahdi.js
    branches/2.0/config/js/incoming.js
    branches/2.0/config/js/index.js
    branches/2.0/config/js/log.js
    branches/2.0/config/js/pbx.js
    branches/2.0/config/js/timezone.js
    branches/2.0/config/js/welcome.js
    branches/2.0/config/sysinfo.html
    branches/2.0/config/upload_abe_overlay.html
    branches/2.0/config/upload_form.html
    branches/2.0/config/welcome.html

Modified: branches/2.0/config/asterisklogs.html
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/asterisklogs.html?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/asterisklogs.html (original)
+++ branches/2.0/config/asterisklogs.html Thu Mar  5 08:32:35 2009
@@ -38,7 +38,7 @@
 	var lm = sel_date.split(' ')[1]; lm = lm.trim();
 	var tmp_cmd = "/bin/grep /var/log/asterisk/messages -e '" + lm + space + ld + " ' " ;
 	parent.ASTGUI.dialog.waitWhile(' Loading Asterisk Logs ...');
-	ASTGUI.Log.Debug(tmp_cmd);
+	top.log.debug(tmp_cmd);
 	ASTGUI.systemCmdWithOutput( tmp_cmd , function(output){
 		parent.ASTGUI.dialog.hide();
 		_$('todaylog').innerHTML = (output) ? "<PRE>" + output.escapeHTML() + "</PRE>" : "No log messages found on this Day" ;

Modified: branches/2.0/config/home.html
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/home.html?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/home.html (original)
+++ branches/2.0/config/home.html Thu Mar  5 08:32:35 2009
@@ -57,7 +57,7 @@
 	var f = makeSyncRequest({ action :'login', username: DOM_username.value, secret: DOM_secret.value });
 	f = f.toLowerCase();
 	if(f.match('authentication accepted')){
-		ASTGUI.Log.Debug("Login Success result: " + f);
+		top.log.debug("Login Success result: " + f);
 		setLoggedIn( { welcome_redirect: false } );
 		DOM_secret.blur();
 		parent.ASTGUI.dialog.waitWhile(' <font color=#005119><b>Login Success</b></font>');
@@ -77,7 +77,7 @@
 		}
 		return;
 	}else if(f.match('authentication failed') ) {
-		ASTGUI.Log.Debug("Login failure result: " + f);
+		top.log.debug("Login failure result: " + f);
 		ASTGUI.feedback({msg:'Invalid Username or Password', showfor: 4, color:'#c42421'}) ;
 		DOM_secret.focus();
 		DOM_secret.select();

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Thu Mar  5 08:32:35 2009
@@ -483,10 +483,10 @@
 		// ASTGUI.cliCommand(cmd);
 		//	Execute an asterisk CLI command and return the output
 		if( typeof cmd != 'string' ) {
-			ASTGUI.Log.Warn( 'cliCommand: Expecting cmd as String' );
+			top.log.warn( 'cliCommand: Expecting cmd as String' );
 			return '';
 		}
-		ASTGUI.Log.Debug("Executing manager command : '" + cmd + "'");
+		top.log.debug("Executing manager command : '" + cmd + "'");
 		return makeSyncRequest ( { action :'command', command: cmd } );
 	},
 
@@ -495,7 +495,7 @@
 		//	Get the DeviceStatus for a UserExtension
 		if( typeof usr == 'number' ) usr = String(usr);
 		if( typeof usr != 'string' ){
-			ASTGUI.Log.Warn( 'getUser_DeviceStatus: Expecting usr as String' );
+			top.log.warn( 'getUser_DeviceStatus: Expecting usr as String' );
 			return 'U';
 		}
 		var t = makeSyncRequest({ action :'ExtensionState', Exten: usr }) ;
@@ -536,7 +536,7 @@
 		var tr = { count_new:0 , count_old : 0 };
 		if( typeof mbox == 'number' ) mbox = String(mbox);
 		if( typeof mbox != 'string' ){
-			ASTGUI.Log.Warn( 'mailboxCount: Expecting mbox as String' );
+			top.log.warn( 'mailboxCount: Expecting mbox as String' );
 			return tr;
 		}
 		if(!mbox.contains('@')){ mbox = mbox + '@default' ; }
@@ -561,14 +561,14 @@
 	doTransfer : function(from, to) {
 		// ASTGUI.doTransfer(from, to)
 		//	issue channel redirect
-		ASTGUI.Log.Debug("About to transfer " + from + " to " + to);
+		top.log.debug("About to transfer " + from + " to " + to);
 		return makeSyncRequest ( { action :'redirect', channel :from, exten :to, context :'default', priority :'1' } );
 	},
 
 	doHangup : function(chan) {
 		// ASTGUI.doHangup(chan)
 		//	Hangsup a given channel
-		ASTGUI.Log.Debug("Executing hangup on channel : '" + chan + "'");
+		top.log.debug("Executing hangup on channel : '" + chan + "'");
 		return makeSyncRequest ( { action :'hangup', channel: chan } );
 	},
 
@@ -821,7 +821,7 @@
 			b.style.left = tmp_left + ( offsetLeft || 0 );
 			b.style.top = tmp_top + (offsetTop || 1);
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 			}
 		},
 
@@ -834,7 +834,7 @@
 				ASTGUI.domActions.alignBbelowA(a,b);
 				b.style.top = b.style.top - a.offsetHeight ;
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 			}
 		},
 
@@ -951,7 +951,7 @@
 				}
 			}
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 			}
 		},
 
@@ -994,7 +994,7 @@
 				}
 			}
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 			}
 		},
 
@@ -1209,7 +1209,7 @@
 		}
 		return '<font color=red>Unregistered</font>';
 		}catch(err){
-			ASTGUI.Log.Error(err.description);
+			top.log.error(err.description);
 		}
 	},
 
@@ -1279,7 +1279,7 @@
 			});
 		});
 		}catch(err){
-			ASTGUI.Log.Error(err.description);
+			top.log.error(err.description);
 			cb([]);
 		}
 	},
@@ -1318,7 +1318,7 @@
 
 			return tr_Array ;
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 				return [] ;
 			}
 		},
@@ -1386,7 +1386,7 @@
 				});
 			}});
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 			}
 		},
 
@@ -1409,7 +1409,7 @@
 				x.callActions(ct.cb);
 			//}
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 			}
 		},
 
@@ -1447,7 +1447,7 @@
 
 			x.callActions(ct.cb);
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 				ct.cb();
 			}
 		},
@@ -1478,7 +1478,7 @@
 
 			return [chs];
 			}catch(err){
-				ASTGUI.Log.Warn( err.description );
+				top.log.warn( err.description );
 				return [chs];
 			}
 		},
@@ -1507,7 +1507,7 @@
 
 			var match = ampmTime.match(pattern);
 			if (match == null) {
-				ASTGUI.Log.Debug('ampmTime is not in a valid format.');
+				top.log.debug('ampmTime is not in a valid format.');
 				return '';
 			}
 
@@ -1517,10 +1517,10 @@
 			ampm = match[4] || null;
 
 			if (!ampm && (hour < 0 || hour > 23)) {
-				ASTGUI.Log.Debug('ampmTime must have its hour inbetween 0 and 23.');
+				top.log.debug('ampmTime must have its hour inbetween 0 and 23.');
 				return '';
 			} else if (ampm && (hour < 0 || hour > 12)) {
-				ASTGUI.Log.Debug('ampmTime must have its hour inbetween 0 and 12 if "AM|PM" exists');
+				top.log.debug('ampmTime must have its hour inbetween 0 and 12 if "AM|PM" exists');
 				return '';
 			} else if (ampm) {
 				if (ampm.match('[pP][mM]')) {
@@ -1530,7 +1530,7 @@
 			hour = (hour < 10) ? hour.addZero() : hour;
 
 			if (minute < 0 || minute > 59) {
-				ASTGUI.Log.Debug('ampmTime must have its minute inbetween 0 and 59');
+				top.log.debug('ampmTime must have its minute inbetween 0 and 59');
 				return '';
 			}
 			minute = minute < 10 ? minute.addZero() : minute;
@@ -1646,7 +1646,7 @@
 					return q.substring(l+1);
 				}
 			}
-			ASTGUI.Log.Error( "ASTGUI.parseContextLine.getAppWithArgs() could not parse \"" + q + "\" " );
+			top.log.error( "ASTGUI.parseContextLine.getAppWithArgs() could not parse \"" + q + "\" " );
 			return '';
 		},
 
@@ -1665,7 +1665,7 @@
 			if (typeof q != 'string' || !q ) return [];
 			q = q.trim();
 			if ( !q.endsWith(')') || !q.contains('(') ){
-				ASTGUI.Log.Error( "ASTGUI.parseContextLine.getArgs() - No Argument found for \"" + q + "\" " );
+				top.log.error( "ASTGUI.parseContextLine.getArgs() - No Argument found for \"" + q + "\" " );
 				return [];
 			}
 			var y = ASTGUI.parseContextLine.getAppWithArgs(q);
@@ -1743,7 +1743,7 @@
 			}
 			return 'Goto ' + args.join() ;
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 				return 'Goto ' + args.join() ;
 			}
 		},
@@ -1754,7 +1754,7 @@
 			// returns - "User extension" or 'VoiceMenu extension' or 'Hangup' or 'Busy' or some string - depends on q.
 			// use this when you want to represent the action to the user
 			if (typeof q != 'string') {
-				ASTGUI.Log.Error('ASTGUI.parseContextLine.showAs: expecting q as string');
+				top.log.error('ASTGUI.parseContextLine.showAs: expecting q as string');
 				return '??';
 			}
 			var app = ASTGUI.parseContextLine.getApp(q) ;
@@ -1869,7 +1869,7 @@
 		parseTrunkDialArgument: function(y){ // usage ASTGUI.parseContextLine.parseTrunkDialArgument(y)
 			// expects y as  '${trunk_1}/XXX${EXTEN:X}' OR SIP/user/XXX${EXTEN:X}
 			if( !y || typeof y != 'string') {
-				ASTGUI.Log.Error('ASTGUI.parseContextLine.parseTrunkDialArgument: expecting y as string');
+				top.log.error('ASTGUI.parseContextLine.parseTrunkDialArgument: expecting y as string');
 				return { name : '', channel : '', prepend : '', stripx : '' };
 			}
 			var WhatToDial = '';
@@ -1930,7 +1930,7 @@
 					}
 			*/
 			if (typeof str != 'string') {
-				ASTGUI.Log.Error('ASTGUI.parseContextLine.obCallingRule: expecting str as string');
+				top.log.error('ASTGUI.parseContextLine.obCallingRule: expecting str as string');
 				return null;
 			}
 
@@ -2011,7 +2011,7 @@
 			if ( typeof el == 'string'){
 				el = _$(el) ;
 				if( !el ){
-					ASTGUI.Log.Error( 'No Element by that id ' );
+					top.log.error( 'No Element by that id ' );
 					return;
 				}
 			}
@@ -2330,7 +2330,7 @@
 	systemCmd: function(cmd, callbackfunction){
 		// ASTGUI.systemCmd(cmd, cbf);
 		//	Execute a Unix system command
-		ASTGUI.Log.Debug("Executing System Command : '" + cmd + "'");
+		top.log.debug("Executing System Command : '" + cmd + "'");
 		var delay_cb = function(){
 			if( parent.sessionData.PLATFORM.isAA50 ){
 				setTimeout( callbackfunction , 500 );
@@ -2470,7 +2470,7 @@
 				}
 				break;
 			case 'radio':
-				ASTGUI.Log.Error('You are on your own with Radio Buttons');
+				top.log.error('You are on your own with Radio Buttons');
 				break ;
 			case 'select-one':
 				ASTGUI.selectbox.selectOption(el, val);
@@ -2715,10 +2715,10 @@
 	if( params.action == "updateconfig" ){
 		params.srcfilename = params.filename;
 		params.dstfilename = params.filename;
-		if(top.sessionData && top.sessionData.DEBUG_MODE ){ASTGUI.Log.Ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(params) + "'");}
+		if(top.sessionData && top.sessionData.DEBUG_MODE ){top.log.ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(params) + "'");}
 		delete params.filename;
 	}else{
-		if(top.sessionData && top.sessionData.DEBUG_MODE ){ASTGUI.Log.Ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(params) + "'");}
+		if(top.sessionData && top.sessionData.DEBUG_MODE ){top.log.ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(params) + "'");}
 	}
 
 	$.get(ASTGUI.paths.rawman, params, cb);
@@ -2726,7 +2726,7 @@
 
 var makeSyncRequest = function( params){ // for making synchronus requests
 	// usage ::  makeSyncRequest ( { action :'getconfig', filename: 'something.conf' } ) // no need for call back function
-	if(top.sessionData && top.sessionData.DEBUG_MODE ){ASTGUI.Log.Ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(params) + "'");}
+	if(top.sessionData && top.sessionData.DEBUG_MODE ){top.log.ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(params) + "'");}
 	var s = $.ajax({ url: ASTGUI.paths.rawman, data: params , async: false });
 	return s.responseText;
 };
@@ -2780,7 +2780,7 @@
 		return toJSO( params.configFile_output );
 	};
 
-	ASTGUI.Log.Ajax("AJAX Request : reading '" +  params.filename + "'");
+	top.log.ajax("AJAX Request : reading '" +  params.filename + "'");
 
 	if( top.sessionData.FileCache.hasOwnProperty(params.filename) &&  top.sessionData.FileCache[params.filename].modified == false){ // if file is in cache and is not modified since
 		var s = top.sessionData.FileCache[params.filename].content ;
@@ -2799,9 +2799,9 @@
 	if(s.contains('Response: Error') && ( s.contains('Message: Config file not found') || s.contains('Message: Permission denied') ) ){
 		// return ASTGUI.globals.fnf; // return 'file not found'
 		if(s.contains('Message: Config file not found'))
-			ASTGUI.Log.Error( ' config file(' + params.filename +') not found ' );	
+			top.log.error( ' config file(' + params.filename +') not found ' );	
 		if(s.contains('Message: Permission denied'))
-			ASTGUI.Log.Error('permission denied for reading file ' + params.filename );
+			top.log.error('permission denied for reading file ' + params.filename );
 
 		return (params.usf) ? new ASTGUI.customObject : [] ;
 	}
@@ -2872,7 +2872,7 @@
 		return toJSO( params.configFile_output );
 	};
 
-	ASTGUI.Log.Ajax("AJAX Request : reading '" +  params.filename + "'");
+	top.log.ajax("AJAX Request : reading '" +  params.filename + "'");
 
 	if( top.sessionData.FileCache.hasOwnProperty(params.filename) &&  top.sessionData.FileCache[params.filename].modified == false){ // if file is in cache and is not modified since
 		var s = top.sessionData.FileCache[params.filename].content ;
@@ -2886,11 +2886,11 @@
 
 	if( s.contains('Response: Error') && s.contains('Message: Config file not found') ){
 		// return ASTGUI.globals.fnf; // return 'file not found'
-		ASTGUI.Log.Error( ' config file(' + params.filename +') not found ' );
+		top.log.error( ' config file(' + params.filename +') not found ' );
 		return new ASTGUI.customObject;
 	}
 	if( s.contains('Response: Error') && s.contains('Message: Permission denied') ){
-		ASTGUI.Log.Error('permission denied for reading file ' + params.filename );
+		top.log.error('permission denied for reading file ' + params.filename );
 		return new ASTGUI.customObject;
 	}
 
@@ -2952,7 +2952,7 @@
 
 		var cnt = "" + this.actionCount;
 		if(this.actionCount > 5){
-			ASTGUI.Log.Error('AG150'); // alert to developer
+			top.log.error('AG150'); // alert to developer
 		}
 		while(cnt.length < 6){ cnt = "0" + cnt; }
 		this.params['Action-' + cnt] = action; // jquery takes care of encodeURIComponent(action) 
@@ -2975,7 +2975,7 @@
 	callActions: function(){
 		if(!this.actionCount){ return 'Response: Success'; }
 		if(top.sessionData.DEBUG_MODE ){
-			ASTGUI.Log.Ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(this.params) + "'"); 
+			top.log.ajax("AJAX Request : '" + ASTGUI.getObjectPropertiesAsString(this.params) + "'"); 
 		}
 		var s = $.ajax({ url: ASTGUI.paths.rawman, data: this.params , async: false });
 		return s.responseText;
@@ -3100,7 +3100,7 @@
 		var start_sqreqs = function(st){
 			var f = treq[ 'act_' + st ];
 			if(f){
-				ASTGUI.Log.Ajax("AJAX Request : '" + pre_uri + f + "'");
+				top.log.ajax("AJAX Request : '" + pre_uri + f + "'");
 				$.ajax({ type: "GET", url: ASTGUI.paths.rawman, data: pre_uri + f , success: function(msg){
 					if( msg && typeof msg == 'string' && msg.contains('Response: Error') && msg.contains('Message:') ){
 						var err_msg = msg.afterStr('Message:');
@@ -3123,7 +3123,7 @@
 		if( top.sessionData ){
 			window.onerror = function(err, url, errcode ){ // Log any errors on this page
 				var msg = 'ErrorCode / LineNumber : ' + errcode  + '<BR> Error : ' + err + '<BR> Location: ' + url ;
-				ASTGUI.Log.Error(msg);
+				top.log.error(msg);
 				ASTGUI.dialog.hide();
 				if( top.sessionData && top.sessionData.DEBUG_MODE ){ // show alerts only in debug mode
 					var alertmsg = 'ErrorCode / LineNumber : ' + errcode  + '\n Error : ' + err + '\n Location: ' + url ;

Modified: branches/2.0/config/js/backup.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/backup.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/backup.js (original)
+++ branches/2.0/config/js/backup.js Thu Mar  5 08:32:35 2009
@@ -40,7 +40,7 @@
 		return;
 	}
 	if(!top.sessionData.httpConf.postmappings_defined || !top.sessionData.httpConf.uploadPaths['backups'] ){
-		ASTGUI.Log.Error('AG102');
+		top.log.error('AG102');
 		$('#uploadForm_container').hide();
 		return ;
 	}

Modified: branches/2.0/config/js/bulkadd.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/bulkadd.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/bulkadd.js (original)
+++ branches/2.0/config/js/bulkadd.js Thu Mar  5 08:32:35 2009
@@ -121,7 +121,7 @@
 		}
 
 		newusers_list.push(tmp_nu);
-			ASTGUI.Log.Debug( 'adding user ' + tmp_nu);
+			top.log.debug( 'adding user ' + tmp_nu);
 			NEW_USERS[ tmp_nu ] = {} ;
 			NEW_USERS[ tmp_nu ]['fullname'] = 'User ' + tmp_nu;
 			NEW_USERS[ tmp_nu ]['cid_number'] = tmp_nu;

Modified: branches/2.0/config/js/dialplans.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/dialplans.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/dialplans.js (original)
+++ branches/2.0/config/js/dialplans.js Thu Mar  5 08:32:35 2009
@@ -168,7 +168,7 @@
 					}
 				}
 			}catch(err){
-				ASTGUI.Log.Error(err.description);
+				top.log.error(err.description);
 			}
 
 			addCell( newRow , { html: dr_woPfx.join(', ') } );

Modified: branches/2.0/config/js/flashupdate.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/flashupdate.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/flashupdate.js (original)
+++ branches/2.0/config/js/flashupdate.js Thu Mar  5 08:32:35 2009
@@ -229,7 +229,7 @@
 
 var onUploadForm_load = function(){
 	if(!top.sessionData.httpConf.postmappings_defined || !top.sessionData.httpConf.uploadPaths['backups'] ){
-		ASTGUI.Log.Error('AG102');
+		top.log.error('AG102');
 		$('#uploadForm_container').hide();
 		return ;
 	}

Modified: branches/2.0/config/js/hardware.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/hardware.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/hardware.js (original)
+++ branches/2.0/config/js/hardware.js Thu Mar  5 08:32:35 2009
@@ -130,14 +130,14 @@
 	if(configured_devices.length == detected_devices.length){
 		for(var l=0; l < configured_devices.length; l++){
 			if(configured_devices[l] != detected_devices[l]){ // devices does not match - but the number of devices match
-				ASTGUI.Log.Debug("DEVICES or basechans does not MATCHED");
+				top.log.debug("DEVICES or basechans does not MATCHED");
 				return true;
 			}
 		}
-		ASTGUI.Log.Debug("DEVICES and basechans MATCH");
+		top.log.debug("DEVICES and basechans MATCH");
 		return false;
 	}else{	
-		ASTGUI.Log.Debug("DEVICES or basechans does not MATCHED");
+		top.log.debug("DEVICES or basechans does not MATCHED");
 		return true;
 	}
 }
@@ -343,7 +343,7 @@
 	//   check if the channels in zapchan are within max and min
 	//   if yes then set the current range values
 	load_hwcfgfile: function(){ // read hwcfgfile (if exists) into CONFIGUREDHARDWARE 
-		ASTGUI.Log.Debug("load last configured hardware information, start function: loadConfigFiles.load_hwcfgfile()");
+		top.log.debug("load last configured hardware information, start function: loadConfigFiles.load_hwcfgfile()");
 		var n = config2json({filename:hwcfgfile, usf:1});
 		if( n.getOwnProperties().length == 0 ){ // if file not found or no previous hardware detected
 				hwchanged = -1;
@@ -359,22 +359,22 @@
 			}}
 			loadConfigFiles.runZtscan();
 		}
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.load_hwcfgfile()");
+		top.log.debug("end of function: loadConfigFiles.load_hwcfgfile()");
 	},
 
 	runZtscan: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.runZtscan()");
+		top.log.debug("start function: loadConfigFiles.runZtscan()");
 
 		ASTGUI.miscFunctions.createConfig( 'applyzap.conf', function(){
 			parent.ASTGUI.systemCmd( top.sessionData.directories.app_Ztscan , function(){ // run ztscan and then try loading ztscan.conf
 				window.setTimeout( loadConfigFiles.readZtscanConf , 700 ); // leave some time for ztscan to generate ztscan.conf
 			});
-			ASTGUI.Log.Debug("end of function: loadConfigFiles.runZtscan()");
+			top.log.debug("end of function: loadConfigFiles.runZtscan()");
 		});
 	},
 
 	readZtscanConf: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.readZtscanConf()");
+		top.log.debug("start function: loadConfigFiles.readZtscanConf()");
 		var ztsc = $.ajax({ url: ASTGUI.paths.rawman+'?action=getconfig&filename=ztscan.conf', async: false }).responseText;
 		var ztsc_Lower = ztsc.toLowerCase();
 		if( ztsc_Lower.contains('response: error') && ztsc_Lower.contains('message: config file not found') ){
@@ -439,12 +439,12 @@
 			}}
 		}}
 		if(hwchanged != -1){ hwchanged = detectHwChanges(); }
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.readZtscanConf()");
+		top.log.debug("end of function: loadConfigFiles.readZtscanConf()");
 		loadConfigFiles.readUsersConf(); // read span_x (where T1/E1 trunks are defined)
 	},
 
 	readUsersConf: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.readUsersConf()");
+		top.log.debug("start function: loadConfigFiles.readUsersConf()");
 
 		var usrs = $.ajax({ url: ASTGUI.paths.rawman+'?action=getconfig&filename=users.conf', async: false }).responseText;
 		var usrs_Lower = usrs.toLowerCase();
@@ -513,12 +513,12 @@
 				}
 			}}
 		})();
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.readUsersConf()");
+		top.log.debug("end of function: loadConfigFiles.readUsersConf()");
 		showtable();
 	},
 
 	load_zaptel_conf: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.load_zaptel_conf()");
+		top.log.debug("start function: loadConfigFiles.load_zaptel_conf()");
 		// we parse zaptel.conf to get the loadzone and syncsrc for each span
 		var tmp_file = ASTGUI.globals.zaptelIncludeFile;
 		var parseZaptelconf = function(zp){
@@ -572,7 +572,7 @@
 				parseZaptelconf(q);
 			}
 		}
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.load_zaptel_conf()");
+		top.log.debug("end of function: loadConfigFiles.load_zaptel_conf()");
 	}
 };
 
@@ -1031,7 +1031,7 @@
 
 
 var localajaxinit = function(){
-	ASTGUI.Log.Debug("Starting Loading Page digital.html .. start function: window.onload()");
+	top.log.debug("Starting Loading Page digital.html .. start function: window.onload()");
 	portsSignalling = ASTGUI.cloneObject(parent.sessionData.PORTS_SIGNALLING);
 
 	ASTGUI.domActions.enableDisableByCheckBox ('enable_disable_checkbox_opermode', 'opermode') ;
@@ -1119,7 +1119,7 @@
 
 	ASTGUI.events.add( _$('edit_DefinedChans'), "change", edit_DefinedChans_changed );
 
-	ASTGUI.Log.Debug("end of function: window.onload()");
+	top.log.debug("end of function: window.onload()");
 
 	(function(){ // load modprobe settings
 		var c = context2json ({ filename: ASTGUI.globals.configfile , context: 'general', usf: 1 });

Modified: branches/2.0/config/js/hardware_aa50.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/hardware_aa50.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/hardware_aa50.js (original)
+++ branches/2.0/config/js/hardware_aa50.js Thu Mar  5 08:32:35 2009
@@ -198,11 +198,11 @@
 
 
 var localajaxinit = function(){
-	ASTGUI.Log.Debug("Starting Loading Page hardware_aa50.html .. start function: window.onload()");
+	top.log.debug("Starting Loading Page hardware_aa50.html .. start function: window.onload()");
 	ASTGUI.dialog.waitWhile('Detecting Hardware ...');
 	top.document.title = "Analog Hardware Setup & Configuration";
 	load_currentAnalogSettings();
-	ASTGUI.Log.Debug("end of function: window.onload()");
+	top.log.debug("end of function: window.onload()");
 };
 
 
@@ -326,7 +326,7 @@
 				parseZaptelconf(q);
 			}
 		}
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.load_zaptel_conf()");
+		top.log.debug("end of function: loadConfigFiles.load_zaptel_conf()");
 	})();
 
 	(function(){ // load modprobe settings

Modified: branches/2.0/config/js/hardware_dahdi.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/hardware_dahdi.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/hardware_dahdi.js (original)
+++ branches/2.0/config/js/hardware_dahdi.js Thu Mar  5 08:32:35 2009
@@ -130,14 +130,14 @@
 	if(configured_devices.length == detected_devices.length){
 		for(var l=0; l < configured_devices.length; l++){
 			if(configured_devices[l] != detected_devices[l]){ // devices does not match - but the number of devices match
-				ASTGUI.Log.Debug("DEVICES or basechans does not MATCHED");
+				top.log.debug("DEVICES or basechans does not MATCHED");
 				return true;
 			}
 		}
-		ASTGUI.Log.Debug("DEVICES and basechans MATCH");
+		top.log.debug("DEVICES and basechans MATCH");
 		return false;
 	}else{	
-		ASTGUI.Log.Debug("DEVICES or basechans does not MATCHED");
+		top.log.debug("DEVICES or basechans does not MATCHED");
 		return true;
 	}
 };
@@ -374,7 +374,7 @@
 	//   check if the channels in zapchan are within max and min
 	//   if yes then set the current range values
 	load_hwcfgfile: function(){ // read hwcfgfile (if exists) into CONFIGUREDHARDWARE 
-		ASTGUI.Log.Debug("load last configured hardware information, start function: loadConfigFiles.load_hwcfgfile()");
+		top.log.debug("load last configured hardware information, start function: loadConfigFiles.load_hwcfgfile()");
 		var n = config2json({filename:hwcfgfile, usf:1});
 		if( n.getOwnProperties().length == 0 ){ // if file not found or no previous hardware detected
 				hwchanged = -1;
@@ -390,23 +390,23 @@
 			}}
 			loadConfigFiles.run_detectdahdi();
 		}
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.load_hwcfgfile()");
+		top.log.debug("end of function: loadConfigFiles.load_hwcfgfile()");
 	},
 
 	run_detectdahdi: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.run_detectdahdi()");
+		top.log.debug("start function: loadConfigFiles.run_detectdahdi()");
 
 		ASTGUI.miscFunctions.createConfig( 'applyzap.conf', function(){
 			parent.ASTGUI.systemCmd( top.sessionData.directories.app_DahdiScan , function(){ // run ztscan and then try loading ztscan.conf
 				window.setTimeout( loadConfigFiles.read_DahdiScanConf , 700 ); // leave some time for ztscan to generate ztscan.conf
 			});
-			ASTGUI.Log.Debug("end of function: loadConfigFiles.run_detectdahdi()");
+			top.log.debug("end of function: loadConfigFiles.run_detectdahdi()");
 		});
 	},
 
 	//readZtscanConf: function(){
 	read_DahdiScanConf: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.read_DahdiScanConf()");
+		top.log.debug("start function: loadConfigFiles.read_DahdiScanConf()");
 		var ztsc = $.ajax({ url: ASTGUI.paths.rawman+'?action=getconfig&filename=' + ASTGUI.globals.dahdiScanOutput , async: false }).responseText;
 		var ztsc_Lower = ztsc.toLowerCase();
 		if( ztsc_Lower.contains('response: error') && ztsc_Lower.contains('message: config file not found') ){
@@ -486,12 +486,12 @@
 			}}
 		}}
 		if(hwchanged != -1){ hwchanged = detectHwChanges(); }
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.read_DahdiScanConf()");
+		top.log.debug("end of function: loadConfigFiles.read_DahdiScanConf()");
 		loadConfigFiles.readUsersConf(); // read span_x (where T1/E1 trunks are defined)
 	},
 
 	readUsersConf: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.readUsersConf()");
+		top.log.debug("start function: loadConfigFiles.readUsersConf()");
 
 		var usrs = $.ajax({ url: ASTGUI.paths.rawman+'?action=getconfig&filename=users.conf', async: false }).responseText;
 		var usrs_Lower = usrs.toLowerCase();
@@ -564,12 +564,12 @@
 				}
 			}}
 		})();
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.readUsersConf()");
+		top.log.debug("end of function: loadConfigFiles.readUsersConf()");
 		showtable();
 	},
 
 	load_zaptel_conf: function(){
-		ASTGUI.Log.Debug("start function: loadConfigFiles.load_zaptel_conf()");
+		top.log.debug("start function: loadConfigFiles.load_zaptel_conf()");
 		// we parse zaptel.conf to get the loadzone and syncsrc for each span
 		var tmp_file = ASTGUI.globals.dahdiIncludeFile ;
 		var parseZaptelconf = function(zp){
@@ -616,7 +616,7 @@
 				parseZaptelconf(q);
 			}
 		}
-		ASTGUI.Log.Debug("end of function: loadConfigFiles.load_zaptel_conf()");
+		top.log.debug("end of function: loadConfigFiles.load_zaptel_conf()");
 	}
 };
 
@@ -959,7 +959,7 @@
 
 
 var localajaxinit = function(){
-	ASTGUI.Log.Debug("Starting Loading Page digital.html .. start function: window.onload()");
+	top.log.debug("Starting Loading Page digital.html .. start function: window.onload()");
 	portsSignalling = ASTGUI.cloneObject(parent.sessionData.PORTS_SIGNALLING);
 
 	ASTGUI.dialog.waitWhile('Detecting Analog/Digital Hardware ...');
@@ -1008,7 +1008,7 @@
 	}
 
 	ASTGUI.events.add( _$('edit_DefinedChans'), "change", edit_DefinedChans_changed );
-	ASTGUI.Log.Debug("end of function: window.onload()");
+	top.log.debug("end of function: window.onload()");
 	loadConfigFiles.load_hwcfgfile(); // try to load last detected/configured hardware information
 
 };

Modified: branches/2.0/config/js/incoming.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/incoming.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/incoming.js (original)
+++ branches/2.0/config/js/incoming.js Thu Mar  5 08:32:35 2009
@@ -358,7 +358,7 @@
 		}
 
 		if( isNewIR == true ){ // create new Incoming Rule
-			ASTGUI.Log.Debug("create New Incoming Rule");
+			top.log.debug("create New Incoming Rule");
 			parent.ASTGUI.dialog.waitWhile('Creating Incoming Rule ...');
 
 			if( ASTGUI.getFieldValue('edit_itrl_dest') == 'ByDID' ){
@@ -383,7 +383,7 @@
 
 				var TMP_MYCALLBACK = function(){
 					if( !EX_CF.hasOwnProperty( thisRule_context ) ){
-						ASTGUI.Log.Debug("creating [time interval did context]");
+						top.log.debug("creating [time interval did context]");
 						x.new_action ( 'newcat', thisRule_context , '' , '' );
 					}
 	
@@ -394,7 +394,7 @@
 						x.new_action( 'append', thisRule_context, 'exten', ASTGUI.globals.sbcid_2 );
 						x.new_action( 'append', thisRule_context, 'exten', this_ActualRule );
 					}else{
-						ASTGUI.Log.Debug("NewRule is exten=" + this_ActualRule + 'in context [' + thisRule_context + ']');
+						top.log.debug("NewRule is exten=" + this_ActualRule + 'in context [' + thisRule_context + ']');
 						x.new_action( 'append', thisRule_context, 'exten', this_ActualRule );
 					}
 
@@ -406,10 +406,10 @@
 				};
 	
 				if( PREVIOUS.contains(NEWTF_INCLUDE_STR) ){
-					ASTGUI.Log.Debug("No need to include time interval did context in DID_trunk_x");
+					top.log.debug("No need to include time interval did context in DID_trunk_x");
 					TMP_MYCALLBACK();
 				}else{
-					ASTGUI.Log.Debug("adding 'include = time interval did context' in [DID_trunk_x]");
+					top.log.debug("adding 'include = time interval did context' in [DID_trunk_x]");
 					PREVIOUS.splice(0,0,NEWTF_INCLUDE_STR);
 					ASTGUI.miscFunctions.empty_context({ filename: 'extensions.conf', context : ASTGUI.contexts.TrunkDIDPrefix + this_trunk, cb : function(){
 						PREVIOUS.each( function( this_newPreviousLine ){

Modified: branches/2.0/config/js/index.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/index.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Thu Mar  5 08:32:35 2009
@@ -24,7 +24,7 @@
 	makePings: {
 		noServer: function(){
 			try{
-				ASTGUI.Log.Debug("PING Request: REQUEST FAILED ");
+				top.log.debug("PING Request: REQUEST FAILED ");
 				if( onLogInFunctions.makePings.isRetryPing ){
 					alert("No Response !");
 				}else{
@@ -48,7 +48,7 @@
 						//ASTGUI.dialog.hide();
 						$('#mainscreen').show();
 					}else{
-						ASTGUI.Log.Debug('PING Request: INVALID SESSION');
+						top.log.debug('PING Request: INVALID SESSION');
 						if( sessionData.DEBUG_MODE ){
 							alert('PING Request: INVALID SESSION' + '\n' + 'Click OK to reload');
 						}
@@ -64,14 +64,14 @@
 			var makePingRequest = function(){
 				var verifyPingResult = function(t) {
 					if(!t.toLowerCase().contains('pong')){
-						ASTGUI.Log.Debug('PING Request: INVALID SESSION');
+						top.log.debug('PING Request: INVALID SESSION');
 						if( sessionData.DEBUG_MODE ){
 							alert('PING Request: INVALID SESSION' + '\n' + 'Click OK to reload');
 						}
 						onLogInFunctions.makePings.stop();
 						top.window.location.replace(top.window.location.href); return true; 
 					}else{
-						ASTGUI.Log.Ajax('PING Request: Success');
+						top.log.ajax('PING Request: Success');
 					}
 				};
 				$.ajax({
@@ -295,7 +295,7 @@
 			return;
 		}
 		if( stlc.match('pong') ){
-			ASTGUI.Log.Debug('Got PONG , session is active');
+			top.log.debug('Got PONG , session is active');
 
 			$('div.ui-accordion-link:eq(0)')[0].innerHTML = 'System Status';
 			$('div.ui-accordion-desc:eq(0)')[0].innerHTML = 'Please click on a panel to manage related features';
@@ -329,8 +329,8 @@
 			ASTGUI.dialog.waitWhile('Parsing Config Files ..');
 			onLogInFunctions.parseConfigFiles();
 		}else{
-			ASTGUI.Log.Error('NO active session : show login page');
-			ASTGUI.Log.Debug('s.responseText is "' + s.responseText + '"' );
+			top.log.error('NO active session : show login page');
+			top.log.error('ResponseText is "' + s.responseText + '"' );
 			$('div.ui-accordion-desc:eq(0)')[0].innerHTML = 'Please login ';
 			sessionData.isLoggedIn = false;
 			ASTGUI.dialog.hide();
@@ -348,55 +348,55 @@
 				// check extensions.conf (macro trunkdial, guitools , other required contexts etc), check [general] in users.conf etc
 				if( sessionData.continueParsing == false )return;
 			}catch(er){
-				ASTGUI.Log.Error('Error in readcfg.checkEssentials()' + '<BR>error msg: ' + er.description );
+				top.log.error('Error in readcfg.checkEssentials()' + '<BR>error msg: ' + er.description );
 			}
 
 			try{
 				readcfg.ExtensionsConf();
 				if( sessionData.continueParsing == false )return;
 			}catch(er){
-				ASTGUI.Log.Error('Error in readcfg.ExtensionsConf()');
+				top.log.error('Error in readcfg.ExtensionsConf()');
 			}
 
 			try{
 				readcfg.guiPreferencesConf();
 				if( sessionData.continueParsing == false )return;
 			}catch(er){
-				ASTGUI.Log.Error('Error in readcfg.guiPreferencesConf()');
+				top.log.error('Error in readcfg.guiPreferencesConf()');
 			}
 
 			try{
 				readcfg.httpConf();
 			}catch(er){
-				ASTGUI.Log.Error('Error in readcfg.httpConf()');
+				top.log.error('Error in readcfg.httpConf()');
 			}
 
 			try{
 				astgui_manageConferences.loadMeetMeRooms();
 			}catch(er){
-				ASTGUI.Log.Error('Error in astgui_manageConferences.loadMeetMeRooms()');
+				top.log.error('Error in astgui_manageConferences.loadMeetMeRooms()');
 			}
 
 			try{
 				astgui_manageQueues.loadQueues();
 			}catch(er){
-				ASTGUI.Log.Error('Error in astgui_manageQueues.loadQueues()');
+				top.log.error('Error in astgui_manageQueues.loadQueues()');
 			}
 
 			try{
 				readcfg.UsersConf();
 			}catch(er){
-				ASTGUI.Log.Error('Error in readcfg.UsersConf()');
+				top.log.error('Error in readcfg.UsersConf()');
 			}
 
 			try{
 				readcfg.MisdnConf();
 			}catch(er){
-				ASTGUI.Log.Error('Error in readcfg.MisdnConf()');
+				top.log.error('Error in readcfg.MisdnConf()');
 			}
 
 		}catch(err){
-			ASTGUI.Log.Error('Error in onLogInFunctions.parseConfigFiles()');
+			top.log.error('Error in onLogInFunctions.parseConfigFiles()');
 		}finally{
 			if( sessionData.continueParsing == false ){
 				return;
@@ -560,7 +560,7 @@
 			}
 
 		} catch(e) {
-			ASTGUI.Log.Debug("Error listOfChannels: " + e);
+			top.log.debug("Error listOfChannels: " + e);
 			return to_return;
 		}
 		return to_return;
@@ -1026,7 +1026,7 @@
 		return;
 	}
 
-	ASTGUI.Log.Debug('Start localAjaxinit in Parent window');
+	top.log.debug('Start localAjaxinit in Parent window');
 	//if( typeof readcfg == 'undefined' ){
 	//	alert('readcfg undefined');
 	//}
@@ -1073,7 +1073,7 @@
 		window.onunload = function (e) {
 			DOM_mainscreen.src = 'blank.html';
 		};
-		ASTGUI.Log.Debug('calling onLogInFunctions.checkifLoggedIn()');
+		top.log.debug('calling onLogInFunctions.checkifLoggedIn()');
 		onLogInFunctions.checkifLoggedIn();
 		if(sessionData.DEBUG_MODE){
 			miscFunctions.DEBUG_START();

Modified: branches/2.0/config/js/log.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/log.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/log.js (original)
+++ branches/2.0/config/js/log.js Thu Mar  5 08:32:35 2009
@@ -82,7 +82,7 @@
  * @param msg The message.
  * @param color The HTML hexademical color code.
  */
-log.doLog = function() {
+log.doLog = function(msg, color) {
 	if (!top.session.log) {
 		return true;
 	}

Modified: branches/2.0/config/js/pbx.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/pbx.js?view=diff&rev=4571&r1=4570&r2=4571
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Thu Mar  5 08:32:35 2009
@@ -226,7 +226,7 @@
 	}, // end of readcfg.checkEssentials();
 
 	guiPreferencesConf: function(){ //readcfg.guiPreferencesConf();
-		ASTGUI.Log.Ajax("AJAX Request : reading '" +  ASTGUI.globals.configfile + "'");
+		top.log.ajax("AJAX Request : reading '" +  ASTGUI.globals.configfile + "'");
 		var s = $.ajax({ url: ASTGUI.paths.rawman+'?action=getconfig&filename=' + ASTGUI.globals.configfile , async: false }).responseText;
 		if( s.contains('Response: Error') && s.contains('Message: Config file not found') ){
 			sessionData.continueParsing = false ;
@@ -369,7 +369,7 @@
 				// sessionData.pbxinfo['timebasedRules'][d] = astgui_manageTimeBasedRules.parseContext( d , c[d] );
 			}
 		}}
-		ASTGUI.Log.Debug('parsed all contexts in extensions.conf');
+		top.log.debug('parsed all contexts in extensions.conf');
 		(function(){ // parse voicemenu extensions
 			var vm = c[ASTGUI.contexts.VoiceMenuExtensions] ;
 			var vm_default = c['default'] ; // Backward compatibility for old GUI
@@ -1440,7 +1440,7 @@
 				}
 			});
 		}catch(err){

[... 107 lines stripped ...]



More information about the asterisk-gui-commits mailing list