Do not add taglist emails one by one, add them all in one, as the rendering process in magicsuggest would be very resource consuming

This commit is contained in:
Hadi Nategh 2015-04-21 15:50:24 +00:00
parent b558a82cac
commit 0c6f050ae5

View File

@ -556,10 +556,13 @@ var et2_taglist_email = et2_taglist.extend(
var taglist = this.taglist;
window.setTimeout(function()
{
var items = [];
for(var i=0; i < parts.length; ++i)
{
taglist.addToSelection({id: parts[i], label: parts[i]});
items.push({id: parts[i], label: parts[i]});
}
taglist.addToSelection(items);
}, 10);
}
}