forked from extern/egroupware
extend js-proxy to handle ":" septerated values
This commit is contained in:
parent
77a26d420a
commit
868ce950cb
@ -81,9 +81,12 @@ function selectbox_add_option(id,label,value,do_onchange)
|
|||||||
{
|
{
|
||||||
selectBox = document.getElementById(id);
|
selectBox = document.getElementById(id);
|
||||||
/*alert('selectbox_add_option('+id+','+label+','+value+') '+selectBox);*/
|
/*alert('selectbox_add_option('+id+','+label+','+value+') '+selectBox);*/
|
||||||
|
var search_val = value.split(':');
|
||||||
for (i=0; i < selectBox.length; i++) {
|
for (i=0; i < selectBox.length; i++) {
|
||||||
if (selectBox.options[i].value == value) {
|
var selectvalue = selectBox.options[i].value.split(':');
|
||||||
selectBox.options[i].selected = true;
|
if (selectvalue[0] == search_val[0]) {
|
||||||
|
selectBox.options[i] = null;
|
||||||
|
selectBox.options[selectBox.length] = new Option(label,value,false,true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user