pari: trunk r172 - /trunk/config/queues.html
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon Dec 18 16:29:13 MST 2006
Author: pari
Date: Mon Dec 18 17:29:12 2006
New Revision: 172
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=172
Log:
Bug Fix(0008588) : Hi stadsj, thanks for pointing out the bug. The check for local extensions length was introduced very recently which caused this bug
Modified:
trunk/config/queues.html
Modified: trunk/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/queues.html?view=diff&rev=172&r1=171&r2=172
==============================================================================
--- trunk/config/queues.html (original)
+++ trunk/config/queues.html Mon Dec 18 17:29:12 2006
@@ -199,7 +199,7 @@
q =0;
for (k=0;k< $('agents').length ;k++ ){
if( $('agents').options[k].selected ){
- queueagents [r][q] = $('agents').options[k].innerHTML.substr(0,4);
+ queueagents [r][q] = $('agents').options[k].innerHTML.substr(0,localextenlength);
q = q+1;
}
}
@@ -226,7 +226,7 @@
for (k=0;k< $('agents').length ;k++ ){
selectedagent = "selectedagent" + k;
if( $(selectedagent).checked ){
- queueagents [j][q] = $('agents').options[k].innerHTML.substr(0,4);
+ queueagents [j][q] = $('agents').options[k].innerHTML.substr(0,localextenlength);
$('agents').options[k].selected = true;
q = q+1;
}else{
@@ -285,7 +285,7 @@
callbacks.postselect = function (){ }
callbacks.format = function (t,x){
if ((t.name == 'general')){
- if ( t.fieldbyname['localextenlength'] && t.fieldbyname['localextenlength'].length){ localextenlength = t.fieldbyname['localextenlength'] ; }
+ if ( t.fieldbyname['localextenlength'] && t.fieldbyname['localextenlength'].length){ localextenlength = parseInt(t.fieldbyname['localextenlength']) ; }
if ( t.fieldbyname['userbase'] && t.fieldbyname['userbase'].length){ userbase = t.fieldbyname['userbase'] ; }
return null;
}
@@ -344,12 +344,12 @@
$('testmulti').innerHTML ="";
for (k=0;k< $('agents').length ;k++ ){
selectedagent = "selectedagent" + k;
- if( InArray( queueagents [j], $('agents').options[k].innerHTML.substr(0,4) ) ){
+ if( InArray( queueagents [j], $('agents').options[k].innerHTML.substr(0,localextenlength) ) ){
$('agents').options[k].selected = true;
- $('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,4) + '" checked onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.substr(8) +' (' + $('agents').options[k].innerHTML.substr(0,4) + ')' + '</LABEL><BR>';
+ $('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,localextenlength) + '" checked onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.substr(localextenlength+4) +' (' + $('agents').options[k].innerHTML.substr(0,localextenlength) + ')' + '</LABEL><BR>';
}else{
$('agents').options[k].selected = false;
- $('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,4) + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.substr(8) +' (' + $('agents').options[k].innerHTML.substr(0,4) + ')' + '</LABEL><BR>';
+ $('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,localextenlength) + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.substr(localextenlength+4) +' (' + $('agents').options[k].innerHTML.substr(0,localextenlength) + ')' + '</LABEL><BR>';
}
}
$('save_q').disabled = false;
@@ -366,7 +366,7 @@
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.substr(0,4) + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.substr(8) +' (' + $('agents').options[k].innerHTML.substr(0,4) + ')' + '</LABEL><BR>';
+ $('testmulti').innerHTML += '<LABEL FOR=' + selectedagent + '><INPUT id="' + selectedagent + '" TYPE="CHECKBOX" VALUE="'+ $('agents').options[k].innerHTML.substr(0,localextenlength) + '" onclick="$(\'save_q\').disabled=false; $(\'cancel\').disabled=false;"> ' + $('agents').options[k].innerHTML.substr(localextenlength+4) +' (' + $('agents').options[k].innerHTML.substr(0,localextenlength) + ')' + '</LABEL><BR>';
}
return tmp;
}
More information about the asterisk-gui-commits
mailing list