pari: trunk r261 - /trunk/config/menus.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Jan 16 18:50:53 MST 2007


Author: pari
Date: Tue Jan 16 19:50:52 2007
New Revision: 261

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=261
Log:
tweak- 0008726: Dynamically Generate list of sound files

Modified:
    trunk/config/menus.html

Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=261&r1=260&r2=261
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Tue Jan 16 19:50:52 2007
@@ -40,6 +40,8 @@
 	var extensions_array = new Array;
 	var answer_call_string = "s,1,Answer";
 	var localextenlength ;
+	var rfilescallbacks = new Object;
+	var custom_voicemenusfile = "gui_custommenus.conf";
 
 function format_step(this_step){
 	var temp = this_step.split(',');
@@ -960,8 +962,21 @@
 	return res;
 }
 
+
+rfilescallbacks.format = function(t) {
+		return t.name;
+}
+
+rfilescallbacks.loaded= function() {
+	for (var i=0; i < $('recorded_files').length; i++){
+		var tmp_fname = $('recorded_files').options[i].value.slice(0, -4);
+		$('combosel_sounds').innerHTML += '<option value="'+ tmp_fname + '">' + tmp_fname + "</option>" ;
+	}
+	parent.astmanEngine.config2list("users.conf", $('users'), new Array(), usercallbacks);
+}
+
 extencallbacks.loaded = function() {
-	parent.astmanEngine.config2list("users.conf", $('users'), new Array(), usercallbacks);
+	parent.astmanEngine.config2list(custom_voicemenusfile, $('recorded_files'), new Array, rfilescallbacks);
 }
 
 extencallbacks.eachline = true;
@@ -1019,7 +1034,7 @@
 			<select size="20" id="vmenus" style="width:180px; height: 415px" class="input10">
 			<option>Loading...</option>
 			</select>
-			<div style='visibility:hidden;overflow:hidden;width:0px;height:0px'><select id='extensions'></select><select id='users'></select></div>
+			<div style='visibility:hidden;overflow:hidden;width:0px;height:0px'><select id='extensions'></select><select id='users'></select><select id='recorded_files'></select></div>
 		</td>
 		<td valign=top align="right" width=346 height=415>
 						<table align="center" width="346">
@@ -1270,6 +1285,7 @@
 																	<option value="vm-unknown-caller">vm-unknown-caller</option>
 																	<option value="vm-whichbox">vm-whichbox</option>
 																	<option value="vm-youhave">vm-youhave</option>
+															<option value="" style="font-weight: bold">Recorded Voicemenus</option>
 													</select>
 											</div>
 											<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;



More information about the asterisk-gui-commits mailing list