How to use the xui.absValue function in xui

To help you get started, we’ve selected a few xui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linb / CrossUI / xui / js / DataBinder.js View on Github external
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,{
github linb / CrossUI / xui2.0 / xui / js / DataBinder.js View on Github external
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]={
github linb / CrossUI / xui1.4 / xui / js / DataBinder.js View on Github external
}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();
                }
            });
github linb / CrossUI / xui2.0 / xui / js / DataBinder.js View on Github external
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();
                }
            });
github linb / CrossUI / xui1.3 / xui / js / DataBinder.js View on Github external
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();
                }
            });
github linb / CrossUI / xui1.3 / xui / js / DataBinder.js View on Github external
_.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;
github linb / CrossUI / xui2.0 / xui / js / DataBinder.js View on Github external
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);
github linb / CrossUI / xui1.4 / xui / js / DataBinder.js View on Github external
_.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;
github linb / CrossUI / xui1.3 / xui / js / DataBinder.js View on Github external
isDirtied:function(){
            var prf=this.get(0);
            for(var i=0,l=prf._n.length;i
github linb / CrossUI / xui / js / DataBinder.js View on Github external
}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();
                }
            });