pari: trunk r983 - in /trunk/config: menus.html ringgroups.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri May 25 08:48:20 MST 2007


Author: pari
Date: Fri May 25 10:48:20 2007
New Revision: 983

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=983
Log:
'Dial RingGroups' in IVRs

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

Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=983&r1=982&r2=983
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Fri May 25 10:48:20 2007
@@ -54,6 +54,17 @@
 		return "Goto '"+  tmp + "' (NOT FOUND)";
 	}
 
+	if( temp[2].match("Goto") && this_step.match('ringroups-custom-')  ){
+		var tmp = this_step.split('Goto')[1].substr(1);
+		tmp = tmp.substr(0, tmp.length-1);
+
+		var m = _$('rgrp');
+		for(var l=0; l < m.options.length; l++ ){
+			if(m.options[l].value == tmp){ return "Goto RingGroup '"+  m.options[l].text + "'"; }
+		}
+		return "Goto '"+  tmp + "' (NOT FOUND)";
+	}
+
 	if( temp[2].match("Answer") )
 		return "Answer the Call";
 	if( temp[2].match("Authenticate") ){
@@ -347,6 +358,9 @@
 		break;
 	case 'GotoTimeBasedRule':
 		action_string = "s,"+ newpriority+ ",Goto(" + _$('tbr').value + ")";
+		break;
+	case 'DialRingGroup':
+		action_string = "s,"+ newpriority+ ",Goto(" + _$('rgrp').value + ")";
 		break;
 	case 'Hangup':
 		action_string = "s,"+ newpriority+ ",Hangup";
@@ -693,6 +707,7 @@
 	_ane.style.display = "none";
 	_anm.style.display = "none";
 	_$('tbr').style.display = "none";
+	_$('rgrp').style.display = "none";
 
         if( _nsa.value== "" || _nsa.value== "Answer"  || _nsa.value== "Hangup" || _nsa.value== "GotoDirecotry" || _nsa.value== "Busy" || _nsa.value== "Congestion" ){
 
@@ -710,6 +725,9 @@
         }else if(_nsa.value== "GotoTimeBasedRule"  ){
 		_$('tbr').selectedIndex = -1;
 		_$('tbr').style.display = "";
+        }else if(_nsa.value== "DialRingGroup"  ){
+		_$('rgrp').selectedIndex = -1;
+		_$('rgrp').style.display = "";
         }
 
 
@@ -980,6 +998,22 @@
 		}
 		return null ;
 	}
+	
+
+	if( t.name.match('ringroups-custom-') && !x ){
+		var k = t.fieldbyname['gui_ring_groupname'];
+		var l = document.createElement('option');
+			l.text = (k)?k:t.name;
+			l.value = t.name + ",s,1" ;
+		
+		if(document.attachEvent){ 
+			_$('rgrp').add(l);
+		}else{
+			_$('rgrp').add(l,null);
+		}
+		return null;
+	}
+
 
 	if ((t.name != specialcontext))
 	return null;
@@ -1185,6 +1219,7 @@
 					<option value="GotoDirecotry">Goto Directory</option>
 					<option value="GotoExtension">Goto Extension</option>
 					<option value="GotoTimeBasedRule">Goto TimeBasedRule</option>
+					<option value="DialRingGroup">Dial RingGroup</option>
 					<option value="Hangup">Hangup</option>
 				</select>&nbsp;
 				<input type=text id="newstep_var" style="display:none" size=4 disabled class="input8">
@@ -1194,6 +1229,7 @@
 					<select size=5 id="combosel_sounds" style="font-family: Verdana, Arial, Helvetica, Sans-Serif;font-size: 11px;" class="input8"></select>
 				</div>
 				<select style="display:none" id="tbr" class="input8" onChange=" $('newstep_var').value = $('tbr').value;"></select>
+				<select style="display:none" id="rgrp" class="input8" onChange=" $('newstep_var').value = $('rgrp').value;"></select>
 				<input type=text id="newstep_var_digit" size=3 style="display:none;" onChange=" $('newstep_var').value = $('newstep_var_digit').value;"  pattern='^\d*$' class="input8">&nbsp;
 				<SCRIPT LANGUAGE="JavaScript">combo_box('newstep_var', "combodiv_sounds","combosel_sounds"); </SCRIPT>
 				<input type=button style='width:45' id='addstep' onclick="add_newstep()"  value="Add" disabled  class="buttonbold">

Modified: trunk/config/ringgroups.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/ringgroups.html?view=diff&rev=983&r1=982&r2=983
==============================================================================
--- trunk/config/ringgroups.html (original)
+++ trunk/config/ringgroups.html Fri May 25 10:48:20 2007
@@ -81,6 +81,7 @@
 }
 
 function edit_form(g){
+	_$('form_caption').innerHTML = "<B>Edit Ring Group</B>";
 	isNewRG = 0;
 	RG_EDITING = g;
 	var this_ringgroup = ringgroups[g];



More information about the asterisk-gui-commits mailing list