📄 queues.html.svn-base
字号:
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; try{ if ($('queues').stored_config.catbyname['general']){ tmp = objcopy($('queues').stored_config.catbyname['general']); var x = userbase ; for( var f=0; f < $('queues').options.length ; f++ ){ if( x < $('queues').options[f].innerHTML.split(' -- ')[0] ) break; x++; } }else{ var x = 6000 ; // a default value if one is not defined in users.conf's general context } }catch(err){ var x = 6000 ; } tmp.name = x; $('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; }}//extencallbacksextencallbacks.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() { ASTGUI.events.add(document, 'mouseover', show_tooltip); showdiv_statusmessage(); setWindowTitle("Call Queues"); $('queues').style.height = "415px"; for (var x=0; x < fieldnames.length ; x++) { widgets[fieldnames[x]] = $(fieldnames[x]); widgets[fieldnames[x]].disabled = true; } 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'>Queues:</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> <td class="field_text" tip="en,queues,0">Queue:</td> <td> <input size='5' id='name' pattern='^\d*$' class="input8"></td> </tr> <tr> <td class="field_text" tip="en,queues,1">Full Name:</td> <td> <input size='24' id='fullname' pattern='^[a-zA-Z_0-9 ]*$' class="input8"></td> </tr> <tr> <td class="field_text" tip="en,queues,2">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> <td valign='top' class="field_text" tip="en,queues,3">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> </table> </td> </tr> <tr><td height=5></td></tr> <tr> <td align=center> <fieldset style="width: 225px; "> <legend> Queue Options: </legend> <table> <tr> <td class="field_text" tip="en,queues,5">TimeOut:</td> <td> <input size='2' id='timeout' pattern='^\d*$' class="input8"></td> </tr> <tr> <td class="field_text" tip="en,queues,6">Wrapup Time:</td> <td> <input size='2' id='wrapuptime' pattern='^\d*$' class="input8"></td> </tr> <tr> <td class="field_text" tip="en,queues,9">Max Len:</td> <td> <input size='2' id='maxlen' pattern='^\d*$' class="input8"></td> </tr> <tr> <td class="field_text" tip="en,queues,13">Music On Hold: </td> <td><select id="musicclass" class="input8"></select></td> </tr> </table> <table> <tr> <td><input type=checkbox id='autofill'></td> <td class="field_text" tip="en,queues,7">Auto Fill:</td> </tr> <tr> <td><input type=checkbox id='autopause'></td> <td class="field_text" tip="en,queues,8">Auto Pause:</td> </tr> <tr> <td><input type=checkbox id='joinempty'></td> <td class="field_text" tip="en,queues,10">JoinEmpty:</td> </tr> <tr> <td><input type=checkbox id='leavewhenempty'></td> <td class="field_text" tip="en,queues,11">LeaveWhenEmpty:</td> </tr> <tr> <td><input type=checkbox id='reportholdtime'></td> <td class="field_text" tip="en,queues,12">Report Hold Time:</td> </tr> </table> </fieldset> </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 + -