pari: branch asterisknow r1774 - /branches/asterisknow/config/digital.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Nov 6 11:23:28 CST 2007


Author: pari
Date: Tue Nov  6 11:23:27 2007
New Revision: 1774

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1774
Log:
Fixes for BE-226

Modified:
    branches/asterisknow/config/digital.html

Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/digital.html?view=diff&rev=1774&r1=1773&r2=1774
==============================================================================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Tue Nov  6 11:23:27 2007
@@ -473,6 +473,9 @@
 	SPANS[b]['switchtype'] = _$('editspan_switchtype').value;
 	SPANS[b]['syncsrc'] = _$('editspan_syncsrc').value;
 	SPANS[b]['lbo'] = _$('editspan_lbo').value;
+
+	_$('row'+ b).style.background = "#C9AAAA";
+
 	canelSpanInfo();
 	_$('save_b').disabled = false;
 	_$('cancel_b').disabled = false;
@@ -482,10 +485,14 @@
 	generate_zaptel: function(){
 		parent.astmanEngine.run_tool(asterisk_guiEditZap + " applysettings", function(t) {
 			/* anything we need to do here? */
-			// inform the user to restart
-			alert("You need to restart your machine for these settings to take effect");
-			window.location.href= "digital.html";
-			return true; 
+			parent.astmanEngine.run_tool("ztcfg -vv", function(t) {
+				// inform the user to restart
+				
+				_$('status_message').style.display="none";
+				alert("You need to restart your machine for these settings to take effect");
+				window.location.href= "digital.html";
+				return true; 
+			});
 		});
 		/* to run ztcfg and apply settings, you can do this call, but replace applysettings with ztcfg.
 		You can then read /var/lib/asterisk/static-http/config/ztcfg_output.html to look at ztcfg errors */
@@ -543,6 +550,10 @@
 	updateZaptel: function(){ 
 	// navigate through the SPANS object and save it to the applyzap.conf, 
 	// then call a script which will generate zaptel.conf from it and asks the user to restart his machine
+
+		_$('message_text').innerHTML = "Saving Changes ...";
+		_$('status_message').style.display="";
+
 		var uri = '';
 		var add_lines = function(){
 			var fxx={};
@@ -553,10 +564,11 @@
 			uri += build_action('newcat', c , context, "", ""); c++;
 
 
-			for( var k in SPANS ){ if( SPANS.hasOwnProperty(k) ){ if(SPANS[k]['signalling']){
+			for( var k in SPANS ){ if( SPANS.hasOwnProperty(k) ){ if(SPANS[k]['signalling'] && SPANS[k]['fac'] != 'UNCONFIGURED' ){
 				firstpart = "span";
 				/* XXX Timing source for card is being set to zero? */
 				/* LBO is being set to 0 */
+ 
 				if(SPANS[k]['lbo'] == "") { SPANS[k]['lbo'] = 0; }
 				if(SPANS[k]['syncsrc'] == "") { SPANS[k]['syncsrc'] = 0; }
 				secondpart = k + "," + SPANS[k]['syncsrc']  + "," + SPANS[k]['lbo'] + "," + SPANS[k]['fac'].toLowerCase().replace("/", ",");




More information about the asterisk-gui-commits mailing list