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

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Mar 5 09:13:53 CST 2009


Author: rbrindley
Date: Thu Mar  5 09:13:50 2009
New Revision: 4577

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

- merged with the latest of astman_revamp


Added:
    branches/2.0/config/js/session.js
      - copied unchanged from r4576, team/rbrindley/astman_revamp/config/js/session.js
Modified:
    branches/2.0/config/flipadvanced.html
    branches/2.0/config/home.html
    branches/2.0/config/index.html
    branches/2.0/config/js/flashupdate.js
    branches/2.0/config/js/index.js
    branches/2.0/config/js/jquery.js
    branches/2.0/config/js/menus.js
    branches/2.0/config/js/timezone.js
    branches/2.0/config/js/trunks_analog.js
    branches/2.0/config/js/users.js
    branches/2.0/config/password.html
    branches/2.0/config/reset_defaults.html

Modified: branches/2.0/config/flipadvanced.html
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/flipadvanced.html?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/flipadvanced.html (original)
+++ branches/2.0/config/flipadvanced.html Thu Mar  5 09:13:50 2009
@@ -61,7 +61,7 @@
 
 var update_status = function(){
 
-	var am = ASTGUI.cookies.getCookie('advancedmode');
+	var am = top.cookies.get('advancedmode');
 	if( am && am == 'yes' ){
 		_$('flip_button').innerHTML = 'Hide Advanced Options';
 		_$('flip_decsription').innerHTML = "Clicking the 'Hide Advanced Options' button below removes the advanced menu items on the left hand sidebar"

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=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/home.html (original)
+++ branches/2.0/config/home.html Thu Mar  5 09:13:50 2009
@@ -62,7 +62,7 @@
 		DOM_secret.blur();
 		parent.ASTGUI.dialog.waitWhile(' <font color=#005119><b>Login Success</b></font>');
 		ASTGUI.feedback({msg:'Login Success', showfor: 4 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
-		parent.ASTGUI.cookies.setCookie('username', DOM_username.value );
+		top.cookies.set('username', DOM_username.value );
 
 		if( DOM_secret.value == 'password'){
 			ASTGUI.feedback({msg:'Your are using the default password.<BR> Please choose a new password', showfor: 7 , color: '#672b13'}) ;
@@ -102,7 +102,7 @@
 
 
 var updatePassword = function(){
-	var CURRENT_Username = top.ASTGUI.cookies.getCookie('username');
+	var CURRENT_Username = top.cookies.get('username');
 	var u = new listOfSynActions('manager.conf') ;
 
 	var newp = ASTGUI.getFieldValue('new_password');

Modified: branches/2.0/config/index.html
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/index.html?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/index.html (original)
+++ branches/2.0/config/index.html Thu Mar  5 09:13:50 2009
@@ -86,11 +86,12 @@
 };
 
 </script>
+<script src="js/log.js"></script>
+<script src="js/session.js"></script>
 <script src="js/jquery.js"></script>
 <script src="js/tooltip.js"></script>
 <script src="js/astman.js"></script>
 <script src="js/pbx.js"></script>
-<script src="js/log.js"></script>
 <script src="js/index.js"></script>
 <head>
 	<title>Asterisk Configuration GUI</title>
@@ -325,19 +326,4 @@
 		<span class='button_t1' onclick='onLogInFunctions.makePings.makeRetryPing();'> Retry </span>
 	<div>
 </div>
-
-<script>
-	var session = {
-		debug_log: [],
-		log: false,
-		log_modes: {
-			ajax: true,
-			console: true,
-			debug: true,
-			error: true,
-			info: true,
-			warn: true
-		}
-	};
-</script>
 </body>

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=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/js/flashupdate.js (original)
+++ branches/2.0/config/js/flashupdate.js Thu Mar  5 09:13:50 2009
@@ -112,13 +112,13 @@
 var flashupdate_success = function(){
 	parent.ASTGUI.dialog.hide();
 	ASTGUI.feedback( { msg:'Firmware image copied', showfor:5 });
-	ASTGUI.cookies.setCookie('firmware_reboot','yes');
+	top.cookies.set('firmware_reboot','yes');
 	_$('fstatus').innerHTML = 'Finished copying firmware';
 	parent.ASTGUI.yesOrNo({
 		hideNo: true,
 		msg: "Finished copying firmware <BR> Click 'Ok' to reboot your appliance. <BR><BR> Note: reboot might take 5 to 8 minutes while upgrading firmware" ,
 		ifyes: function(){
-			if( parent.sessionData.PLATFORM.isAA50 && ASTGUI.cookies.getCookie('configFilesChanged') == 'yes' ){
+			if( parent.sessionData.PLATFORM.isAA50 && top.cookies.get('configFilesChanged') == 'yes' ){
 				parent.ASTGUI.dialog.waitWhile('Rebooting !');
 				setTimeout( function(){
 						parent.ASTGUI.dialog.hide();
@@ -126,12 +126,12 @@
 							msg: 'You have unsaved changes !! <BR>Do you want to save these changes before rebooting ?' ,
 							ifyes: function(){
 								ASTGUI.systemCmd ('save_config', function(){
-									ASTGUI.cookies.setCookie( 'configFilesChanged' , 'no' );
+									top.cookies.set( 'configFilesChanged' , 'no' );
 									ASTGUI.systemCmd ('reboot', parent.miscFunctions.AFTER_REBOOT_CMD );
 								});
 							},
 							ifno:function(){
-								ASTGUI.cookies.setCookie( 'configFilesChanged' , 'no' );
+								top.cookies.set( 'configFilesChanged' , 'no' );
 								ASTGUI.systemCmd ('reboot', parent.miscFunctions.AFTER_REBOOT_CMD );
 							},
 							title : 'Save changes before reboot ?',

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=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Thu Mar  5 09:13:50 2009
@@ -122,7 +122,7 @@
 
 	check_ReadWritePermissions : function(){
 		// We write a random context in http.conf and read it back to make sure we have manager read/write permissions 
-		//if( ASTGUI.cookies.getCookie('rwaccess') == 'yes' ){
+		//if( top.cookies.get('rwaccess') == 'yes' ){
 		//	return true;
 		//}
 		var rand = 'test_' + Math.round(100000*Math.random());
@@ -134,7 +134,7 @@
 
 		var http_conf = config2json({ filename:'http.conf', usf:1 });
 		if( !http_conf.hasOwnProperty(rand) || !http_conf[rand].hasOwnProperty(wa) || http_conf[rand][wa] !='yes' ){
-			ASTGUI.cookies.removeCookie('rwaccess');
+			top.cookies.remove('rwaccess');
 			return false; // no read/write access to the GUI
 		}
 
@@ -204,12 +204,12 @@
 		u.clearActions();
 		u.new_action('delcat', rand , '', '') ;
 		u.callActions();
-		ASTGUI.cookies.setCookie( 'rwaccess' , 'yes' );
+		top.cookies.set( 'rwaccess' , 'yes' );
 
 		if( sessionData.PLATFORM.isAST_1_6 ){
 			// make sure originate privilege is defined in asterisk 1.6
 			// This was introduced in Asterisk 1.6 and users upgrading from 1.4 do not have this
-			var tmp_managerUser = ASTGUI.cookies.getCookie('username') ;
+			var tmp_managerUser = top.cookies.get('username') ;
 			var manager_conf = config2json({ filename:'manager.conf', usf:1 });
 			if( manager_conf[tmp_managerUser].hasOwnProperty('write') ){
 				var write_value = manager_conf[tmp_managerUser]['write'];
@@ -490,7 +490,7 @@
 		}
 		$('div.ui-accordion-link').show(); // finally show all panels
 		$('#ptopbuttons').show();
-		if( ASTGUI.cookies.getCookie('configFilesChanged') == 'yes' ){
+		if( top.cookies.get('configFilesChanged') == 'yes' ){
 			$('#applyChanges_Button').show();
 		}else{
 			$('#applyChanges_Button').hide();
@@ -611,7 +611,7 @@
 	},
 
 	show_advancedMode : function(){
-		var am = ASTGUI.cookies.getCookie('advancedmode');
+		var am = top.cookies.get('advancedmode');
 		if( am && am == 'yes' ){
 			$(".AdvancedMode").show();
 		}else{
@@ -621,12 +621,12 @@
 	},
 
 	flip_advancedmode: function(){
-		var am = ASTGUI.cookies.getCookie('advancedmode');
+		var am = top.cookies.get('advancedmode');
 		if( am && am == 'yes' ){
-			ASTGUI.cookies.removeCookie('advancedmode');
+			top.cookies.remove('advancedmode');
 			$(".AdvancedMode").hide();
 		}else{
-			ASTGUI.cookies.setCookie( 'advancedmode' , 'yes' );
+			top.cookies.set( 'advancedmode' , 'yes' );
 			$(".AdvancedMode").show();
 		}
 		miscFunctions.resizeMainIframe();
@@ -643,7 +643,7 @@
 			var t = ASTGUI.cliCommand('module reload');
 		}
 		u.style.display = 'none';
-		ASTGUI.cookies.removeCookie('configFilesChanged');
+		top.cookies.remove('configFilesChanged');
 		ASTGUI.feedback({msg:'Asterisk Reloaded !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
 
 		if(sessionData.PLATFORM.isAA50 ){
@@ -652,9 +652,9 @@
 		}else{
 			if(cb)cb();
 		}
-		if( ASTGUI.cookies.getCookie('require_restart') == 'yes'){
+		if( top.cookies.get('require_restart') == 'yes'){
 			ASTGUI.dialog.alertmsg('The changes you made requires a restart. <BR> Your hardware might not work properly until you reboot !!');
-			ASTGUI.cookies.removeCookie('require_restart');
+			top.cookies.remove('require_restart');
 		}
 	},
 
@@ -662,7 +662,7 @@
 		// Object to store all sequence of functions that should execute on logout
 		// example if appliance - need to save changes before logout 
 		confirmlogout : function(){
-			if( sessionData.PLATFORM.isAA50 && ASTGUI.cookies.getCookie('configFilesChanged') == 'yes' ){
+			if( sessionData.PLATFORM.isAA50 && top.cookies.get('configFilesChanged') == 'yes' ){
 
 				parent.ASTGUI.yesOrNo({
 					msg: 'You have unsaved changes !! <BR>Do you want to apply these changes before logging out ?' ,
@@ -827,8 +827,8 @@
 			}
 		};
 
-		var fr = ASTGUI.cookies.getCookie('firmware_reboot')
-		ASTGUI.cookies.removeCookie('firmware_reboot');
+		var fr = top.cookies.get('firmware_reboot')
+		top.cookies.remove('firmware_reboot');
 		if( fr == 'yes') {
 			count_down(480);
 		}else{
@@ -840,7 +840,7 @@
 		parent.ASTGUI.yesOrNo({
 			msg: (opt && opt.msg) || 'Note: Rebooting appliance will terminate any active calls.' ,
 			ifyes: function(){
-				if( sessionData.PLATFORM.isAA50 && ASTGUI.cookies.getCookie('configFilesChanged') == 'yes' ){
+				if( sessionData.PLATFORM.isAA50 && top.cookies.get('configFilesChanged') == 'yes' ){
 					parent.ASTGUI.dialog.waitWhile('Rebooting !');
 					setTimeout( function(){
 							parent.ASTGUI.dialog.hide();

Modified: branches/2.0/config/js/jquery.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/jquery.js?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/js/jquery.js (original)
+++ branches/2.0/config/js/jquery.js Thu Mar  5 09:13:50 2009
@@ -2700,7 +2700,7 @@
 					if( s.url.contains('&srcfilename=http.conf&') ){
 
 					}else{
-						ASTGUI.cookies.setCookie( 'configFilesChanged' , 'yes' );
+						top.cookies.set( 'configFilesChanged' , 'yes' );
 						parent.$('#applyChanges_Button').show();
 					}
 				}

Modified: branches/2.0/config/js/menus.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/menus.js?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/js/menus.js (original)
+++ branches/2.0/config/js/menus.js Thu Mar  5 09:13:50 2009
@@ -723,7 +723,7 @@
 var localajaxinit = function(){
 	top.document.title = 'Voice Menus Configuration' ;
 
-	var am = ASTGUI.cookies.getCookie('advancedmode');
+	var am = top.cookies.get('advancedmode');
 	if( am && am == 'yes' ){
 		ASTGUI.selectbox.append('newStep_select_action', 'Custom App', 'CustomApp');
 	}

Modified: branches/2.0/config/js/timezone.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/timezone.js?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/js/timezone.js (original)
+++ branches/2.0/config/js/timezone.js Thu Mar  5 09:13:50 2009
@@ -103,7 +103,7 @@
 	if(!confirm("Set '"+ filename +"' as the Default TimeZone ?")){ return ; }
 	ASTGUI.systemCmd( "rm /etc/localtime ; /bin/ln -s " + upload_Path + filename + " /etc/localtime" , function(){
 		ASTGUI.feedback( { msg:'Default Timezone set to '+ filename + ' !', showfor:2 });
-		ASTGUI.cookies.setCookie( 'configFilesChanged' , 'yes' );
+		top.cookies.set( 'configFilesChanged' , 'yes' );
 		parent.$('#applyChanges_Button').show();
 		alert("you have to click 'Apply Changes' and restart the appliance for this change to take effect");
 		window.location.reload();

Modified: branches/2.0/config/js/trunks_analog.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/trunks_analog.js?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/js/trunks_analog.js (original)
+++ branches/2.0/config/js/trunks_analog.js Thu Mar  5 09:13:50 2009
@@ -136,7 +136,7 @@
 	}
 
 	if( zapchan_Before != scs ){
-		ASTGUI.cookies.setCookie( 'require_restart' , 'yes' );
+		top.cookies.set( 'require_restart' , 'yes' );
 	}
 
 	if( ASTGUI.getFieldValue('edit_trunkName') ){

Modified: branches/2.0/config/js/users.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/users.js?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/js/users.js (original)
+++ branches/2.0/config/js/users.js Thu Mar  5 09:13:50 2009
@@ -505,7 +505,7 @@
 				tmp_obj['call-limit'] = '100' ;
 			}
 
-			if( zapchan_Before != ASTGUI.getFieldValue('edit_fxs') ){ 	ASTGUI.cookies.setCookie( 'require_restart' , 'yes' );	}
+			if( zapchan_Before != ASTGUI.getFieldValue('edit_fxs') ){ 	top.cookies.set( 'require_restart' , 'yes' );	}
 			(function(){
 				var fs = ASTGUI.getFieldValue('edit_fxs');
 				if(fs){

Modified: branches/2.0/config/password.html
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/password.html?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/password.html (original)
+++ branches/2.0/config/password.html Thu Mar  5 09:13:50 2009
@@ -28,7 +28,7 @@
 
 var DOM_newpass ;
 var DOM_newpass_rep ;
-var CURRENT_Username = top.ASTGUI.cookies.getCookie('username');
+var CURRENT_Username = top.cookies.get('username');
 
 var compare_passwords = function(event){
 	if(event.keyCode == 13){

Modified: branches/2.0/config/reset_defaults.html
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/reset_defaults.html?view=diff&rev=4577&r1=4576&r2=4577
==============================================================================
--- branches/2.0/config/reset_defaults.html (original)
+++ branches/2.0/config/reset_defaults.html Thu Mar  5 09:13:50 2009
@@ -34,7 +34,7 @@
 	if(parent.sessionData.PLATFORM.isAA50 ){
 		var after = function(){
 			parent.ASTGUI.dialog.hide();
-			ASTGUI.cookies.setCookie( 'configFilesChanged' , 'no' ); // ignore any previous changes -- skip calling save_config
+			top.cookies.set( 'configFilesChanged' , 'no' ); // ignore any previous changes -- skip calling save_config
 			parent.miscFunctions.reboot_pbx({
 				msg: 'You appliance has been reset to <i>\'factory defaults\' </i> ',
 				btnNo_text : 'Later'




More information about the asterisk-gui-commits mailing list