Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
xui.arr.each(this.constructor._getBoundElems(prf),function(profile){
if(!profile.box["xui.absValue"])return;
var p=profile.properties,
ins = profile.boxing(),
// maybe return array
uv = ins.getUIValue(),
key = p.dataField || p.name || profile.alias, keys;
// v and uv can be object(Date,Number)
if(!dirtied || (uv+" ")!==(ins.getValue()+" ")){
if(ins.getCaption){
if(key.indexOf(":")!=-1){
keys=key.split(':');
}
if(keys && keys[0] && keys[1]){
hash[keys[0]]=uv;
hash[keys[1]]=ins.getCaption();
}else if(withCaption){
xui.set(hash,key,{
xui.arr.each(this.constructor._getBoundElems(prf),function(profile){
if(!profile.box["xui.absValue"])return;
var p=profile.properties,
ins = profile.boxing(),
// maybe return array
uv = ins.getUIValue(),
key = p.dataField || p.name || profile.alias, keys;
// v and uv can be object(Date,Number)
if(!dirtied || (uv+" ")!==(ins.getValue()+" ")){
if(ins.getCaption){
if(key.indexOf(":")!=-1){
keys=key.split(':');
}
if(keys && keys[0] && keys[1]){
hash[keys[0]]=uv;
hash[keys[1]]=ins.getCaption();
}else if(withCaption){
hash[key]={
}else{
if(profile.box['xui.UI.ComboInput'] && (p.type=='file'||p.type=='upload')){
map[t]=profile;
}else if(withCaption && 'caption' in p){
cap=typeof(b.getCaption)=="function"?b.getCaption():p.caption;
// igore unnecessary caption
if((!cap && !uv) || cap==uv)
map[t]=uv;
else
map[t]={value:uv, caption:cap};
}else{
map[t]=uv;
}
}
// for absValue
if(updateUIValue!==false && profile.renderId && profile.box['xui.absValue'])
b.updateValue();
}
});
map[cap]=capv;
}else if(withCaption){
// igore unnecessary caption
if((!capv && !uv) || capv==uv)
map[key]=uv;
else
map[key]={value:uv, caption:capv};
}else{
map[key]=uv;
}
}else{
map[key]=uv;
}
}
// for absValue
if(updateUIValue!==false && profile.renderId && profile.box['xui.absValue'])
b.updateValue();
}
});
if(ca)map[t].CA=_.clone(profile.CA,true);
if(cc)map[t].CC=_.clone(profile.CC,true);
if(cs)map[t].CS=_.clone(profile.CS,true);
if('caption' in p &&('caption' in map[t] || withCaption)&& b.getCaption)
if(pp&&'caption' in pp)pp.caption=b.getCaption();else map[t].caption=b.getCaption();
if(_.isSet(uv) && 'value' in p)
if(pp&&'value' in pp)pp.value=uv;else map[t].value=uv;
}else{
if(withCaption && 'caption' in p){
map[t]={value:uv, caption:typeof(b.getCaption)=="function"?b.getCaption():p.caption};
}else{
map[t]=uv;
}
}
// for absValue
if(updateUIValue!==false && profile.renderId && profile.box['xui.absValue'])
b.updateValue();
}
});
_.arr.each(prf._n,function(profile){
if(!profile.box["xui.absValue"])return;
var p=profile.properties,
b = profile.boxing(),
// maybe return array
uv = b.getUIValue();
// v and uv can be object(Date,Number)
if(!dirtied || (uv+" ")!==(b.getValue()+" ")){
if(withCaption && b.getCaption){
hash[p.dataField]={value:uv,caption:b.getCaption()};
}else{
hash[p.dataField]=uv;
}
}
});
return hash;
xui.arr.each(prf._n,function(profile){
// for container
if(profile.behavior.PanelKeys){
xui.absValue.pack(profile.boxing().getChildren(null, true)).each(function(p){
arr.push(p);
});
}
// for absValue
else if(profile.box['xui.absValue']){
arr.push(profile);
}
});
return xui.arr.removeDuplicate(arr);
_.arr.each(this.constructor._getBoundElems(prf),function(profile){
if(!profile.box["xui.absValue"])return;
var p=profile.properties,
b = profile.boxing(),
// maybe return array
uv = b.getUIValue();
// v and uv can be object(Date,Number)
if(!dirtied || (uv+" ")!==(b.getValue()+" ")){
if(withCaption && b.getCaption){
hash[p.dataField || p.name || profile.alias]={value:uv,caption:b.getCaption()};
}else{
hash[p.dataField || p.name || profile.alias]=uv;
}
}
});
return hash;
isDirtied:function(){
var prf=this.get(0);
for(var i=0,l=prf._n.length;i
}else if(withCaption){
// igore unnecessary caption
if((!capv && !uv) || capv==uv)
target=uv;
else
target={value:uv, caption:capv};
}else{
target=uv;
}
}else{
target=uv;
}
xui.set(map,key,target,true);
}
// for absValue
if(updateUIValue!==false && profile.renderId && profile.box['xui.absValue'])
b.updateValue();
}
});