pari: branch 2.0 r3984 - in /branches/2.0/config: ./ js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Oct 21 10:20:15 CDT 2008


Author: pari
Date: Tue Oct 21 10:20:15 2008
New Revision: 3984

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

 Fixing some firebug errors about 'sessionData undefined' that has been around for a while



Modified:
    branches/2.0/config/index.html
    branches/2.0/config/js/astman.js
    branches/2.0/config/js/index.js
    branches/2.0/config/js/pbx.js

Modified: branches/2.0/config/index.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/index.html?view=diff&rev=3984&r1=3983&r2=3984
==============================================================================
--- branches/2.0/config/index.html (original)
+++ branches/2.0/config/index.html Tue Oct 21 10:20:15 2008
@@ -22,13 +22,7 @@
 
 </style>
 <link href="stylesheets/cfgbasic.css" media="all" rel="Stylesheet" type="text/css" />
-<script src="js/jquery.js"></script>
-<script src="js/astman.js"></script>
-<script src="js/pbx.js"></script>
-<script src="js/index.js"></script>
-<script src="js/tooltip.js"></script>
 <script>
-
 // Store any run time data in this Object - ex: detected platform, has compact flash, FXO/FXS ports, etc etc.
 var sessionData = {
 	finishedParsing : false,
@@ -90,6 +84,11 @@
 };
 
 </script>
+<script src="js/jquery.js"></script>
+<script src="js/astman.js"></script>
+<script src="js/pbx.js"></script>
+<script src="js/index.js"></script>
+<script src="js/tooltip.js"></script>
 <head>
 	<title>Asterisk Configuration GUI</title>
 	<link rel="shortcut icon" href="images/favicon.ico" />

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=3984&r1=3983&r2=3984
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Tue Oct 21 10:20:15 2008
@@ -704,15 +704,15 @@
 		},
 
 		Ajax: function(msg){ // ASTGUI.Log.Ajax(msg);
-			if ( parent.sessionData.DEBUG_WHICH.Ajax == true ) this.doLog( msg , '#96997C' );
+			if ( top.sessionData.DEBUG_WHICH.Ajax == true ) this.doLog( msg , '#96997C' );
 		},
 
 		Debug: function( msg ){ // ASTGUI.Log.Debug();
-			if ( parent.sessionData.DEBUG_WHICH.Debug == true ) this.doLog( msg , '#4C9996' );
+			if ( top.sessionData.DEBUG_WHICH.Debug == true ) this.doLog( msg , '#4C9996' );
 		},
 
 		Error: function( msg ){ // ASTGUI.Log.Error();
-			if( !parent.sessionData.DEBUG_WHICH.Error == true ) return;
+			if( !top.sessionData || !top.sessionData.DEBUG_WHICH.Error ) return;
 			if( msg.length <=5 && ASTGUI.errorCodes[msg] ){
 				this.doLog( '<B>' + ASTGUI.errorCodes[msg] + '</B>' , '#992b23' );
 			}else{
@@ -721,15 +721,15 @@
 		},
 
 		Console: function( msg ){ // ASTGUI.Log.Console();
-			if( parent.sessionData.DEBUG_WHICH.Console == true && window.console && window.console.firebug ) console.log ( msg );
+			if( top.sessionData.DEBUG_WHICH.Console == true && window.console && window.console.firebug ) console.log ( msg );
 		},
 
 		Info: function( msg ){ // ASTGUI.Log.Info(msg);
-			if( parent.sessionData.DEBUG_WHICH.Info == true ) this.doLog( msg , '#9A9A9A' );
+			if( top.sessionData.DEBUG_WHICH.Info == true ) this.doLog( msg , '#9A9A9A' );
 		},
 
 		Warn: function( msg ){ // ASTGUI.Log.Warn( msg );
-			if( parent.sessionData.DEBUG_WHICH.Warn == true ) this.doLog( msg , '#F47A00' );
+			if( top.sessionData.DEBUG_WHICH.Warn == true ) this.doLog( msg , '#F47A00' );
 		}
 	},
 
@@ -3102,7 +3102,7 @@
 			var msg = 'ErrorCode / LineNumber : ' + errcode  + '<BR> Error : ' + err + '<BR> Location: ' + url ;
 			ASTGUI.Log.Error(msg);
 			ASTGUI.dialog.hide();
