How to use the xui.absBox 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 / xui1.3 / xui / js / UI / ToolBar.js View on Github external
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
github linb / CrossUI / xui1.2 / xui / js / UI / ToolBar.js View on Github external
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
github linb / CrossUI / xui1.0 / xui / js / UI / ToolBar.js View on Github external
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){