Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fun=function(profile, dataItem, item, pid, index,len, mapCache,serialId){
var id=dataItem[xui.UI.$tag_subId]=typeof serialId=='string'?serialId:('a_'+profile.pickSubId('aitem')), t;
if(typeof item=='string')
item={caption:item};
if(false!==mapCache){
profile.ItemIdMapSubSerialId[item.id] = id;
profile.SubSerialIdMapItem[id] = item;
}
if(t=item.object){
t=dataItem.object=t['xui.absBox']?t.get(0):t;
//relative it.
if(t['xui.UIProfile']){
t.properties.position='relative';
var addcls=profile.getClass('ITEM','-object'),
cck = t.CC.KEY || (cck=t.CC.KEY='');
if(cck.indexOf(addcls)===-1)
t.CC.KEY = cck + " " + addcls;
}
item.$xid=t.$xid;
t.$item=item;
t.$holder=profile;
if(!t.host||t.host===t)t.boxing().setHost(profile.host,t.alias);
if(!profile.$attached)profile.$attached=[];
profile.$attached.push(t);
}else{
// for compitable with older versions
fun=function(profile, dataItem, item, pid, index,len, mapCache,serialId){
var id=dataItem[xui.UI.$tag_subId]=typeof serialId=='string'?serialId:('a_'+profile.pickSubId('aitem')), t;
if(typeof item=='string')
item={caption:item};
if(false!==mapCache){
profile.ItemIdMapSubSerialId[item.id] = id;
profile.SubSerialIdMapItem[id] = item;
}
if(t=item.object){
t=dataItem.object=t['xui.absBox']?t.get(0):t;
//relative it.
if(t['xui.UIProfile']){
t.properties.position='relative';
var addcls=profile.getClass('ITEM','-object'),
cck = t.CC.KEY || (cck=t.CC.KEY='');
if(cck.indexOf(addcls)===-1)
t.CC.KEY = cck + " " + addcls;
}
item.$xid=t.$xid;
t.$item=item;
t.$holder=profile;
if(!t.host||t.host===t)t.boxing().setHost(profile.host,t.alias);
if(!profile.$attached)profile.$attached=[];
profile.$attached.push(t);
}else{
// for compitable with older versions
fun=function(profile, dataItem, item, pid, index,len, mapCache,serialId){
var id=dataItem[xui.UI.$tag_subId]=typeof serialId=='string'?serialId:('a_'+profile.pickSubId('aitem')), t;
if(typeof item=='string')
item={caption:item};
if(false!==mapCache){
profile.ItemIdMapSubSerialId[item.id] = id;
profile.SubSerialIdMapItem[id] = item;
}
if(t=item.object){
t=dataItem.object=t['xui.absBox']?t.get(0):t;
//relative it.
if(t['xui.UIProfile']){
t.properties.position='relative';
var addcls=profile.getClass('ITEM','-object'),
cck = t.CC.KEY || (cck=t.CC.KEY='');
if(cck.indexOf(addcls)===-1)
t.CC.KEY = cck + " " + addcls;
}
item.$xid=t.$xid;
t.$item=item;
t.$holder=profile;
if(!t.host||t.host===t)t.boxing().setHost(profile.host,t.alias);
if(!profile.$attached)profile.$attached=[];
profile.$attached.push(t);
}else{
switch(item.type){