pari: trunk r1207 - in /trunk/config: ringgroups.html trunks.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jul 3 15:56:43 CDT 2007


Author: pari
Date: Tue Jul  3 15:56:43 2007
New Revision: 1207

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1207
Log:
[*] Bug Fix:   Unable Edit RingGroups , if one of the ringgroup users has been deleted from the users panel 

[*] Bug Fix:  when editing trunk details, context was being set to DID_ instead of DID_trunk_x

[*] FIX - Force user to specify number of seconds

[*] FIX - RingGroup not being completely deleted


Modified:
    trunk/config/ringgroups.html
    trunk/config/trunks.html

Modified: trunk/config/ringgroups.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/ringgroups.html?view=diff&rev=1207&r1=1206&r2=1207
==============================================================================
--- trunk/config/ringgroups.html (original)
+++ trunk/config/ringgroups.html Tue Jul  3 15:56:43 2007
@@ -88,11 +88,17 @@
 
 	var r = _$('select_ringthesechannels');
 	var s = _$('select_listofchannels');
+	var cn ;
+
 	ASTGUI.selectbox.clear(s);
 	ASTGUI.selectbox.clear(r);
 	for (var y=0; y < this_ringgroup.rgchannels.length ; y++ ){ 
-		ASTGUI.selectbox.append(r,LISTOFCHANNELS[this_ringgroup.rgchannels[y]]['ChannelName'], this_ringgroup.rgchannels[y]);
-		//ASTGUI.selectbox.append(r,this_ringgroup.rgchannels[y], this_ringgroup.rgchannels[y]);
+		if(LISTOFCHANNELS[this_ringgroup.rgchannels[y]]){
+			cn = LISTOFCHANNELS[this_ringgroup.rgchannels[y]]['ChannelName'];
+		}else{
+			cn = this_ringgroup.rgchannels[y];
+		}
+		ASTGUI.selectbox.append(r,cn,this_ringgroup.rgchannels[y]);
 	}
 
 	for( var u in LISTOFCHANNELS ){ if(LISTOFCHANNELS.hasOwnProperty(u)) {
@@ -140,8 +146,8 @@
 	if(!confirm("Are you sure ?")){ return true; }
 	var uri = build_action('delcat', 0, RG_FORMAT+g, "", "");
 	/* If we made a goto extension in default, delete the reference. */
-	if(ringgroups[RG_EDITING].rgExten){
-		var rlex = ringgroups[RG_EDITING].rgExten + ',1,Goto(' + RG_FORMAT+RG_EDITING + '|s|1)' ;
+	if(ringgroups[g].rgExten){
+		var rlex = ringgroups[g].rgExten + ',1,Goto(' + RG_FORMAT+g+ '|s|1)' ;
 		uri += build_action('delete', 1, specialcontext, "exten", "", rlex); 
 	}
 	makerequest('u','extensions.conf', uri, function(t){
@@ -158,6 +164,9 @@
 	}
 	if( !_$('text_rgname').value.strip()){
 		gui_alert("Please enter a name for the ring group"); return false;
+	}
+	if( isNaN(_$('text_ringTime').value) || Number(_$('text_ringTime').value) <= 0 ){
+		gui_alert("Please enter the number of seconds"); _$('text_ringTime').focus(); return false;
 	}
 
 	if(isNewRG){ 

Modified: trunk/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/trunks.html?view=diff&rev=1207&r1=1206&r2=1207
==============================================================================
--- trunk/config/trunks.html (original)
+++ trunk/config/trunks.html Tue Jul  3 15:56:43 2007
@@ -197,7 +197,11 @@
 	if(_dvcs_v.length ==0 ){
 		ifnewtrunk();
 	}else{
-		ifedit_existing();
+		if( _$('custom_trunkname').value !=  _dvcs_v && _$('advanced_content').style.display == '' ){
+			_$('context').value =  asterisk_guiTDPrefix + _$('custom_trunkname').value  ;
+		}else{
+			_$('context').value =  asterisk_guiTDPrefix + _dvcs_v  ;
+		}
 	}
 
 	if(isnewtrunk ==1){
@@ -310,9 +314,6 @@
 	}
 }
 
-function ifedit_existing(){
-	_$('context').value =  asterisk_guiTDPrefix + _$('custom_trunkname').value  ;
-}
 
 
 function ifnewtrunk(){




More information about the asterisk-gui-commits mailing list