How to use the xui.Module 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 / Module.js View on Github external
// must here
            o.moduleClass=mcls;
            o.moduleXid=mxid;

            o.create(function(){
            	var f=function(t,m){
                    if(callback)xui.tryF(callback);
            	};
                //for functions like: UI refresh itself
                if(rt)rt.call(rt.target, o);
                //add to parent, and trigger RenderTrigger
                if(b)o.show(f,p,childId);
                else if(!p.isEmpty())o.show(f,p);
            });

            if(o.host&&o.host['xui.Module']){
                delete o.host.$ignoreAutoDestroy;
            }
            return this;
        },
        getParent:function(){
github linb / CrossUI / xui1.4 / xui / js / Module.js View on Github external
_.arr.each(self._nodes,function(o){
                xui.Module.$attachModuleInfo(self,o);
                //Recursive call
                if(o['xui.Module'])o._createInnerModules();
            });
            // attach destroy to the first UI control
github linb / CrossUI / xui2.0 / xui / js / Module.js View on Github external
xui.arr.each(self._nodes,function(o){
                xui.Module.$attachModuleInfo(self,o);
                //Recursive call
                if(o['xui.Module'])o._createInnerModules(tid);
            });
            // attach destroy to the first UI control
github linb / CrossUI / xui1.4 / xui / js / Module.js View on Github external
var fun = function(m){
                    if(m["xui.Module"]){
                        _.each(m._ctrlpool,function(o){
                            if(o["xui.Module"])fun(o);
                            else nodes.push(o);
                        });
                    }
                };
            fun(this);
github linb / CrossUI / xui1.4 / xui / js / Module.js View on Github external
getInstance:function(module, xid){
            var m=this;
            if(!xid){
                if(module['xui.Profile'] && module.moduleClass && module.moduleXid){
                    xid = module.moduleXid;
                    module = module.moduleClass;
                }else{
                    xid = module;
                    module = null;
                }
            }
            if(module){
                m=xui.SC.get(module);
                if(!m||!m['xui.Module'])return;
            }
            var c=m._cache;
            for(var i in c)
                if(_.isFinite(i) ? (xid+"")==i : ('$'+xid)==i)return c[i];
        },
        destroyAll:function(){
github linb / CrossUI / xui2.0 / xui / js / UI / ComboInput.js View on Github external
setPopWnd:function(drop){
            if(this.isDestroyed())return ;
            var profile=this.get(0);
            profile.$poplink=drop?drop['xui.Module']?drop.getRoot(true):drop['xui.UI']?drop.get(0):drop:null;
            (profile.$poplink.$beforeDestroy=(profile.$poplink.$beforeDestroy||{}))["$poplink_to"]=function(){
                delete profile.$poplink;
            };
            (profile.$beforeDestroy=(profile.$beforeDestroy||{}))["$poplink"]=function(){
                if(profile.$poplink){
                    xui.filter(profile.box.$drop,function(o){
                        return o!==profile.$poplink;
                    });
                    profile.$poplink.boxing().destroy();
                    profile.$poplink=null;
                }
            };
        },
        _cache:function(type, focus){
github linb / CrossUI / xui / js / Module.js View on Github external
var fun = function(m){
                if(m["xui.Module"]){
                    xui.arr.each(m._nodes,function(o){
                        if(o["xui.Module"])fun(o);
                        else nodes.push(o);
                    });
                }
            };
            fun(this);
github linb / CrossUI / xui2.0 / xui / js / UI / Input.js View on Github external
return this.each(function(prf){
                var prop=prf.properties, ID='triggerExcelFormulas:';
                if(prop.excelCellId){
                    if(prf.host && prf.host['xui.Module']){
                        ID=ID+prf.host.xid;
                        if(refreshAll===false){
                            if(!xui.resetRun.exists(ID))
                                 if(prf && prf.host)prf.host.triggerExcelFormulas(prf);
                        }else
                            xui.resetRun(ID,function(){
                                if(prf && prf.host)prf.host.triggerExcelFormulas(null);
                            });
                    }
               }
            });
        },
github linb / CrossUI / xui2.0 / xui / js / Module.js View on Github external
var fun = function(m){
                    if(m["xui.Module"]){
                        xui.each(m._ctrlpool,function(o){
                            if(o["xui.Module"])fun(o);
                            else nodes.push(o);
                        });
                    }
                };
            fun(this);