pari: trunk r1695 - /trunk/config/digital.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Oct 16 23:32:15 CDT 2007


Author: pari
Date: Tue Oct 16 23:32:14 2007
New Revision: 1695

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1695
Log:
update values on edit

Modified:
    trunk/config/digital.html

Modified: trunk/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/digital.html?view=diff&rev=1695&r1=1694&r2=1695
==============================================================================
--- trunk/config/digital.html (original)
+++ trunk/config/digital.html Tue Oct 16 23:32:14 2007
@@ -77,7 +77,7 @@
 function calc_bchan_fxx(l){ // calculates the bchan,and fxx strings for a given span
 	var y = Number(SPANS[l]['min_ch']);
 	var z = Number(SPANS[l]['definedchans']);
-	if(z==1){return String(z);}
+	if(z==1){return String(y);}
 
 	if ( SPANS[l]['signalling'].beginsWith('fx') ){
 		return y + "-" + String(y+z-1);
@@ -105,6 +105,14 @@
 	menu.style.width="80";
 	menu.style.borderColor = "#eee #bbb #bbb #ddd";
 	ASTGUI.events.add( document.body , "click", function(){ menu.style.display="none"; } );
+	var edit_DefinedChans_changed = function(){
+		var b = String( menu.span_value );
+		SPANS[b]['definedchans'] = _$('edit_DefinedChans').value;
+		//_$('edit_labelReserved').innerHTML = SPANS[b]['reserved_ch'];
+		_$('edit_labelZapchan').innerHTML = calc_bchan_fxx(b);
+	};
+
+	ASTGUI.events.add( _$('edit_DefinedChans'), "change", edit_DefinedChans_changed );
 
 	var editSPAN = function(l){ // show values for SPAN l in the edit_span dialog box
 		_$('editspan_SPAN').innerHTML = SPANS[l]['description'];
@@ -123,7 +131,7 @@
 			for(g=1; g <=f; g++){ ASTGUI.selectbox.append(w,g,g); }
 			ASTGUI.selectbox.selectOption(w,SPANS[l]['definedchans']);
 			_$('edit_labelReserved').innerHTML = SPANS[l]['reserved_ch'];
-			_$('edit_labelZapchan').innerHTML = calc_bchan_fxx(l)
+			_$('edit_labelZapchan').innerHTML = calc_bchan_fxx(l);
 		}();
 
 		if ( Number(SPANS[l]['totchans']) <= 24 ){




More information about the asterisk-gui-commits mailing list