Fix multiple selection taglist can not handle comma separated values

This commit is contained in:
Hadi Nategh 2016-06-01 13:43:08 +02:00
parent 957ca0f380
commit 1228270b52

View File

@ -726,7 +726,16 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
*/ */
set_value: function(value) set_value: function(value)
{ {
if (value === '' || value === null) value = [];
if (value === '' || value === null)
{
value = [];
}
else if (typeof value === 'string' && this.options.multiple)
{
value = value.split(',');
}
var values = jQuery.isArray(value) ? jQuery.extend([],value) : [value]; var values = jQuery.isArray(value) ? jQuery.extend([],value) : [value];
if(!value && this.taglist) if(!value && this.taglist)