-			if( parent.sessionData.DEBUG_MODE ){ // show alerts only in debug mode
+			if( top.sessionData && top.sessionData.DEBUG_MODE ){ // show alerts only in debug mode
 				var alertmsg = 'ErrorCode / LineNumber : ' + errcode  + '\n Error : ' + err + '\n Location: ' + url ;
 				alert(alertmsg);
 			}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=3984&r1=3983&r2=3984
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Tue Oct 21 10:20:15 2008
@@ -49,7 +49,7 @@
 						$('#mainscreen').show();
 					}else{
 						ASTGUI.Log.Debug('PING Request: INVALID SESSION');
-						if( parent.sessionData.DEBUG_MODE ){
+						if( sessionData.DEBUG_MODE ){
 							alert('PING Request: INVALID SESSION' + '\n' + 'Click OK to reload');
 						}
 						top.window.location.replace(top.window.location.href);
@@ -65,7 +65,7 @@
 				var verifyPingResult = function(t) {
 					if(!t.toLowerCase().contains('pong')){
 						ASTGUI.Log.Debug('PING Request: INVALID SESSION');
-						if( parent.sessionData.DEBUG_MODE ){
+						if( sessionData.DEBUG_MODE ){
 							alert('PING Request: INVALID SESSION' + '\n' + 'Click OK to reload');
 						}
 						onLogInFunctions.makePings.stop();
@@ -250,7 +250,7 @@
 				parent.ASTGUI.dialog.waitWhile(' reloading asterisk ... ');
 				var t = ASTGUI.cliCommand('reload') ;
 				setTimeout( function(){ 
-					if( parent.sessionData.DEBUG_MODE ){
+					if( sessionData.DEBUG_MODE ){
 						alert('postmappings updated in http.conf' + '\n' + 'Click OK to reload');
 					}
 					top.window.location.reload(); 
@@ -431,11 +431,11 @@
 		}
 
 
-		//if( parent.sessionData.PLATFORM.isAA50  ){
+		//if( sessionData.PLATFORM.isAA50  ){
 			DOM_mainscreen.src = 'home.html?status=1';
 		//}
 
-		if( parent.sessionData.PLATFORM.isAA50 && sessionData.PLATFORM.AA50_SKU.contains('800') ){
+		if( sessionData.PLATFORM.isAA50 && sessionData.PLATFORM.AA50_SKU.contains('800') ){
 			// no need to parse ztscan output for s800 SKU
 		}else{
 			readcfg.ztScanConf();
@@ -712,7 +712,7 @@
 
 				parent.ASTGUI.dialog.waitWhile(tmp_msg) ;
 			}else{
-				if( parent.sessionData.DEBUG_MODE ){
+				if( sessionData.DEBUG_MODE ){
 					alert('CountDown complete' + '\n' + 'Click OK to reload');
 				}
 				top.window.location.reload() ;

Modified: branches/2.0/config/js/pbx.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/pbx.js?view=diff&rev=3984&r1=3983&r2=3984
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Tue Oct 21 10:20:15 2008
@@ -184,7 +184,7 @@
 			sessionData.continueParsing = false ;
 			ASTGUI.dialog.waitWhile(" Creating a config file to store GUI Preferences");
 			ASTGUI.miscFunctions.createConfig( ASTGUI.globals.configfile, function(){
-				if( parent.sessionData.DEBUG_MODE ){
+				if( sessionData.DEBUG_MODE ){
 					alert('created config file ' + ASTGUI.globals.configfile + '\n' + 'Click OK to reload');
 				}
 				window.location.reload();
@@ -857,7 +857,7 @@
 
 		// zap_channels
 		zap_channels.each( function(channel){
-			var temp_ls_List = ASTGUI.cloneObject( parent.sessionData.PORTS_SIGNALLING.ls ) ;
+			var temp_ls_List = ASTGUI.cloneObject( sessionData.PORTS_SIGNALLING.ls ) ;
 			var sg = ( temp_ls_List.contains(channel) ) ? 'fxs_ls':'fxs_ks' ;
 			x.new_action('append', trunk, 'signalling', sg);
 			x.new_action( 'append', trunk , 'channel', channel );




More information about the asterisk-gui-commits mailing list