fix preset of taglist value

This commit is contained in:
Klaus Leithoff 2013-10-14 08:37:49 +00:00
parent 6f5207953e
commit ceb20da716

View File

@ -289,17 +289,27 @@ var et2_taglist = et2_selectbox.extend(
if(!value) return;
var values = jQuery.isArray(value) ? value : [value];
for(var i=0; i < values.length; ++i)
for(var i=0; i < values.length; ++i)
{
var v = values[i];
if (typeof this.options.select_options[v] == 'undefined')
{
var v = values[i];
if (typeof this.options.select_options[v] == 'undefined')
values[i] = {
id: v,
label: v
}
}
else
{
if (typeof values[i].id == 'undefined')
{
values[i] = {
id: v,
label: v
label: this.options.select_options[v]
}
}
}
}
}
this.taglist.addToSelection(values);