📄 queues.html
字号:
return null;
}
//if (t.name.substring(0,6) == 'trunk_')
// return null;
if ( t.fieldbyname['context'] == asterisk_guiTDPrefix + t.name ) {
return null;
}
if (t.fieldbyname['fullname'] && t.fieldbyname['fullname'].length) {
return t.name + " -- " + t.fieldbyname['fullname'];
} else
return t.name;
}
// Queue Call Backs
queuecallbacks.oncategorydelete = function(value){
$('testmulti').innerHTML = "";
delete_extension(value);
}
queuecallbacks.postselect = function(box, val ) {
if($('queues').selectedIndex ==-1){ $('save_q').disabled=true; return true; }
//
if(val == "reserved" ){
$('testmulti').innerHTML = "";
$('save_q').disabled=true;
$('cancel').disabled = true;
if( box.options[box.selectedIndex].text.toLowerCase().match("-- conference bridge") ){
//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Conferencing\' panel to edit a Conference Bridge</font>";
box.selectedIndex = -1;
gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Conferencing\' panel to edit the selected entry");
return true;
}
if( box.options[box.selectedIndex].text.toLowerCase().match("-- check voicemail") ){
//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
box.selectedIndex = -1;
gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Voicemail\' panel to edit the selected entry");
return true;
}
if( box.options[box.selectedIndex].text.toLowerCase().match("-- voice menu") ){
box.selectedIndex = -1;
//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Voice Menus\' panel to edit the selected entry");
return true;
}
box.selectedIndex = -1;
gui_alert(" You can not edit the selected entry from here.\n Please click on the \'Users\' panel to edit the selected entry");
return true;
}
// show all member entires listed under the queue member - $('queues').value
for( k=0; k<queuenames.length; k++ ){
if( queuenames[k] == $('queues').value ){ j = k; break; }
}
$('testmulti').innerHTML ="";
for (k=0;k< $('agents').length ;k++ ){
selectedagent = "selectedagent" + k;
var str_checked = "";
$('agents').options[k].selected = false;
if( InArray( queueagents [j], $('agents').options[k].innerHTML.split(' -- ')[0] ) ){
$('agents').options[k].selected = true;
str_checked = " checked ";
}
$('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.split(' -- ')[0] + '"'+ str_checked + ' onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.split(' -- ')[1] +' (' + $('agents').options[k].innerHTML.split(' -- ')[0]+ ')' + '</LABEL><BR>';
}
$('save_q').disabled = false;
}
queuecallbacks.loaded = function() { parent.astmanEngine.config2list("users.conf", $('devices'), new Array(), callbacks); }
queuecallbacks.newcategory = function(t) {
var tmp = null;
$('save_q').disabled=false;
if ($('queues').stored_config.catbyname['general']){
tmp = objcopy($('queues').stored_config.catbyname['general']);
x = userbase ;
for( var f=0; f < $('queues').options.length ; f++ ){
if( x < $('queues').options[f].innerHTML.split(' -- ')[0] )
break;
x++;
}
tmp.name = x;
}else{
tmp.name = 6000 ; // a default value if one is not defined in users.conf's general context
}
$('testmulti').innerHTML ="";
for (k=0;k< $('agents').length ;k++ ){
selectedagent = "selectedagent" + k;
$('agents').options[k].selected = false;
$('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.split(' -- ')[0] + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.split(' -- ')[1] +' (' + $('agents').options[k].innerHTML.split(' -- ')[0] + ')' + '</LABEL><BR>';
}
return tmp;
}
queuecallbacks.checkparams = function(box) { }
queuecallbacks.eachline = true;
queuecallbacks.includecats = true;
queuecallbacks.format = function(t,x) {
var tmp = t.name.split('general');
if(tmp.length>1)
return false;
else if ( t.name && x==undefined && InArray(extensions_conf_qs, t.name) ){ // if is a category
k=0;
j = j +1;
queueagents[j] = new Array;
queuenames[j] = t.name;
return t.name + " -- Queue '" + t.fieldbyname['fullname'] + "'";
}else if(InArray(extensions_conf_qs, t.name)) { // if is a subcategory
tmp = t.fields[x].split ('Agent/');
if(t.names[x] == 'member' && tmp.length > 1){
queueagents [j] [k] = tmp[1];
k = k+1;
}
return false;
}
}
//extencallbacks
extencallbacks.loaded = function() { parent.astmanEngine.config2list("queues.conf", $('queues'), widgets, queuecallbacks); }
extencallbacks.eachline = true;
extencallbacks.format = function(t, x) {
var res;
var qname;
if ((t.name != specialcontext)){ return null; }
res = format_extension($('extensions'), t, x);
if (t.subfields[x]['app'] == 'Queue') { extensions_conf_qs.push(t.subfields[x]['name']); return null; }
return res;
}
////////
function localajaxinit() {
showdiv_statusmessage();
setWindowTitle("Call Queues");
// $('advancedi').style.width = $('split').width - 60;
if( navigator.userAgent.indexOf("MSIE") != -1){
togglefeatures = function(){ } ;
$('advancedw').style.display = "";
$('advancedw').style.height=190;
}else{
$('advancedw').style.overflow = "hidden";
$('advancedw').style.height = 1;
$('advancedw').style.width = $('split').style.width;
$('queues').style.height = "415px";
}
for (var x=0; x < fieldnames.length ; x++) {
widgets[fieldnames[x]] = $(fieldnames[x]);
widgets[fieldnames[x]].disabled = true;
}
adstatus = "hidden";
parent.astmanEngine.config2list("musiconhold.conf", $('musicclass'), new Array(), mohcallbacks);
$('save_q').disabled = true;
$('message_text').innerHTML = " Saving Changes ... ";
return;
}
mohcallbacks.format = function(t) {
return t.name;
}
mohcallbacks.loaded = function() {
parent.astmanEngine.config2list("extensions.conf", $('extensions'), new Array(), extencallbacks);
}
function free_mem( ){
if( navigator.userAgent.indexOf("MSIE") == -1 ){ return true; }
try{
widgets['save'].hostselectbox = null ;
widgets['cancel'].hostselectbox = null ;
widgets['new'].hostselectbox = null ;
widgets['delete'].hostselectbox = null ;
purge( document.body );
}catch(e){ }
}
</script>
<body id="foo" onload="localajaxinit()" bgcolor="EFEFEF" onunload="free_mem()">
<div class="mainscreenTitleBar">
<span style="margin-left: 4px;font-weight:bold;">Queue Extension 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="mailboxcontent">
<table class="mainscreenTable" align="center">
<tr valign="top">
<td colspan='2'>Extensions:</td>
</tr>
<tr valign="top">
<td>
<select size="25" id="queues" style="width:220px;" class="input10"><option>Loading...</option></select>
</td>
<td style="width:311px; height: 415px">
<div id='adjustments' style='width:310'>
<select id='extensions' style='display:none;width:0px;height:0px'></select>
<select id='devices' style='display:none;width:0px;height:0px'></select>
<select id='finalextensions' style='display:none;width:0px;height:0px'></select>
<table cellspacing='0' cellpadding='0'>
<tr valign="top">
<td>
<table>
<tr onmouseover="show_tooltip('en', 'queues', 0);" >
<td class="field_text">Queue:</td>
<td> <input size='5' id='name' pattern='^\d*$' class="input8"></td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 1);" >
<td class="field_text">Full Name:</td>
<td> <input size='24' id='fullname' pattern='^[a-zA-Z_0-9 ]*$' class="input8"></td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 2);" >
<td class="field_text">Strategy :</td><td> <select id='strategy' class="input8">
<option value="ringall">ringall</option>
<option value="roundrobin">roundrobin</option>
<option value="leastrecent">leastrecent</option>
<option value="fewestcalls">fewestcalls</option>
<option value="random">random</option>
<option value="rrmemory">rrmemory</option>
</select>
</td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 3);" >
<td valign='top' class="field_text">Agents:</td>
<td><select multiple='true' id='agents' style='display:none;'></select>
<div id="testmulti" style='border:1px solid; font-size: 8pt; height:75px; width: 200px;overflow :auto;'></div>
</td>
</tr>
<tr><td colspan='2'></td></tr>
</table>
</td>
</tr>
<tr ><td height=10></td></tr>
<tr onmouseover="show_tooltip('en', 'queues', 4);">
<td style="cursor: pointer; cursor: hand;"><img id="split" onClick="togglefeatures()" src="images/split-v.gif"></td>
</tr>
<tr> <td> <div style="background-image:url(images/slice-v.gif)" id='advancedw'>
<table id='advancedi' align='center'>
<tr onmouseover="show_tooltip('en', 'queues', 5);" >
<td class="field_text">TimeOut:</td>
<td> <input size='2' id='timeout' pattern='^\d*$' class="input8"></td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 6);" >
<td class="field_text">Wrapup Time:</td>
<td> <input size='2' id='wrapuptime' pattern='^\d*$' class="input8"></td>
</tr>
<tr> <td colspan=2>
<span class="field_text" onmouseover="show_tooltip('en', 'queues', 7);" ><input type=checkbox id='autofill'> Auto Fill</span>
<span class="field_text" onmouseover="show_tooltip('en', 'queues', 8);"> <input type=checkbox id='autopause'>Auto Pause</span>
</td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 9);" >
<td class="field_text">Max Len:</td>
<td> <input size='2' id='maxlen' pattern='^\d*$' class="input8"></td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 10);" >
<td class="field_text">JoinEmpty:</td>
<td><input type=checkbox id='joinempty'></td></tr>
<tr onmouseover="show_tooltip('en', 'queues', 11);" >
<td class="field_text">LeaveWhenEmpty:</td>
<td><input type=checkbox id='leavewhenempty'></td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 12);" >
<td class="field_text">Report Hold Time:</td>
<td><input type=checkbox id='reportholdtime'></td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 13);" >
<td colspan=2 class="field_text">Music On Hold: <select id="musicclass" class="input8"></select></td>
</tr>
</table>
</div>
</td>
</tr>
<tr onmouseover="show_tooltip('en', 'queues', 4);">
<td style="cursor: pointer; cursor: hand;"> <img onClick="togglefeatures()" src="images/adv-v.gif"> </td>
</tr>
</table>
</div>
</td>
</tr>
<tr> <td align='center'>
<input type='button' id='new' value='New' class="buttonbold">
<input type='button' id='delete' value='Delete' class="buttonbold">
</td>
<td align='center' colspan='2'>
<input type=hidden id='save' value="Save">
<input type='button' id='save_q' onclick="save_queue()" value='Save' class="buttonbold">
<input type='button' id='cancel' value='Cancel' class="buttonbold">
</td>
</tr>
</table>
</div>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -