pari: branch asterisknow r2122 - in /branches/asterisknow/config: ./ scripts/...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Jan 10 14:53:01 CST 2008
Author: pari
Date: Thu Jan 10 14:53:00 2008
New Revision: 2122
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=2122
Log:
BE-314: voicemenus not working properly
pulled in the latest voicemenus page from the AA50 1.1
which has many fixes for ivr issues.
Modified:
branches/asterisknow/config/menus.html
branches/asterisknow/config/scripts/astman.js
branches/asterisknow/config/stylesheets/schwing.css
Modified: branches/asterisknow/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/menus.html?view=diff&rev=2122&r1=2121&r2=2122
==============================================================================
--- branches/asterisknow/config/menus.html (original)
+++ branches/asterisknow/config/menus.html Thu Jan 10 14:53:00 2008
@@ -17,6 +17,25 @@
<script src="scripts/astman.js"></script>
<script src="scripts/tooltip.js"></script>
<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+<style type="text/css">
+ .page_header {
+ font-size : 12px;
+ padding : 4px 6px 4px 6px;
+ border-style : solid none solid none;
+ border-top-color : #BDC7E7;
+ border-bottom-color : #182052;
+ border-width : 1px 0px 1px 0px;
+ background-color : #ef8700;
+ margin-bottom: 10px;
+ color : #ffffff;
+ }
+
+ .VoiceMenuMainTable{
+ border : 0;
+ width : 750px;
+ font-size: 11px;
+ }
+</style>
<script>
var widgets = {};
var adstatus;
@@ -31,7 +50,7 @@
var extensions_array = new Array;
var answer_call_string = "s,1,Answer";
var localextenlength ;
-
+var LISTOFSOUNDS = [];
function format_step(this_step){
var temp = this_step.split(',');
@@ -117,7 +136,12 @@
if( temp[2].match("Goto") && !temp[2].match("voicemenu-") ){
var tmp = temp[2].split('(');
var tmp1 = tmp[1].split('|');
+ if( tmp1[1] == 'o' ){return "Goto 'Operator'";}
return "Goto Exten '"+ tmp1[1] + "'";
+ }
+
+ if( temp[2].match("VoiceMailMain") && temp[2].match("CALLERID") ){
+ return "Check VoiceMail for own Extension";
}
if( temp[2].match("Hangup") )
@@ -142,6 +166,7 @@
var newoption = document.createElement("option");
newoption.text = extensions_array[x] ;
newoption.value = extensions_array[x] ;
+ if(extensions_array[x] == 'o'){ newoption.text = "Operator" ; }
_mo.options.add(newoption);
}
}
@@ -283,7 +308,7 @@
var _vmv = _$('vmenus').value ;
var _nsa = _$('newstep_action');
var _nsv = _$('newstep_var') ;
- var _combo_sel = _$('combosel_sounds');
+ var _nss = _$('newstep_sounds');
if( !_nsa.value ){
gui_alert("Please select an action for this step");
@@ -291,7 +316,11 @@
return;
}
- if( _nsa.value != "Answer" && _nsa.value != "GotoDirecotry" && _nsa.value != "Busy" && _nsa.value != "Hangup" && _nsa.value != "Congestion" && _nsa.value != "Background" && _nsa.value != "Playback" && !_nsv.value ){
+ if( _nsa.value== "Background" || _nsa.value== "Playback" ){
+ _nsv.value = _nss.value;
+ }
+
+ if( _nsa.value != "Answer" && _nsa.value != "GotoDirecotry" && _nsa.value !="CheckOwnVoiceMail" && _nsa.value != "Busy" && _nsa.value != "Hangup" && _nsa.value != "Congestion" && !_nsv .value ){
if( _nsa.value.toLowerCase() == "dialringgroup" ){
if(!_$('rgrp').options.length ){
@@ -315,17 +344,17 @@
var priorities = new Array;
if(voicemenusdata[_vmv].extensions['s'] && voicemenusdata[_vmv].extensions['s'].length > 0 ){
- // you might be tempted to say " newpriority = voicemenusdata[_vmv].extensions['s'].length + 1; " but this won't work cause
+ // you might be tempted to say " newpriority = voicemenusdata[_vmv].extensions['s'].length + 1; " but this won't work cause
// you might be dealing a "[s,1][s,3][s,7]" where the array length is 3 - but new priority shud be 8
-
+
// so ,
var laststep_tmp = voicemenusdata[_vmv].extensions['s'][ voicemenusdata[_vmv].extensions['s'].length -1 ] ;
var laststep_priority = ASTGUI.parseContextLine.getPriority( laststep_tmp );
-
+
// gui versions before AA50 firmware 1.1 used 's,n'
// this is updated to's,number' in 1.1
// so if we find a old format - we will delete all the 's' extension and update it to new format
- newpriority = ( laststep_priority == 'n' ) ? voicemenusdata[_vmv].extensions['s'].length + 1 : Number(laststep_priority) + 1 ;
+ newpriority = ( laststep_priority == 'n' ) ? voicemenusdata[_vmv].extensions['s'].length + 1 : Number(laststep_priority) + 1 ;
}else{
newpriority = 1;
}
@@ -341,7 +370,7 @@
action_string = "s,"+ newpriority+ ",DISA(" + _nsv.value + ")";
break;
case 'Background':
- action_string = "s,"+ newpriority+ ",Background(" + _combo_sel.value + ")";
+ action_string = "s,"+ newpriority+ ",Background(" + _nsv.value + ")";
break;
case 'Busy':
action_string = "s,"+ newpriority+ ",Busy";
@@ -356,7 +385,7 @@
action_string = "s,"+ newpriority+ ",Set(TIMEOUT(response)=" + _nsv.value + ")";
break;
case 'Playback':
- action_string = "s,"+ newpriority+ ",Playback(" + _combo_sel.value + ")";
+ action_string = "s,"+ newpriority+ ",Playback(" + _nsv.value + ")";
break;
case 'Wait':
action_string = "s,"+ newpriority+ ",Wait(" + _nsv.value + ")";
@@ -380,7 +409,10 @@
action_string = "s,"+ newpriority+ ",Hangup";
break;
case 'GotoDirecotry':
- action_string = "s,"+ newpriority+ ",Directory(default)";
+ action_string = "s,"+ newpriority+ ",Directory(default|" + _vmv + "||)";
+ break;
+ case 'CheckOwnVoiceMail':
+ action_string = "s,"+ newpriority+ ",VoiceMailMain(${CALLERID(num)}@default)" ;
break;
default :
action_string = "s,undefined,undefined";
@@ -390,17 +422,17 @@
setTimeout(function(){ _$('status_message').style.display = 'none'; },sc_displaytime);
hide_addStep();
// if request successfull then add this to the steps select box
- var newoption = document.createElement("option");
- newoption.text = format_step(action_string );
+ var newoption = document.createElement("option");
+ newoption.text = format_step(action_string );
newoption.value = action_string ;
var _steps = _$('steps') ;
_steps.options.add ( newoption );
// and also add the information to the voicemenus data
if(voicemenusdata[_vmv].extensions['s']){
- voicemenusdata[_vmv].extensions['s'].push(action_string);
+ voicemenusdata[_vmv].extensions['s'].push(action_string);
}else{
- voicemenusdata[_vmv].extensions['s'] = new Array;
- voicemenusdata[_vmv].extensions['s'][0] = action_string;
+ voicemenusdata[_vmv].extensions['s'] = new Array;
+ voicemenusdata[_vmv].extensions['s'][0] = action_string;
}
// empty this textbox & disable this button, select the newly added item to the steps options box
_nsa.selectedIndex = 0;
@@ -414,31 +446,31 @@
_nss.style.display = "none" ;
_$('add_newstep_extensions').style.display = "none";
_$('add_newstep_menus').style.display = "none";
- _nsvd = _$('newstep_var_digit');
+ _nsvd = _$('newstep_var_digit');
_nsvd.value= "";
_nsvd.style.display= "none" ;
if(laststep_priority == 'n' ){ window.location.reload(); }
}
-
- if( laststep_priority=='n' ){ // if old configuration - update to new
- var chs = new listOfActions();
+
+ if( laststep_priority=='n' ){ // if old configuration - update to new
+ var chs = new listOfActions();
chs.filename('extensions.conf'); var c = 0;
for(var vg=0; vg < voicemenusdata[_vmv]['extensions']['s'].length ; vg++ ){
- chs.build_action ( 'delete', c , _vmv, "exten", '', voicemenusdata[_vmv]['extensions']['s'][vg] );
- }
-
+ chs.build_action ( 'delete', c , _vmv, "exten", '', voicemenusdata[_vmv]['extensions']['s'][vg] );
+ }
+
var tmp_priority = 1;
for(var vg=0; vg < voicemenusdata[_vmv]['extensions']['s'].length ; vg++ ){
- var tmp_step = 's,' + tmp_priority + ','+ ASTGUI.parseContextLine.getAction( voicemenusdata[_vmv]['extensions']['s'][vg] ) ;
- voicemenusdata[_vmv]['extensions']['s'][vg] = tmp_step;
- tmp_priority++ ;
- chs.build_action ( 'append', c , _vmv, 'exten', tmp_step );
+ var tmp_step = 's,' + tmp_priority + ','+ ASTGUI.parseContextLine.getAction( voicemenusdata[_vmv]['extensions']['s'][vg] ) ;
+ voicemenusdata[_vmv]['extensions']['s'][vg] = tmp_step;
+ tmp_priority++ ;
+ chs.build_action ( 'append', c , _vmv, 'exten', tmp_step );
}
chs.build_action( 'append', c , _vmv, 'exten', action_string );
chs.callActions(after);
return;
}else{
- uri += build_action('append', 0, _vmv,"exten", action_string );
+ uri += build_action('append', 0, _vmv,"exten", action_string );
makerequest('u','extensions.conf', uri, after );
return;
}
@@ -609,7 +641,7 @@
t += '<option value="disabled">Disabled</option>\n' ;
t += '<option value="gotomenu">Goto Menu</option>\n';
t += '<option value="gotoextension">Goto Extension</option>\n';
- t += '<option value="Custom">Custom</option>\n';
+// t += '<option value="Custom">Custom</option>\n';
t += '<option value="Hangup">Hangup</option>\n';
t += '<option value="PlayInvalid">Play Invalid</option>\n';
t += '</select> <input type="text" class="input8" size=16 style="display:none;font-family: Verdana, Arial, Helvetica, Sans-Serif;font-size: 11px;" id="keypress_' + key+ '_text" onchange="enable_savecancel()">\n';
@@ -735,21 +767,22 @@
var _nsa = _$('newstep_action');
var _ane = _$('add_newstep_extensions') ;
var _anm = _$('add_newstep_menus') ;
- var _cmb = _$('combodiv_sounds') ;
+ var _nss = _$('newstep_sounds');
+
_nsv.value = "";
_nsv.style.display = "none";
_$('newstep_var_digit').style.display= "none" ;
_ane.style.display = "none";
_anm.style.display = "none";
- _cmb.style.display = "none";
- _$('tbr').style.display = "none";
+ //_$('tbr').style.display = "none";
_$('rgrp').style.display = "none";
+ _nss.style.display = "none";
+ _nss.value = "";
if( _nsa.value== "" || _nsa.value== "Answer" || _nsa.value== "Hangup" || _nsa.value== "GotoDirecotry" || _nsa.value== "Busy" || _nsa.value== "Congestion" ){
}else if( _nsa.value== "Background" || _nsa.value== "Playback" ){
- _nsv.style.display = "none";
- _cmb.style.display = "";
+ _nss.style.display = "";
}else if( _nsa.value== "Authenticate" || _nsa.value== "DigitTimeout" || _nsa.value== "ResponseTimeout" || _nsa.value== "Wait" || _nsa.value== "WaitExten" || _nsa.value== "DISA"){
_$('newstep_var_digit').style.display= "" ;
}else if(_nsa.value== "GotoMenu" ){
@@ -778,13 +811,8 @@
current_context = _$('vmenus').value;
var x, y, tmp;
var priority_1, priority_2, buffer;
-
- if(voicemenusdata[current_context]) {
- _$('allowexten').checked = (voicemenusdata[current_context].include == "default") ? true : false ;
- } else {
- _$('allowexten').checked = false;
- }
-
+
+ _$('allowexten').checked = (voicemenusdata[current_context].include == "default") ? true : false ;
//$('keypressoptions').innerHTML = "";
_steps.options.length =0;
_$('comment').value = voicemenusdata[current_context].comment;
@@ -819,12 +847,14 @@
}
_steps.disabled = false;
+ _$('b_ShowAddStep').disabled = false;
_$('addstep').disabled = false;
_$('allowexten').disabled = false;
_$('comment').disabled = false;
_$('deletestep').disabled = true;
_$('delete').disabled = false;
_$('newstep_action').disabled = false;
+ _$('newstep_sounds').disabled = false;
_$('newstep_var').disabled = false;
_$('keypressoptions').style.display = "";
_$('stepDown').disabled = true;
@@ -856,7 +886,7 @@
_$(current_key_exts).style.display = "";
select_menu(current_key_exts, tmp[2],"isext"); // select_menu common for exts and menus
}else if(tmp[2].match("Hangup") ){ // if HangUp
- ASTGUI.selectbox.selectOption(_$(current_key_action), 'Hangup'); //
+ ASTGUI.selectbox.selectOption(_$(current_key_action), 'Hangup'); //
}else if( tmp[2].match('Playback') && tmp[2].match( "(invalid)" ) ){
ASTGUI.selectbox.selectOption(_$(current_key_action), 'PlayInvalid');
}else{ // if custom (no 'goto')
@@ -949,9 +979,10 @@
_$('savevmenu').disabled = true;
_$('steps').options.length =0;
_$('newstep_action').disabled = true;
- _$('combodiv_sounds').style.display = "none";
_$('newstep_var').disabled = true;
+ _$('newstep_sounds').disabled = true;
_$('addstep').disabled = true;
+ _$('b_ShowAddStep').disabled = true;
_$('steps').disabled = true;
_$('stepUp').disabled = true;
_$('stepDown').disabled = true;
@@ -995,9 +1026,10 @@
_allowexten.checked = false;
_allowexten.disabled = false;
_$('newstep_action').disabled = true;
- _$('combodiv_sounds').style.display = "none";
_$('newstep_var').disabled = true;
+ _$('newstep_sounds').disabled = true;
_$('addstep').disabled = true;
+ _$('b_ShowAddStep').disabled = true;
_steps.disabled = true;
// 4. Reset Comment
_$('keypressoptions').style.display = "";
@@ -1010,6 +1042,7 @@
function localajaxinit() {
+ parent._$('mainscreen').width= 798;
ASTGUI.events.add(document, 'mouseover', show_tooltip);
showdiv_statusmessage();
setWindowTitle("Voice Menus");
@@ -1028,6 +1061,7 @@
var qname;
if(t.name == TIMERULES_CATEGORY && t.fields[x].match("NoOp") ){
+ return null ; // disable time based rules
var m = t.fields[x].split('NoOp')[1].substr(1);
m = m.substr(0, m.length-1);
@@ -1080,13 +1114,6 @@
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
var sndfiles = originalRequest.responseText.split("\n") ;
- var el = _$('combosel_sounds');
- var h = document.createElement('option');
- h.text = "Default Sounds" ;
- h.value = "" ;
- h.style.fontWeight = "bold";
- ASTGUI.selectbox.append_option(el,h);
-
var file_name;
var listof_DefaultSounds = {};
for( var i =0 ; i < sndfiles.length ; i++){
@@ -1101,7 +1128,7 @@
}
for(var i in listof_DefaultSounds){
if( listof_DefaultSounds.hasOwnProperty(i) ){
- ASTGUI.selectbox.append(el , i, i);
+ LISTOFSOUNDS.push(i);
}
}
load_recordedfiles();
@@ -1120,15 +1147,6 @@
onComplete: function(originalRequest){
// Add Recorded Voiemenus to the list of sound files
var recfiles = originalRequest.responseText.split("\n") ;
- New_OPTION = document.createElement('option');
- New_OPTION.text = "Recorded Voicemenus" ;
- New_OPTION.value = "" ;
- New_OPTION.style.fontWeight = "bold";
- try {
- _$('combosel_sounds').add(New_OPTION, null); // W3C way
- }catch(ex) {
- _$('combosel_sounds').add(New_OPTION); // IE way
- }
var file_name;
for( var i =0 ; i < recfiles.length ; i++){
if( typeof recfiles[i] == "undefined" || recfiles[i] == "" ){
@@ -1138,15 +1156,9 @@
if( recfiles[i] == "" ){ continue; }
file_name = recfiles[i].stripTags() ;
file_name = file_name.substr(0,(file_name.length - 4) ) ;
- New_OPTION = document.createElement('option');
- New_OPTION.text = file_name ;
- New_OPTION.value = asterisk_menusRecord_path + file_name ;
- try {
- _$('combosel_sounds').add(New_OPTION, null); // W3C way
- }catch(ex) {
- _$('combosel_sounds').add(New_OPTION); // IE way
- }
+ LISTOFSOUNDS.push("record/" + file_name);
}
+ ASTGUI.COMBOBOX.call( _$('newstep_sounds') , LISTOFSOUNDS, 400 );
parent.astmanEngine.config2list("users.conf", _$('users'), new Array(), usercallbacks);
},
onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
@@ -1200,6 +1212,7 @@
}
function free_mem(){
+ parent._$('mainscreen').width= 540;
if( navigator.userAgent.indexOf("MSIE") == -1 ){ return true; }
try{
widgets['save'].hostselectbox = null ;
@@ -1209,22 +1222,33 @@
purge( document.body );
} catch(e){ }
}
+
+function show_addStep(){
+ _$('bg_transparent').style.display="" ;
+ _$('NewStep_Content').style.display="" ;
+}
+
+function hide_addStep(){
+ _$('bg_transparent').style.display="none" ;
+ _$('NewStep_Content').style.display="none" ;
+}
+
</script>
<body id="foo" onload="localajaxinit()" bgcolor="EFEFEF" onunload="free_mem()">
-<div class="mainscreenTitleBar">
+<div class="page_header">
<span style="margin-left: 4px;font-weight:bold;">Voice Menus Configuration</span>
<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
</div>
<div class="mainscreenContentBox" id="userscontent">
-<table class="mainscreenTable" align="center">
+<table class="VoiceMenuMainTable" align="left">
<tr valign="top">
<td colspan='2'> Voice Menus: </td>
</tr>
<tr valign="top">
<td> <select size="25" id="vmenus" style="width:180px;" class="input10"><option>Loading...</option></select> </td>
- <td valign=top align="right" width=346 height=415>
+ <td valign=top align="right" width=560 height=415>
<select id='extensions' style='display:none;width:0px;height:0px'></select><select id='users' style='display:none;width:0px;height:0px'></select><select id='recorded_files' style='display:none;width:0px;height:0px'></select>
- <table align="center" width="346">
+ <table align="center" width="560">
<tr>
<td width="50" align=left class="field_text" tip="en,menus,0">Name:</td>
<td align=left class="field_text">
@@ -1232,72 +1256,36 @@
<span tip="en,menus,5">
Extension: <input id="alias_exten" onKeyUp="enable_savecancel()" size=4 disabled class="input8" tip="en,menus,5">
</span>
+
+ <label FOR="allowexten" tip="en,menus,3">
+ <input type=checkbox id=allowexten disabled onclick="enable_savecancel()"> Allow Dialing other Extensions?
+ </label>
</td>
</tr>
<tr> <td class="field_text" tip="en,menus,1">Steps:<BR>
<input style='width:45' type="button" id="stepUp" value="Up" disabled onClick="step_up()" class="buttonbold"><BR><BR>
<input style='width:45' type="button" id="stepDown" value="Down" disabled onClick="step_down()" class="buttonbold">
</td>
- <td rowspan=2><select id='steps' size=5 style="width:280px;" onClick="step_onselect()" disabled class="input8"></select></td>
+ <td><select id='steps' size=8 style="width:550px;" onClick="step_onselect()" disabled class="input8"></select></td>
</tr>
- <tr><td colspan=2 class="field_text" height=4 tip="en,menus,2"></td></tr>
- <tr><td colspan=2 class="field_text" tip="en,menus,2">Add a new Step:</td></tr>
+
+ <tr> <td> </td>
+ <td class="field_text">
+ <input type=button style='width:105' id='b_ShowAddStep' onclick="show_addStep()" value="Add new Step" disabled class="buttonbold">
+ <input type=button style='width:140' id='deletestep' onclick="delete_step()" value="Delete selected Step" disabled class="buttonbold">
+ </td>
+ </tr>
+ <tr> <td colspan=2 height=25></td></tr>
<tr><td colspan=2>
-
- <NOBR>
- <select id='newstep_action' disabled onChange="update_newstep_var()" class="input8">
- <option value=""> -- Select --</option>
- <option value="Answer">Answer</option>
- <option value="Authenticate">Authenticate</option>
- <option value="Background">Background</option>
- <option value="Busy">Busy Tone</option>
- <option value="Congestion">Congestion</option>
- <!-- <option value="SetMusicOnHold">SetMusicOnHold</option> -->
- <option value="DigitTimeout">DigitTimeout</option>
- <option value="DISA">DISA</option>
- <option value="ResponseTimeout">ResponseTimeout</option>
- <option value="Playback">Playback</option>
- <option value="Wait">Wait</option>
- <option value="WaitExten">WaitExten</option>
- <option value="GotoMenu">Goto Menu</option>
- <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>
- <input type=text id="newstep_var" style="display:none" size=4 disabled class="input8">
- <select id='add_newstep_extensions' style="display:none" onChange=" $('newstep_var').value = $('add_newstep_extensions').value;" class="input8"></select>
- <select id='add_newstep_menus' style="display:none" onChange=" $('newstep_var').value = $('add_newstep_menus').value;" class="input8"></select>
- <div id="combodiv_sounds" style="display:none">
- <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">
- <SCRIPT LANGUAGE="JavaScript">ASTGUI.COMBOBOX.call(_$('combosel_sounds'));</SCRIPT>
- <input type=button style='width:45' id='addstep' onclick="add_newstep()" value="Add" disabled class="buttonbold">
- <input type=button style='width:50' id='deletestep' onclick="delete_step()" value="Delete" disabled class="buttonbold">
- </NOBR>
- </td>
- </tr>
- <tr>
- <td colspan=2 class="field_text" tip="en,menus,3">
- <label FOR="allowexten" tip="en,menus,3">
- <input type=checkbox id=allowexten disabled onclick="enable_savecancel()"> Dial other Extensions?
- </label> </td>
- </tr>
- <tr> <td colspan=2 height=6></td></tr>
- <tr> <td colspan=2 class="field_text" tip="en,menus,4">'Keypress' Events</td> </tr>
- <tr><td colspan=2>
- <div style="width=340px;">
+ <div>
<table cellpadding=3 cellspacing=0 width="100%">
<TR bgcolor='#B8B8B8'>
<TD width=35 class="field_text">Key</TD><TD class="field_text">Action</TD>
+ <TD width=440 class="field_text" tip="en,menus,4" align=center><B>'Keypress' Events</B></TD>
</TR>
</table>
</div>
- <div id="keypressoptions" style="height:155px;width=340px; overflow :auto;display :none;">
+ <div id="keypressoptions" style="height:190px;overflow :auto;display :none;">
<table cellpadding=3 cellspacing=0 width="100%">
<script>
for (var k=0; k< keys.length; k++){
@@ -1334,4 +1322,56 @@
</tr>
</table>
</div>
+<div id="NewStep_Content" STYLE="display:none; position: absolute; left: 40; top: 64; width:580; height:60; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:100">
+ <table width="100%" cellpadding=0 cellspacing=0 onmousedown="ASTGUI.startDrag(event , 'NewStep_Content');">
+ <TR bgcolor="#7E5538" style="background-image:url('images/title_gradient.gif');">
+ <TD tip="en,menus,2"><font color="#FFFFFF"> <B>Add a new Step:</B></FONT></TD>
+ <TD Height="20" align="right" style="cursor: move">
+ <A href="#" onclick="hide_addStep();" style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</A>
+ </TD>
+ <TD width=4></TD>
+ </TR>
+ </table>
+ <table cellpadding=2 cellspacing=2 border=0 width="100%" align="center">
+ <tr> <td colspan=2 class="field_text" align=center height=40 valign=middle>
+ <NOBR>
+ Add new Step:
+ <select id='newstep_action' disabled onChange="update_newstep_var()" class="input8">
+ <option value=""> -- Select --</option>
+ <option value="Answer">Answer</option>
+ <option value="Authenticate">Authenticate</option>
+ <option value="Background">Background</option>
+ <option value="Busy">Busy Tone</option>
+ <option value="Congestion">Congestion</option>
+ <!-- <option value="SetMusicOnHold">SetMusicOnHold</option> -->
+ <option value="DigitTimeout">DigitTimeout</option>
+ <option value="DISA">DISA</option>
+ <option value="ResponseTimeout">ResponseTimeout</option>
+ <option value="Playback">Playback</option>
+ <option value="Wait">Wait</option>
+ <option value="WaitExten">WaitExten</option>
+ <option value="GotoMenu">Goto Menu</option>
+ <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="CheckOwnVoiceMail">Check Voicemail for Own Extension</option>
+ <option value="Hangup">Hangup</option>
+ </select>
+ <input type=text id="newstep_var" style="display:none" size=4 disabled class="input8">
+ <input type=text id="newstep_sounds" style="display:none" size=24 disabled class="input9">
+ <select id='add_newstep_extensions' style="display:none" onChange=" $('newstep_var').value = $('add_newstep_extensions').value;" class="input8"></select>
+ <select id='add_newstep_menus' style="display:none" onChange=" $('newstep_var').value = $('add_newstep_menus').value;" class="input8"></select>
+ <!-- <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">
+ <input type=button style='width:45' id='addstep' onclick="add_newstep()" value="Add" disabled class="buttonbold">
+ <input type=button style='width:55' onclick="hide_addStep()" value="Cancel" class="buttonbold">
+ </NOBR>
+ </td>
+ </tr>
+ </table>
+</div>
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%; background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:4">
+</div>
</body>
Modified: branches/asterisknow/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/scripts/astman.js?view=diff&rev=2122&r1=2121&r2=2122
==============================================================================
--- branches/asterisknow/config/scripts/astman.js (original)
+++ branches/asterisknow/config/scripts/astman.js Thu Jan 10 14:53:00 2008
@@ -331,7 +331,6 @@
},
COMBOBOX: function (a,w){ // Usage - ASTGUI.COMBOBOX.call( element , OptionsArray, width(Optional) );
- // a is the element, not the element ID. eg: _$('element_name') not 'element_name'
// this.comboDiv - the div element created
// this.comboOptions - the array of options
var k = document.createElement('DIV');
@@ -400,7 +399,8 @@
};
setTimeout( sf, 300 );
};
- this.comboOptions = (w) ? w.sort() : '';
+
+ this.comboOptions = a.sort();
ASTGUI.events.add( this, 'focus' , creatediv ) ;
ASTGUI.events.add( this, 'keyup' , updateDivAndShow ) ;
}
Modified: branches/asterisknow/config/stylesheets/schwing.css
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/stylesheets/schwing.css?view=diff&rev=2122&r1=2121&r2=2122
==============================================================================
--- branches/asterisknow/config/stylesheets/schwing.css (original)
+++ branches/asterisknow/config/stylesheets/schwing.css Thu Jan 10 14:53:00 2008
@@ -1,3 +1,29 @@
+.comboMainDiv{
+ padding : 2px 2px 2px 2px;
+ border-style : none solid solid none;
+ border-color : #4d7891;
+ border-width : 0px 1px 1px 0px;
+ background-color : #ccdfeb;
+ width : 450px;
+ height : 160px;
+ overflow : auto;
+ position :absolute;
+ z-index : 10000;
+}
+
+.comboMainDiv div {
+ padding : 0px 0px 2px 5px;
+ border-width : 0px 0px 0px 0px;
+ font-family : Trebuchet MS, Arial, Helvetica, sans-serif;
+ font-size : 115%;
+ /*color : #0c5584;*/
+ color : #0000CC;
+}
+
+.comboMainDiv div:hover {
+ background: #9ac2db;
+}
+
div.accordionTabTitleBar {
font-size : 12.5px;
padding : 2px 2px 2px 2px;
More information about the asterisk-gui-commits
mailing list