Revize 1d217727
Přidáno uživatelem David Raška před asi 9 roky(ů)
application/views/js/base.php | ||
---|---|---|
dropdown.append('<option>'+first_option_text+'</option>');
|
||
|
||
data = jQuery.parseJSON(data);
|
||
|
||
|
||
for (key in data)
|
||
{
|
||
dropdown.append('<option value="'+data[key].id+'">'+data[key].name+'</option>');
|
||
if ($.isArray(data[key])) // is grouped?
|
||
{
|
||
dropdown.append('<optgroup label="'+key+'">');
|
||
for (subkey in data[key])
|
||
{
|
||
dropdown.append('<option value="'+data[key][subkey].id+'">'+data[key][subkey].name+'</option>');
|
||
}
|
||
dropdown.append('</optgroup>');
|
||
}
|
||
else // no group
|
||
{
|
||
dropdown.append('<option value="'+data[key].id+'">'+data[key].name+'</option>');
|
||
}
|
||
}
|
||
}
|
||
});
|
Také k dispozici: Unified diff
refs #967: Filtering destination account