⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.js

📁 国内开发的javascript框架应用。龙博javascript。
💻 JS
📖 第 1 页 / 共 5 页
字号:
Class("linb.Profile","linb.absProfile",{Constructor:function(host,key,alias,box,properties,events,options){arguments.callee.upper.apply(this,arguments);var self=this;_.merge(self,options);self.key=key||self.key||"";self.alias=alias||self.alias||"",self.properties=properties||self.properties||{};self.events=events||self.events||{};self.host=host||self.host||self;self.box=box||self.box||self.constructor;if(self.events){self.setEvents(self.events);delete self.events}self._links={}},Instance:{setEvents:function(events){var evs=this.box.$EventHandlers;return _.merge(this,events,"all",function(o,i){return evs[i]})},getEvents:function(){var self=this,t,hash={};_.each(self.box.$EventHandlers,function(o,i){if(self[i]){hash[i]=self[i]}});return hash},_applySetAction:function(fun,value){return fun.call(this,value)},__gc:function(){this.unLinkAll();_.tryF(this.clearCache,[],this);var o=_.get(this,["box","_namePool"]);if(o){delete o[self.alias]}_.breakO(this)},boxing:function(){var self=this,t;if(!((t=self.object)&&t._nodes[0]==self&&t._nodes.length==1)){t=self.object=self.box.pack([self],false)}return t},serialize:function(rtnString,keepHost){var t,self=this,o=(t=self.box._beforeSerialized)?t(self):self,r={alias:o.alias,key:o.key,host:o.host};if(r.host===self){delete r.host}else{if(o.host&&!keepHost){if(rtnString!==false){r.host="@this"}else{delete r.host}}}var c={},p=o.box.$DataStruct,map=linb.absObj.$specialChars;_.merge(c,o.properties,function(o,i){return(i in p)&&p[i]!==o&&!map[i.charAt(0)]});if(!_.isEmpty(c)){r.properties=c}if(!_.isEmpty(t=this.getEvents())){r.events=t}var eh=o.box.$EventHandlers;_.filter(r.events,function(o,i){return o!=eh[i]});if(_.isEmpty(r.events)){delete r.events}return rtnString===false?r:_.serialize(r)}}});Class("linb.absObj","linb.absBox",{Constructor:function(){arguments.callee.upper.apply(this,arguments);if(arguments[0]!==false&&typeof this._ini=="function"){return this._ini.apply(this,arguments)}},Before:function(key,parent_key,o){linb.absBox.$type[key]=key;return true},After:function(){var self=this,me=arguments.callee,temp,t,k,u,m,i,j,l,v,n,b;self._nameId=0;self._namePool={};self._nameTag=(t=self.KEY.split("."))[t.length-1].toLowerCase();self._cache=[];if(self===linb.absObj||self===linb.absObj){return }m=me.a1||(me.a1=_.toArr("$Keys,$DataStruct,$EventHandlers,$DataModel"));for(j=0;v=m[j++];){k={};if((t=self.$parent)&&(i=t.length)){while(i--){_.merge(k,t[i][v])}}self[v]=k}self.setDataModel(self.DataModel);delete self.DataModel;self.setEventHandlers(self.EventHandlers);delete self.EventHandlers;m=me.a5||(me.a5=_.toArr("RenderTrigger,LayoutTrigger"));for(j=0;v=m[j++];){temp=[];if((t=self.$parent)&&(l=t.length)){for(i=0;i<l;i++){u=t[i];if(u=u["$"+v]){temp.push.apply(temp,u)}}}if(self[v]){temp.push(self[v])}self["$"+v]=temp;delete self[v]}},Static:{$abstract:true,$specialChars:{_:1,$:1},getAll:function(){return this.pack(this._cache)},pickAlias:function(){var t,p=this._namePool,a=this._nameTag;while(p[t=(a+(++this._nameId))]){}return t},setDataModel:function(hash){var self=this,sc=linb.absObj.$specialChars,ds=self.$DataStruct,properties=self.$DataModel,ps=self.prototype,i,j,t,o,n,m,r;for(i in hash){if(!properties[i]){properties[i]={}}o=hash[i];if(null===o||undefined===o){r=_.str.initial(i);delete ds[i];delete properties[i];delete ps["get"+r];delete ps["set"+r]}else{t=typeof o;if(t!="object"||o.constructor!=Object){o={ini:o}}ds[i]=("ini" in o)?o.ini:(i in ds)?ds[i]:"";t=properties[i];for(j in t){if(!(j in o)){o[j]=t[j]}}properties[i]=o}}_.each(hash,function(o,i){if(null===o||undefined===o||sc[i.charAt(0)]){return }r=_.str.initial(i);n="set"+r;if(!(o&&(o.readonly||o.inner))){t=o.set;m=ps[n];ps[n]=typeof t=="function"?Class._fun(t,n,self.KEY):typeof m=="function"?m:Class._fun(function(value,flag){return this.each(function(v){if(!v.properties){return }if(v.properties[i]===value&&!flag){return }var ovalue=v.properties[i],m=_.get(v.box.$DataModel,[i,"action"]);v.properties[i]=value;if(typeof m=="function"&&v._applySetAction(m,value,ovalue)===false){v.properties[i]=ovalue}})},n,self.KEY);delete o.set;if(ps[n]!==m){ps[n].$auto$=1}}else{delete ps[n]}n="get"+r;if(!(o&&o.inner)){t=o.get;m=ps[n];ps[n]=typeof t=="function"?Class._fun(t,n,self.KEY):typeof m=="function"?m:Class._fun(function(){return this.get(0).properties[i]},n,self.KEY);delete o.get;if(ps[n]!==m){ps[n].$auto$=1}}else{delete ps[n]}});return self},setEventHandlers:function(hash){var self=this;_.each(hash,function(o,i){if(null===o){delete self.$EventHandlers[i];delete self.prototype[i]}else{self.$EventHandlers[i]=o;var f=function(fun){var l=arguments.length;if(l==1&&(typeof fun=="function"||typeof fun=="string")){return this.each(function(v){if(v.domNode){v.clearCache()}v[i]=fun})}else{if(l==1&&null===fun){return this.each(function(v){v.clearCache();delete v[i]})}else{var args=[],v=this.get(0),t=v[i],k=v.host||v,j;if(v.$ignore){return }if(arguments[0]!=v){args[0]=v}for(j=0;j<l;j++){args[args.length]=arguments[j]}v.$lastEvent=i;if(typeof t=="string"){t=k[t]}if(typeof t=="function"){return _.tryF(t,args,k)}}}};f.$event$=1;f.$original$=o.$original$||self.KEY;self.plugIn(i,f)}});return self}},Instance:{alias:function(str){var self=this,pro=this.get(0),old;if(str){if(old=pro.alias){if(pro.host){try{delete pro.host[old]}catch(e){pro.host[old]=undefined}}delete self.constructor._namePool[old]}self.constructor._namePool[pro.alias=str]=1;if(pro.host){pro.host[str]=self}return self}else{return pro.alias}},host:function(value,alias){var self=this;if(value){self.get(0).host=value;if(alias){self.alias(alias);value[alias]=self}return self}else{return self.get(0).host}}}});Class("linb.DataBinder","linb.absObj",{Instance:{_ini:function(properties,events,host){var self=this,c=self.constructor,profile,options,np=c._namePool,alias;if(properties&&properties["linb.Profile"]){profile=properties;alias=profile.alias||c.pickAlias()}else{if(properties&&properties.key&&linb.absBox.$type[properties.key]){options=properties;properties=null;alias=options.alias;alias=(alias&&!np[alias])?alias:c.pickAlias()}else{alias=c.pickAlias()}profile=new linb.Profile(host,self.$key,alias,c,properties,events,options)}np[alias]=1;profile._n=profile._n||[];profile.link(c._cache,"self").link(linb._pool,"linb");self._nodes.push(profile);return self},destroy:function(){this.each(function(profile){var box=profile.box,name=profile.properties.name;_.arr.each(profile._n,function(v){box._unBind(name,v)});delete box._pool[name];profile.__gc()})},resetValue:function(hash){return this.each(function(o,i){_.arr.each(o._n,function(profile){var p=profile.properties;profile.boxing().resetValue((hash&&p.dataField in hash)?hash[p.dataField]:"")})})},getUI:function(){return linb.UI.pack(this.get(0)._n,false)},checkValid:function(){return linb.absValue.pack(this.get(0)._n,false).checkValid()},getValue:function(){var o=this.get(0);if(this.checkValid()){var hash={};_.arr.each(o._n,function(profile){var p=profile.properties,b=profile.boxing(),v;if(profile.domNode){b.updateValue()}v=b.getValue();hash[p.dataField]=v});return hash}else{return null}},host:function(value,alias){var self=this;if(value&&alias){self.setName(alias)}return arguments.callee.upper.apply(self,arguments)}},Static:{_pool:{},destroyAll:function(){this.pack(this._pool,false).destroy();this._pool={}},getFromName:function(name){var o=this._pool[name];return o&&o.boxing()},_bind:function(name,pro){var o=this._pool[name];if(!o){o=new linb.DataBinder();o.setName(name);o=o.get(0)}if(pro&&_.arr.indexOf(o._n,pro)==-1){pro.link(o._n,"databinder."+name)}},_unBind:function(name,pro){if(this._pool[name]){pro.unLink("databinder."+name)}},DataModel:{name:{set:function(value){var o=this.get(0),ov=o.properties.name;if(ov!==value){var c=linb.DataBinder,_p=c._pool,to=_p[ov],t=_p[value];if(to&&t){throw new Error(value+" exists!")}_p[o.properties.name=value]=o;if(to&&!t){linb.absValue.pack(o._n).setDataBinder(value);_.arr.each(o._n,function(v){c._unBind(ov,v)})}if(t&&!to){o._n=t._n}if(to){delete _p[ov]}}return this}}}}});Class("linb.UIProfile","linb.Profile",{Instance:{rendered:false,_render:function(){var self=this,t,ele=linb.Dom.byId(self.domId);if(!ele){return }self.root=linb([self.domNode=ele]);linb.cache.dom[self.domId]=linb.cache.dom[self.$domId]=self;if(t=self.RenderTrigger){for(var i=0,l=t.length;i<l;i++){t[i].call(self)}delete self.RenderTrigger;self.rendered=true;if(self.onRender){self.boxing().onRender(self)}}if(arguments[0]===true&&(t=self.LayoutTrigger)){for(var i=0,l=t.length;i<l;i++){t[i].call(self)}if(self.onLayout){self.boxing().onLayout(self)}}if(self.children){for(var i=0,v;v=self.children[i++];){v[0]._render(true)}}if(self.$attached){for(var i=0,v;v=self.$attached[i++];){if(v["linb.UIProfile"]){v._render(true)}}delete self.$attached}},__gc:function(){var self=this,t;if(self.onDestroy){self.boxing().onDestroy()}if(self.destroyTrigger){self.destroyTrigger()}if(!self.serialId){return }self.clearCache();if(t=self.$dockParent){if(t=self.constructor.getFromDom(t)){_.tryF(t.clearCache,[],t)}}if(self.nodeVars&&(t=self.domNode)){for(var i in self.nodeVars){t[i]=null}}if(!self.$exID){t=linb.cache.domId;(t[self.key]||(t[self.key]=[])).push(self.serialId)}else{delete self.$exID}delete linb.cache.dom[self.domId];delete linb.cache.dom[self.$domId];delete self.box._namePool[self.alias];self.unLinkAll();_.tryF(self.$ondestory);_.breakO(self)},unlinkParent:function(){var profile=this;delete profile.parent;delete profile.childrenId;profile.unLink("$parent");return profile},getRootNode:function(){return this.domNode||(this.domNode=document.getElementById(this.domId))},getRoot:function(){return this.root||null},linkParent:function(parentProfile,linkId){var profile=this;profile.unlinkParent();profile.parent=parentProfile;profile.childrenId=linkId;profile.link(parentProfile.children,"$parent",[profile,linkId]);return profile},_reg:/^\w[\w_-]*$/,setDomId:function(id){var t=this,c=linb.cache.dom,reg=t._reg;if(typeof id=="string"&&(reg.test(id)||id==t.$domId)&&!linb.Dom.byId(id)){if(t.domId!=t.$domId){delete c[t.domId]}t.domId=id;if(t.domNode){t.domNode.id=id}if(c[t.$domId]){c[id]=t}}return t},getDomId:function(){return this.domId},clearCache:function(){var ns=this,a="$_egetter",b="$_domid",t=ns[a];for(var i in t){t[i].length=0}t=ns[b];for(var i in t){t[i]=null}ns[a]=ns[b]=null;return ns},_getEV:function(funs,id,name){var self=this,$k=id+"+"+name,g=self.$_egetter||(self.$_egetter={}),cache;if(g[$k]){Array.prototype.push.apply(funs,g[$k]);return }else{cache=g[$k]=[]}var dom=linb.cache.dom,t,key;if((t=dom[id])&&(t=t.events)&&(t=t[name])){for(var i=0,l=t.length;i<l;i++){if(typeof t[t[i]]=="function"){cache.push(funs[funs.length]=t[t[i]])}}}key=id.split(":")[0].split("-")[1];if(typeof (((t=self._CB)&&(key?(t=t[key]):1))&&(t=t[name]))=="function"){cache.push(funs[funs.length]=t)}else{if(typeof (((t=self.CB)&&(key?(t=t[key]):1))&&(t=t[name]))=="function"){cache.push(funs[funs.length]=t)}else{if(typeof (((t=self.behavior)&&(key?(t=t[key]):1))&&(t=t[name]))=="function"){cache.push(funs[funs.length]=t)}}}},toHtml:function(){var self=this,me=arguments.callee,reg=me._reg||(me._reg=/<!--([^>^\s]*)-->/g),c=self.box,h={},str,k1="linb.UIProfile",k2="linb.Profile",id,i,o,m,a,b,data;data=c._prepareData(self);if(c._dynamicTemplate){c._dynamicTemplate(self)}str=c._build(self,data);if(m=c._getChildren(self)){for(i=0;o=m[i++];){if(o[0][k1]){id=o[1]||"";a=h[id]||(h[id]=[]);a[a.length]=o[0].toHtml()}else{if(!o[0][k2]){b.ini.call(b,o[0]);o[0]=b.get(0)}}}}return str.replace(reg,function(a,b){return h[b]?h[b].join(""):""})},buildItems:function(key,items){var self=this,box=self.box,str,reg=self.toHtml._reg;str=box._rpt(self,linb.UI.$doTemplate(self,_.get(linb.cache.template,[box.KEY,self._hash]),items,key));return str.replace(reg,"")},serialize:function(rtnString,keepHost){var t,m,self=this,o=(t=self.box._beforeSerialized)?t(self):self,r={alias:o.alias,key:o.key,host:o.host};if(r.host===self){delete r.host}else{if(o.host&&!keepHost){if(rtnString!==false){r.host="@this"}else{delete r.host}}}if(o.$domId!=o.domId){r.domId=o.domId}var c={},p=o.box.$DataStruct,map=linb.absObj.$specialChars;_.merge(c,o.properties,function(o,i){return(i in p)&&p[i]!==o&&!map[i.charAt(0)]});if(!_.isEmpty(c)){r.properties=c}if(!_.isEmpty(t=this.getEvents())){r.events=t}var eh=o.box.$EventHandlers;_.filter(r.events,function(o,i){return o!=eh[i]});if(_.isEmpty(r.events)){delete r.events}if(!_.isEmpty(o.CS)){r.CS=_.copy(o.CS)}if(!_.isEmpty(o.CB)){r.CB=_.copy(o.CB)}if(!_.isEmpty(o.CC)){r.CC=_.copy(o.CC)}if(!_.isEmpty(o.CF)){r.CF=_.copy(o.CF)}if(o.children&&o.children.length){o.children.sort(function(x,y){x=parseInt(x[0].properties.tabindex);y=parseInt(y[0].properties.tabindex);return x>y?1:x==y?0:-1});t=r.children=[];_.arr.each(o.children,function(v){m=[v[0].serialize(false,keepHost)];if(v[1]){m[1]=v[1]}t[t.length]=m})}return rtnString===false?r:_.serialize(r)},_applySetAction:function(fun,value,ovalue){if(this.domNode){return fun.call(this,value,ovalue)}},getKey:function(id){var t;if(id.indexOf(":")==-1){id=(t=linb.cache.dom[id])&&(t.$domId)}return id?id.split(":")[0]:""},getSubId:function(id){var t;if(id.indexOf(":")==-1){id=(t=linb.cache.dom[id])&&(t.$domId)}return id?id.split(":")[2]:""},pickSubId:function(key){var self=this,r,o=self.cache_subid||(self.cache_subid={});if((o[key]||(o[key]=[]))[0]){return o[key].shift()}o=self.subId||(self.subId={});r=(o[key]||(o[key]=new _.id)).next();return r},reclaimSubId:function(id,key){var o=this.cache_subid||(this.cache_subid={});(o[key]||(o[key]=[])).push(id)},getClass:function(key,tag){key=this.keys[key]||key;var self=this,me=arguments.callee,map=me._map||(me._map={}),reg=me._reg||(me._reg=/\./g),hash=key+":"+tag;return map[hash]||(map[hash]=key.replace(reg,"-").toLowerCase().replace("linb-ui","linb")+(tag||""))},_getSubNodeId:function(key,subId){var arr=this.$domId.split(":");arr[0]=key;arr[2]=subId||"";key=arr.join(":");if(key==this.$domId){return linb.cache.dom[key].domId}else{return key}},getSubNode:function(key,subId){var self=this;key=self.keys[key]||key;var r,t,s,h=self.$_domid||(self.$_domid={});if(subId===true){r=linb([self.domNode]).query("*","id",key==self.keys.KEY?self.domId:new RegExp("^"+key+":"+self.serialId))}else{if(!subId&&h[key]&&h[key]._nodes.length==1){return h[key]}r=(t=linb.Dom.byId(s=self._getSubNodeId(key,subId)))?linb([t]):((t=self.domNode)&&linb([t]).query("*","id",s));if(!subId){h[key]=r}}return r},getSubNodes:function(arr,subId){var i=0,a=[],o;for(;o=arr[i++];){Array.prototype.push.apply(a,this.getSubNode(o,subId).get())}return linb(a)},getSubNodeByItemId:function(key,itemId){return(itemId=this.getSubIdByItemId(itemId))?this.getSubNode(key,itemId):linb()},getItemByItemId:function(itemId){var t;if((t=this.ItemIdMapSubSerialId)&&(t=t[itemId])){return this.SubSerialIdMapItem[t]}},getItemByDom:function(src){return this.SubSerialIdMapItem&&this.SubSerialIdMapItem[this.getSubId(src.id||src)]},getItemIdByDom:function(src){var t;return(t=this.getItemByDom(src))&&t.id},getSubIdByItemId:function(itemId){var t;return(t=this.ItemIdMapSubSerialId)&&t[itemId]},queryItems:function(items,fun,deep,single,flag){var r=[],me=arguments.callee,f=me.f||(me.f=function(items,fun,deep,single,r){_.arr.each(items,function(o,i){if(fun===true||fun.call(null,o,i,items)){r.push(flag?[o,i,items]:o);if(single){return false}}if(deep&&o.sub&&o.sub.length){f(o.sub,fun,deep,single,r)}})});f(items,fun,deep,single,r);return r}},Static:{getFromDom:function(id){if((id=typeof id=="string"?id:(id&&id.id))&&(id=linb.Event._getProfile(id))&&id["linb.UIProfile"]){return id}}}});Class("linb.UI","linb.absObj",{Before:function(key,parent_key,o){linb.absBox.$type[key.replace("linb.UI.","").replace("linb.","")]=linb.absBox.$type[key]=key;return true},After:function(){linb.absObj.After.apply(this,arguments);var self=this,me=arguments.callee,temp,t,k,u,c,i,j,e,w,v,b,d;self._ctrlId=new _.id();self._idCache=[];self.$cssKeys={};t=self.$Keys;t.KEY=t.$key=self.KEY;self.addTemplateKeys(_.toArr(t,true));v="$Behaviors";k={};if((t=self.$parent)&&(e=t.length)){while(e--){b=t[e][v];for(i in b){if(typeof b[i]=="object"){if(_.isArr(b[i])){u=k[i]||(k[i]=[]);u.push.apply(u,b[i])}else{u=k[i]||(k[i]={});_.merge(u,b[i])}}else{k[i]=b[i]}}}}self[v]=k;v="$Templates";k={};if((t=self.$parent)&&(e=t[0])){for(i in e[v]){if(i.charAt(0)!="$"){k[i]=e[v][i]}}}self[v]=_.clone(k);v="$Appearances";k={};if((t=self.$parent)&&(e=t.length)){while(e--){b=t[e];for(i in b[v]){t=b[v][i];u=k[i]||(k[i]={});_.merge(u,t)}}}self[v]=k;self.setTemplate(self.Templates);delete self.Templates;self.setBehavior(self.Behaviors);delete self.Behaviors;self.setAppearance(self.Appearances);delete self.Appearances;if(t=self.PublicAppearance){linb.UI.$cache_css+=self.buildCSSText(t);delete self.PublicAppearance}},Instance:{destroy:function(){this.each(function(o){if(o.beforeDestroy&&false===o.boxing().beforeDestroy()){return }if(o.root){o.root.remove()}else{o.__gc()}})},serialize:function(rtnString,keepHost){var a=[];this.each(function(o){a[a.length]=o.serialize(false,keepHost)});return rtnString===false?a:a.length==1?" new "+a[0].key+"("+_.serialize(a[0])+")":"linb.UI.unserialize("+_.serialize(a)+")"},_toDomElems:function(){this.render();var t,arr=[];_.arr.each(this._nodes,function(o){if(t=o.domNode){arr.push(t)}});return arr},_ini:function(properties,events,host,CS,CC,CB,CF){var self=this,c=self.constructor,profile,t="default",options,np=c._namePool,alias,temp;if(properties&&properties["linb.Profile"]){profile=properties;alias=profile.alias||c.pickAlias();linb.UIProfile.apply(profile,[host,self.$key,alias,c,null,events])}else{if(properties&&properties.key&&linb.absBox.$type[properties.key]){options=properties;properties=null;alias=options.alias;alias=(alias&&!np[alias])?alias:c.pickAlias()}else{alias=c.pickAlias()}profile=new linb.UIProfile(host,self.$key,alias,c,properties,events,options)}np[alias]=1;for(var i in (temp=c.$DataStruct)){if(!(i in profile.properties)){profile.properties[i]=typeof temp[i]=="object"?_.copy(temp[i]):temp[i]}}profile.keys=c.$Keys;profile.CS=CS||profile.CS||{};profile.CB=CB||profile.CB||{};profile.CC=CC||profile.CC||{};profile.CF=CF||profile.CF||{};profile.template=c.getTemplate();profile.behavior=c.$Behaviors;if(!profile.serialId){profile.serialId=c._pickSerialId()}profile.$domId=profile.key+":"+profile.serialId+":";profile.domId=profile.domId||profile.$domId;profile.RenderTrigger=_.copy(c.$RenderTrigger);profile.LayoutTrigger=_.copy(c.$LayoutTrigger);profile.nodeVars=profile.behavior?profile.behavior.$eventhandler:null;profile.link(linb.UI._cache,"UI").link(c._cache,"self").link(linb._pool,"linb");temp=profile.children;profile.children=[];if(temp&&temp.length){for(var i=0,v;v=temp[i++];){if(!v[0]["linb.UIProfile"]){v[0]=new (linb.SC(v[0].key))(v[0]).get(0)}v[0].linkParent(profile,v[1])}}self._nodes.push(profile);return self},busy:function(message,html,key){message=typeof message=="string"?message:"Loading...";html=typeof html=="string"?html:'<span style="background:'+linb.UI.$bg("busy.gif","no-repeat left center")("linb.UI.Public")+';padding-left:16px;">'+message+"</span>";return this.each(function(profile){_.resetRun(profile.$id+":busy",function(){var keys=profile.keys;key=keys[key]||keys.BORDER||keys.PANEL||keys.KEY;var parentNode=profile.getSubNode(key),size=parentNode.cssSize(),node;if(!(node=profile.$busy)){node=profile.$busy=linb.create('<div style="left:0;top:0;z-index:10;position:absolute;background-color:#DDD;"></div><div style="left:0;top:0;z-index:20;text-align:center;position:absolute;"><div>'+html+"</div></div>");linb([node.get(0)]).css({opacity:0.5});linb(parentNode).append(node)}node.css({display:"",width:size.width+"px",height:size.height+"px"});linb([node.get(1).firstChild]).html(html,false).css("paddingTop",size.height/2+"px")},50)})},free:function(){return this.each(function(profile){_.resetRun(profile.$id+":busy");if(profile.$busy){profile.$busy.css("display","none")}})},reLayout:function(syn,force){return this.each(function(o){if(!o.domNode){return }var p=o.properties;if((!o.$noB)&&p.border&&o.boxing()._border){o.boxing()._border(null,false)}if(p.dock&&p.dock!="none"){var stl=o.domNode.style;stl.width=stl.height=0;linb.UI.$dock(o,true,true)}else{linb.UI.$tryResize(o,p.width,p.height,syn,force)}})},toHtml:function(){var a=[];_.arr.each(this._nodes,function(o){a[a.length]=o.toHtml()});return a.join("")},render:function(triggerLayOut){var self=this,arr=[],i,l,o,t,m,div,matix,n=self._nodes,a=[],byId=linb.Dom.byId;linb.UI.$applyCSS();for(i=0;o=n[i++];){if(!byId(o.domId)){arr[arr.length]=o}}if(l=arr.length){for(i=0;i<l;i++){a[a.length]=arr[i].toHtml()}m=_.str.toDom(a.join(""));m=m.get();l=m.length;matix=linb.Dom.getEmptyDiv().get(0);t=document.createDocumentFragment?document.createDocumentFragment():matix;for(i=0;i<l;i++){t.appendChild(m[i])}if(t!=matix){matix.appendChild(t)}}for(i=0;o=n[i++];){o._render(triggerLayOut)}return self},renderOnto:function(node,host){node=linb(node);if(node.isEmpty()){return this}var self=this,pro=self.get(0),me=arguments.callee,para=me.para||(me.para=function(node){var r=node.cssRegion();r.tabindex=node.attr("tabIndex");r.zIndex=node.css("zIndex");r.position=node.css("position");return r});_.merge(pro.properties,para(node),"all");node.outerHTML(pro.toHtml());pro.boxing().host(host||window,node.get(0).id||pro.alias);pro._render(true);return self},setDomId:function(id){this.get(0).setDomId(id);return this},hide:function(){return this.each(function(o){if(o.domNode){o.root.hide();o.properties.top=o.properties.left=-10000;o.properties.dockIgnore=true}})},show:function(parent,subId,left,top){return this.each(function(o){var t=o.properties,b;left=(left||left===0)?(parseInt(left)||0):null;top=(top||top===0)?(parseInt(top)||0):null;if(left!==null){t.left=left}if(top!==null){t.top=top}if(o.domNode&&o.domNode._linbhide){b=1;t.dockIgnore=false;o.root.show(left&&(left+"px"),top&&(top+"px"));if(t.dock&&t.dock!="none"){linb.UI.$dock(o,false,true)}}else{if(!parent&&(!o.domNode||(o.domNode.id||"").indexOf(linb.Dom._matrixid)===0)){parent=linb("body")}}var p=parent,n;if(p){if(p["linb.UIProfile"]){n=p.domNode;p=p.boxing()}else{if(p["linb.UI"]){n=(n=p._nodes[0])&&n.domNode}else{n=(p=linb(p))&&p._nodes[0]}}if(n){p.append(o.boxing(),subId);if(!b){o.root.show(left&&(left+"px"),top&&(top+"px"))}}}})},clone:function(){var arr=[],f=function(p){delete p.alias;delete p.domId;if(p.children){for(var i=0,c;c=p.children[i];i++){f(c)}}};this.each(function(o){o=o.serialize(false,true);f(o);arr.push(o)});return this.constructor.unserialize(arr)},refreshDom:function(){(function(arr){var me=arguments.callee;_.arr.each(arr,function(o){if(_.isArr(o)){o=o[0]}o.clearCache();if(o.children&&o.children.length){me(o.children)}})})(this._nodes);return this.each(function(o){if(o.domNode){var root=o.getRoot(),size=root.cssSize();root.outerHTML(o.toHtml());linb.UI.$tryResize(o,size.width,size.height,true,true)}})},refresh:function(){var para,b,p,s,$id,serialId,fun,box,children;return this.each(function(o){if(!o.domNode){return }box=o.box;$id=o.$id;serialId=o.serialId;if(b=!!o.parent){p=o.parent.boxing();para=o.childrenId}else{p=o.root.parent()}var replace=linb.create("span");o.root.replace(replace,true);children=_.copy(o.children);o.children.length=0;_.arr.each(children,function(o){delete o[0].$dockParent;replace.append(o[0].root)});s=o.serialize(false,true);fun=o.$addOns;o.$exID=1;o.boxing().destroy();linb.Dom.__gc();_.merge(o,s,"all");o.$id=$id;o.serialId=serialId;o=new box(o).render();if(fun){fun.call(fun.target,o.get(0))}replace.empty(false);replace.replace(o.get(0).root);if(b){p.append(o,para)}else{p.append(o)}_.arr.each(children,function(v){o.append.apply(o,v)});replace.remove()})},append:function(target,subId){if(target["linb.UIProfile"]){target=target.boxing()}var pro=this.get(0),parentNode;if(subId!==false){target.each(function(profile){profile.linkParent(pro,subId)})}if(pro.domNode){if(subId=typeof subId=="string"?subId:null){subId=pro.getSubIdByItemId(subId)}parentNode=pro.keys.PANEL?pro.getSubNode(pro.keys.PANEL,subId):pro.root;if(!parentNode.isEmpty()){parentNode.append(target)}}return this},getChildren:function(subId){var a=[];_.arr.each(this.get(0).children,function(v){if(subId?v[1]==subId:1){a.push(v[0])}});return linb.UI.pack(a)},removeChildren:function(subId){return this.each(function(o){_.arr.each(o.children,function(v){if(subId?v[1]==subId:1){v[0].unlinkParent()}if(v[0].root){v[0].root.remove()}else{v[0].__gc()}})})},dragable:function(dragKey,dragData,key){return this.each(function(o){o.getSubNode(o.keys[key]||"KEY",true).beforeMousedown(dragKey?function(pro,e,src){if(pro.properties.disabled){return }linb([src]).startDrag(e,{dragKey:dragKey,dragData:typeof dragData=="function"?dragData():dragData,dragCursor:"pointer",dragType:"icon",dragDefer:1})}:null,"_d",-1).beforeDragbegin(dragKey?function(profile,e,src){linb([src]).onMouseout(true,{$force:true}).onMouseup(true)}:null,"_d",-1);if(!dragKey){o.clearCache()}})},setCustomFunction:function(key,value){return this.each(function(o){if(typeof key=="string"){if(value){o.CF[key]=value}else{delete o.CF[key]}}else{o.CF=key||{}}})},setCustomClass:function(key,value){var me=arguments.callee,fun=(me.fun||(me.fun=function(pro,i,h,flag){if(!h[i]){return }var node=pro.getSubNode(i,true),b;if(!node.isEmpty()){_.arr.each(h[i].split(/\s+/),function(o){node[flag?"removeClass":"addClass"](o)})}}));return this.each(function(o){var bak=_.copy(o.CC);if(typeof key=="string"){if(o.domNode){if(key in bak){fun(o,key,bak,true)}}if(!value){delete o.CC[key]}else{o.CC[key]=value;if(o.domNode){fun(o,key,o.CC)}}}else{if(!!key&&typeof key=="object"){if(o.domNode){for(var i in key){fun(o,i,bak,true)}for(var i in key){fun(o,i,key)}}o.CC=key}else{if(o.domNode){for(var i in bak){fun(o,i,bak,true)}}o.CC={}}}})},setCustomStyle:function(key,value){var me=arguments.callee,fun=(me.fun||(me.fun=function(pro,i,h,flag){if(!h[i]){return }var node=pro.getSubNode(i,true),b;if(!node.isEmpty()){_.arr.each(h[i].split(";"),function(o,i){if((b=o.split(":")).length==2){b[0]=b[0].replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});try{node.css(b[0],flag?"":b[1])}catch(e){}}})}}));return this.each(function(o){var bak=_.copy(o.CS);if(typeof key=="string"){if(o.domNode){if(key in bak){fun(o,key,bak,true)}}if(!value){delete o.CS[key]}else{o.CS[key]=value;if(o.domNode){fun(o,key,o.CS)}}}else{if(!!key&&typeof key=="object"){if(o.domNode){for(var i in key){fun(o,i,bak,true)}for(var i in key){fun(o,i,key)}}o.CS=key}else{if(o.domNode){for(var i in bak){fun(o,i,bak,true)}}o.CS={}}}})},setCustomBehavior:function(key,value){return this.each(function(o){if(typeof key=="string"){if(o.keys[key]){o.CB[key]=value||{}}}else{o.CB=key||{}}if(o.CB.KEY){_.merge(o.CB,o.CB.KEY,"all");delete o.CB.KEY}o.clearCache()})}},Initialize:function(){var ns=this.prototype;_.arr.each("getSubNode,getDomId,getRootNode,getRoot".split(","),function(o){if(!ns[o]){ns[o]=function(){var p=this.get(0);return p[o].apply(p,arguments)}}ns[o].$original$="linb.UI"});var self=this,hash={};_.each(linb.UI.$ps,function(i,o){hash[o]={ini:"auto",action:function(value){var self=this,p=self.properties,b=false,args={$type:p.dock};if(self.domNode){switch(p.dock){case"top":if(o!="height"&&o!="top"){return }args.width=args.height=1;break;case"bottom":if(o!="height"&&o!="bottom"){return }args.width=args.height=1;break;case"left":if(o!="width"&&o!="left"){return }args.width=args.height=1;break;case"right":if(o!="width"&&o!="right"){return }args.width=args.height=1;break;case"width":if("width"==o){return }args.width=1;break;case"height":if("height"==o){return }args.height=1;break;case"fill":case"cover":if(o=="width"&&o=="height"){return }args.width=args.height=1;break}self.root[o]?self.root[o](value):linb.Dom._setPxStyle(self.domNode,o,value);if(p.dock!="none"){_.tryF(self.$dock,[self,args],self)}}}}});_.merge(hash,{renderer:{ini:null},zIndex:{ini:1,action:function(value){if(this.domNode){this.root.css("zIndex",value)}}},tabindex:{ini:1},position:{ini:"absolute",listbox:["","static","relative","absolute"],action:function(value){if(this.domNode){this.root.css("position",value)}}},visibility:{listbox:["","visible","hidden"],action:function(value){if(this.domNode){this.root.css("visibility",value)}}},display:{listbox:["","none","block","inline","inline-block"],action:function(value){if(this.domNode){if(value=="inline-block"){this.root.setInlineBlock()}else{this.root.css("display",value)}}}}});self.setDataModel(hash);linb.UI.$cache_css+=linb.UI.buildCSSText({".ui-ctr":{},".ui-dragable":{},".ui-btn, .ui-btni, .ui-btnc":{height:"22px",background:linb.UI.$bg("button.gif","no-repeat",true)},".ui-btn":{$order:1,"white-space":"nowrap","vertical-align":"top",overflow:"hidden","background-position":"right top","padding-right":"4px","font-size":"12px"},".ui-btn *":{cursor:"pointer"},".ui-btnc button, .ui-btnc a":{display:linb.$inlineBlock,zoom:linb.browser.ie?1:null,background:"transparent",border:0,margin:0,padding:0},".ui-btnc a":{padding:"0 4px 1px 4px"},".ui-btni":{$order:1,"background-position":"left -60px","padding-left":"4px","vertical-align":"top"},".ui-btnc":{$order:1,"background-position":"left -30px","background-repeat":"repeat-x","padding-top":"3px","vertical-align":"top"},".ui-btn-mouseover, .ui-btn-focus":{$order:2,"background-position":"right -90px"},".ui-btn-mouseover .ui-btni, .ui-btn-focus .ui-btni":{$order:2,"background-position":"left -150px"},".ui-btn-mouseover .ui-btnc, .ui-btn-focus .ui-btnc":{$order:2,"background-position":"left -120px"},".ui-btn-mousedown, .ui-btn-checked":{$order:3,"background-position":"right -180px"},".ui-btn-mousedown .ui-btni, .ui-btn-checked .ui-btni":{$order:3,"background-position":"left -240px"},".ui-btn-mousedown .ui-btnc, .ui-btn-checked .ui-btnc":{$order:3,"background-position":"left -210px"},".ui-icon":{"vertical-align":"middle",width:"16px",height:"16px",margin:"0 4px 0 2px"},".uicmd-close, .uicmd-opt, .uicmd-land, .uicmd-toggle, .uicmd-toggle2, .uicmd-min, .uicmd-max,.uicmd-restore,.uicmd-pin, .uicmd-check, .uicmd-radio, .uicmd-add":{background:linb.UI.$bg("icons.gif","no-repeat 0 0",true),width:"16px",height:"16px","margin-right":"2px",cursor:"default","vertical-align":"middle"},".uicmd-opt":{$order:1,"background-position":"0 0"},".uicmd-opt-mouseover":{$order:2,"background-position":"0 -20px"},".uicmd-opt-mousedown":{$order:3,"background-position":"0 -40px"},".uicmd-land":{$order:1,"background-position":"-40px 0"},".uicmd-land-mouseover":{$order:2,"background-position":"-40px -20px"},".uicmd-land-mousedown":{$order:3,"background-position":"-40px -40px"},".uicmd-pin":{$order:1,"background-position":"-80px 0"},".uicmd-pin-mouseover":{$order:2,"background-position":"-80px -20px"},".uicmd-pin-mousedown":{$order:3,"background-position":"-80px -40px"},".uicmd-pin-checked, .uicmd-pin-checked-mouseover, .uicmd-pin-checked-mousedown":{$order:4,"background-position":"-80px -40px"},".uicmd-min":{$order:1,"background-position":"-120px 0"},".uicmd-min-mouseover":{$order:2,"background-position":" -120px -20px"},".uicmd-min-mousedown":{$order:3,"background-position":"-120px -40px"},".uicmd-restore":{$order:1,"background-position":"-160px 0"},".uicmd-restore-mouseover":{$order:2,"background-position":"-160px -20px"},".uicmd-restore-mousedown":{$order:3,"background-position":"-160px -40px"},".uicmd-max":{$order:1,"background-position":"-200px 0"},".uicmd-max-mouseover":{$order:2,"background-position":"-200px -20px"},".uicmd-max-mousedown":{$order:3,"background-position":"-200px -40px"},".uicmd-close":{$order:1,"background-position":"-240px 0"},".uicmd-close-mouseover":{$order:2,"background-position":"-240px -20px"},".uicmd-close-mousedown":{$order:3,"background-position":"-240px -40px"},".uicmd-check":{$order:1,margin:"0 4px 0 2px","background-position":"-20px -70px"},".uicmd-check-mouseover":{$order:2,"background-position":"-20px -90px"},".uicmd-check-mousedown":{$order:3,"background-position":"-20px -110px"},".uicmd-check-checked":{$order:4,"background-position":"0 -70px"},".uicmd-check-checked-mouseover":{$order:5,"background-position":"0 -90px"},".uicmd-check-checked-mousedown":{$order:6,"background-position":"0 -110px"},".uicmd-radio":{$order:1,margin:"0 4px 0 2px","background-position":"-60px -70px"},".uicmd-radio-mouseover":{$order:2,"background-position":"-60px -90px"},".uicmd-radio-mousedown":{$order:3,"background-position":"-60px -110px"},".uicmd-radio-checked":{$order:4,"background-position":"-40px -70px"},".uicmd-radio-checked-mouseover":{$order:5,"background-position":"-40px -90px"},".uicmd-radio-checked-mousedown":{$order:6,"background-position":"-40px -110px"},".uicmd-add":{$order:1,"background-position":"-56px -222px"},".uicmd-add-mouseover":{$order:2,"background-position":"-56px -222px"},".uicmd-add-mousedown":{$order:3,"background-position":"-56px -222px"},".uicmd-toggle":{$order:1,"margin-left":"3px","background-position":"-160px -70px"},".uicmd-toggle-mouseover":{$order:2,"background-position":"-160px -90px"},".uicmd-toggle-mousedown":{$order:3,"background-position":"-160px -110px"},".uicmd-toggle-checked":{$order:4,"background-position":"-180px -70px"},".uicmd-toggle-checked-mouseover":{$order:5,"background-position":"-180px -90px"},".uicmd-toggle-checked-mousedown":{$order:6,"background-position":"-180px -110px"},".uicmd-toggle-busy":{$order:7,background:linb.UI.$bg("busy.gif","no-repeat center center",true)},".uicmd-toggle2":{$order:1,"margin-left":"6px","background-position":"-200px -70px"},".uicmd-toggle2-mouseover":{$order:2,"background-position":"-200px -90px"},".uicmd-toggle2-mousedown":{$order:3,"background-position":"-200px -110px"},".uicmd-toggle2-checked":{$order:4,"background-position":"-220px -70px"},".uicmd-toggle2-checked-mouseover":{$order:5,"background-position":"-220px -90px"},".uicmd-toggle2-checked-mousedown":{$order:6,"background-position":"-220px -110px"},".uibar-top, .uibar-bottom, .uibar-top-s, .uibar-bottom-s":{position:"relative","vertical-align":"top","font-size":0,"line-height":0},".uibar-top td, .uibar-top-s td, .uibar-bottom td, .uibar-bottom-s td":{$order:1,background:linb.UI.$bg("bar_vertical.gif","no-repeat 0 0",true)},".uibar-top, .uibar-top .uibar-t":{height:"29px"},".uibar-top .uibar-tdl":{$order:1,"padding-left":"4px",height:"100%","background-position":"0 0"},".uibar-top .uibar-tdm":{$order:1,"background-position":"0 -30px","background-repeat":"repeat-x"},".uibar-top .uibar-tdr":{$order:1,"padding-left":"4px","background-position":"right -60px"},".uibar-top-focus .uibar-tdl":{$order:2,"padding-left":"4px",height:"100%","background-position":"left -90px"},".uibar-top-focus .uibar-tdm":{$order:2,"background-position":"left -120px","background-repeat":"repeat-x"},".uibar-top-focus .uibar-tdr":{$order:2,"padding-left":"4px","background-position":"right -150px"},".uibar-top .uibar-cmdl":{"-moz-user-select":"none",overflow:"hidden",position:"absolute",left:0,top:"4px",width:"92%",height:"22px","padding-left":"8px","white-space":"nowrap"},".uibar-top .uibar-cmdr":{"-moz-user-select":"none",position:"absolute",top:"6px",right:"8px","text-align":"right"},".uicon-main":{position:"relative","padding-left":"5px","font-size":0,"line-height":0,"z-index":1,overflow:"visible",background:linb.UI.$bg("bar_horizontal.gif","repeat-y -595px top",true)},".uicon-maini":{"padding-right":"5px","font-size":0,"line-height":0,background:linb.UI.$bg("container_right.gif","#AAD2FA repeat-y right top",true)},".uibar-bottom, .uibar-bottom .uibar-t":{height:"12px"},".uibar-bottom .uibar-tdl":{$order:1,"padding-left":"5px",height:"100%","background-position":"left -189px"},".uibar-bottom .uibar-tdm":{$order:1,"background-position":"left -211px","background-repeat":"repeat-x"},".uibar-bottom .uibar-tdr":{$order:1,"padding-left":"5px","background-position":"right -233px"},".uibar-top-s, .uibar-top-s .uibar-t":{$order:3,height:"7px"},".uibar-top-s .uibar-tdl":{$order:3,height:"100%","padding-left":"5px","background-position":"left -261px"},".uibar-top-s .uibar-tdm":{$order:3,"background-position":"left -283px","background-repeat":"repeat-x"},".uibar-top-s .uibar-tdr":{$order:3,"padding-left":"5px","background-position":"right -305px"},".uibar-top-s .uibar-cmdl":{$order:3,display:"none"},".uibar-top-s .uibar-cmdr":{$order:3,display:"none"},".uibar-bottom-s, .uibar-bottom-s .uibar-t":{$order:3,height:"6px"},".uibar-bottom-s .uibar-tdl":{$order:3,height:"100%","padding-left":"5px","background-position":"left -327px"},".uibar-bottom-s .uibar-tdm":{$order:3,"background-position":"left -349px","background-repeat":"repeat-x"},".uibar-bottom-s .uibar-tdr":{$order:3,"padding-left":"5px","background-position":"right -371px"}})+linb.UI.buildCSSText({".uiw-shell":{background:"transparent",display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,border:0,padding:0,margin:0},".uiw-frame":{$order:1,display:"block",position:"relative",border:0,padding:0,margin:0,width:"100%",height:"100%","-moz-box-flex":"1"},".uiw-border":{$order:2,display:"block",position:"absolute",border:0,padding:0,margin:0,left:0,top:0,width:"100%",height:"100%"},".ui-dirty":{$order:1,background:linb.UI.$bg("icons.gif","no-repeat",true),"background-position":"-390px -290px"},".ui-disabled, .ui-disabled *":{color:"#808080"},".ui-invalid, .ui-invalid *":{"background-color":"#FFEBCD"},"#linblangkey":{"vertical-align":"baseline"}})+linb.UI.buildCSSText({".uibg-base":{"background-color":"#fff"},".uibg-bar":{"background-color":"#aad2fa"},".uiborder-inset":{border:"solid 1px","border-color":"#648cb4 #c8e1fa #c8e1fa #648cb4"},".uiborder-outset":{border:"solid 1px","border-color":"#c8e1fa #648cb4 #648cb4 #c8e1fa"}})},$End:function(){linb.UI.$cache_css+=this.buildCSSText(this.$Appearances)},Static:{$cache_css:"",$css_tag_dirty:"ui-dirty",$css_tag_invalid:"ui-invalid",$tag_left:"{",$tag_right:"}",$tag_special:"#",$ID:"#id#",$DOMID:"#domid#",$CLS:"#cls#",$tag_subId:"_serialId",$childTag:"<!--{id}-->",$theme:"default",$ps:{left:1,top:1,width:1,height:1,right:1,bottom:1},_getChildren:function(profile){return profile.children},getFromDom:function(id){if(id=linb.UIProfile.getFromDom(id)){return id.boxing()}},unserialize:function(target,keepSerialId){if(typeof target=="string"){target=_.unserialize(str)}var f=function(o){if(_.isArr(o)){o=o[0]}delete o.serialId;if(o.children){_.arr.each(o.children,f)}},a=[];_.arr.each(target,function(o){if(!keepSerialId){f(o)}a.push((new (linb.SC(o.key))(o)).get(0))});return this.pack(a,false)},_ensureValues:function(arr){var a=[],i=0,k=0,o,key=this.KEY,cache=linb.cache.dom;if(arr["linb.absBox"]){arr=arr._nodes}for(;o=arr[i++];){if((o.box&&o.box[key])||((o=cache[o.domNode?o.domNode.id:o.id])&&o.box&&o.box[key])){a[k++]=o}}return a.length<=1?a:this._unique(a)},__gc:function(){var self=this,k=self.$key,cache=linb.cache;_.breakO([cache.template[k],cache.domId[k],self._cache,self._idCache,self.$DataModel,self.$Templates,self.$Behaviors,self],2);delete linb.absBox.$type[k.replace("linb.UI.","")];Class.__gc(k)},_pickSerialId:function(){var arr=linb.cache.domId[this.$key];if(arr&&arr[0]){return arr.pop()}return this._ctrlId.next()},$bg:function(path,para,forceKey){return function(key){var p=linb.ini.path+"appearance/default/"+(typeof forceKey=="string"?forceKey:forceKey?"Public":(p=key.split("."))[p.length-1])+"/"+path;return"url("+p+") "+(para||"")}},$ieBg:function(path,forceKey){return function(key){var p=linb.ini.path+"appearance/default/"+(typeof forceKey=="string"?forceKey:forceKey?"Public":(p=key.split("."))[p.length-1])+"/"+path;return'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+p+'",sizingMethod="crop")'}},$doTemplate:function(profile,template,properties,tag,result){var self=arguments.callee,s,t,n,isA=properties.constructor==Array,temp=template[tag||""],r=!result,result=result||[];if(isA){if(typeof temp!="function"){temp=self}for(var i=0;t=properties[i++];){temp(profile,template,t,tag,result)}}else{if(t=properties.object){result[result.length]=t.toHtml()}else{if(typeof temp=="function"){temp(profile,template,properties,tag,result)}else{tag=tag?tag+".":"";var a0=temp[0],a1=temp[1];for(var i=0,l=a0.length;i<l;i++){if(n=a1[i]){if(n in properties){t=properties[n];if(template[s=tag+n]&&t){self(profile,template,t,s,result)}else{result[result.length]=t}}}else{result[result.length]=a0[i]}}}}}if(r){return result.join("")}},$buildTemplate:function(profile,template,key,obj,arr){if(template&&String(template.tagName).toLowerCase()=="text"){arr[arr.length]=template.text;return }var self=arguments.callee,behavior=profile.behavior?key?profile.behavior[key]:profile.behavior:null,map1=self.map1||(self.map1={tagName:1,text:1}),map2=self.map2||(self.map2={image:1,input:1,br:1,meta:1,hr:1,abbr:1,embed:1}),r2=self.r2||(self.r2=/[a-z]/),r3=self.r3||(self.r3=/^(on|before|after)/),r7=self.r7||(self.r7=/([^{}]*)\{([\w]+)\}([^{}]*)/g),first=false,u=linb.UI,t,o,bak,lkey;if(!template){template=profile.template}lkey=key?profile.keys[key]:profile.key;if(!template.tagName){template.tagName="span"}if(template.id!==null){template.id=key?lkey+":"+u.$ID+":"+u.$tag_left+u.$tag_subId+u.$tag_right:u.$DOMID}else{delete template.id}if(template.className!==null){t=u.$CLS+(key?"-"+key.toLowerCase():"");bak=template.className||"";template["class"]=t+" "+bak+" "+(lkey==profile.key?" ui-ctrl ":"")+u.$tag_special+(key||"KEY")+"_CC"+u.$tag_special}delete template.className;template.style=(template.style||"")+";"+u.$tag_special+(key||"KEY")+"_CS"+u.$tag_special;var a=[],b={},tagName=template.tagName,text=template.text,sc=linb.absObj.$specialChars;for(var i in template){if(!template[i]){continue}if(!sc[i.charAt(0)]&&!map1[i]){o=template[i];if(!r2.test(i)){if(typeof o=="object"){if(!o.$order){o.$order=0}o.$key=i;a[a.length]=o}}else{b[i]=o}}}a.sort(function(x,y){x=x.$order;y=y.$order;return x>y?1:x==y?0:-1});if(!arr){first=true;arr=[]}arr[arr.length]="<"+tagName+" ";for(var i in b){arr[arr.length]=i+'="'+b[i]+'" '}if(template.className!==null){template.className=bak}delete template["class"];if(behavior&&(t=behavior.$eventhandler)){for(var i in t){if(t[i]){arr[arr.length]=i+'="'+t[i]+'" '}}}arr[arr.length]="{attributes}>";if(!map2[tagName]&&text){arr[arr.length]=text}for(var i=0,l=a.length;i<l;){o=a[i++];self(profile,o,o.$key,obj,arr)}if(!map2[tagName]){arr[arr.length]="</"+tagName+">"}if(first){var a0=obj[0],a1=obj[1];arr.join("").replace(r7,function(a,b,c,d){if(b){a0[a0.length]=b}a1[a0.length]=a0[a0.length]=c;if(d){a0[a0.length]=d}return""})}},_rpt:function(profile,temp){var me=arguments.callee,tag=linb.UI.$tag_special,r=me._r||(me._r=new RegExp(tag+"([A-Z0-9]+)_C([SC])"+tag+"|"+tag+"([\\w_\\-\\.]*)"+tag,"img")),h1={id:profile.serialId,cls:profile.getClass("KEY"),domid:profile.domId},h2={S:profile.CS,C:profile.CC};return temp.replace(r,function(a,b,c,d){return h1[d]||h2[c][b]||""})},_build:function(profile,data){var template,t,m,u=linb.UI,temp=[[],[]],self=this,key=self.KEY,cache=linb.cache.template,hash=profile._hash="b:"+(profile.template._subid||"")+";!"+(profile._exhash||"");if(!(template=_.get(cache,[key,hash]))){u.$buildTemplate(profile,null,null,temp);_.set(cache,[key,hash,""],temp);if(t=profile.template.$dynamic){for(var i in t){if(typeof (m=t[i])!="function"){var temp=[[],[]];for(var j in m){if(typeof m[j]=="object"){u.$buildTemplate(profile,m[j],j,temp)}}m=temp}_.set(cache,[key,hash,i],m)}}template=_.get(cache,[key,hash])}if(!template){return""}return self._rpt(profile,u.$doTemplate(profile,template,data))},_setDefaultBehavior:function(hash){var self=this,me=arguments.callee,map=me._m||(me._m={"":1,KEY:1,$key:1}),f=me._f1||(me._f1=function(arr,type,mode){var fun=function(profile,e,src){var t,id=src.id,item,cid=profile.getSubId(id),prop=profile.properties,nodes,funs,box;if(prop.disabled){return }item=profile.SubSerialIdMapItem&&profile.SubSerialIdMapItem[cid];if(item&&item.disabled){return }switch(typeof arr){case"string":nodes=profile.getSubNode(arr,cid).get();break;case"function":funs=[arr];break;case"object":nodes=[];funs=[];for(var o,i=0,l=arr.length;i<l;i++){o=arr[i];if(typeof o=="string"){nodes.push.apply(nodes,profile.getSubNode(o,cid).get())}else{funs.push(o)}}}if(nodes&&nodes.length){nodes=linb(nodes);box=profile.boxing();if(mode==1){if(type=="mouseover"&&profile.beforeHoverEffect){if(false==box.beforeHoverEffect(profile,item,e,src,"mouseover")){return }}if(type=="mousedown"&&profile.beforeClickEffect){if(false==box.beforeClickEffect(profile,item,e,src,"mousedown")){return }}nodes.tagClass("-"+type)}else{if(type=="mouseup"){if(profile.beforeClickEffect&&false==box.beforeClickEffect(profile,item,e,src,"mouseup")){return }nodes.tagClass("-mousedown",false)}else{if(profile.beforeHoverEffect&&false==box.beforeHoverEffect(profile,item,e,src,"mouseout")){return }nodes.tagClass("(-mouseover|-mousedown)",false)}}nodes.length=0}if(funs&&funs.length){_.arr.each(funs,function(o){_.tryF(o,[profile],profile)});funs.length=0}};return fun}),hls={},t;if(!linb.SC.get("linb.absComposed")){Class("linb.absComposed","linb.absObj",{Instance:{addPanel:function(para,children,item){var pro=_.copy(linb.UI.Panel.$DataStruct);_.merge(pro,para,"with");_.merge(pro,{dock:"fill",tag:para.tag||para.id},"all");var pb=new linb.UI.Panel(pro),arr=[];this.append(pb,item&&item.id);_.arr.each(children,function(o){arr.push(o[0])});pb.append(linb.UI.pack(arr,false))},removePanel:function(){this.destroy()},getPanelPara:function(){return _.copy(this.get(0).properties)},getPanelChildren:function(){return this.get(0).children},e1:function(profile,item,e,src,type){},e2:function(profile,key,control,shift,alt,e,src){},e3:function(profile,e,shift,src){},e4:function(profile,e,src,key,data,item){},e5:function(profile,e,src){}},Static:{DataModel:{dragKey:"",dropKeys:""},$abstract:true}})}var src=linb.absComposed.prototype;if(hash.HoverEffected){_.each(hash.HoverEffected,function(o,i){t=map[i]?hash:(hash[i]||(hash[i]={}));if(!o){t.afterMouseover=t.afterMouseout=null}else{t.afterMouseover=f(o,"mouseover",1);t.afterMouseout=f(o,"mouseout",2)}});hls.beforeHoverEffect=src.e1}if(hash.ClickEffected){_.each(hash.ClickEffected,function(o,i){t=map[i]?hash:(hash[i]||(hash[i]={}));if(!o){t.afterMousedown=t.afterMouseup=null}else{t.afterMousedown=f(o,"mousedown",1);t.afterMouseup=f(o,"mouseup",2)}});hls.beforeClickEffect=src.e1}if(hash.KeyHook){_.merge(hash,{afterKeydown:function(profile,e,src){if(profile.onHotKeydown){var key=linb.Event.getKey(e);return false!==profile.boxing().onHotKeydown(profile,key[0],!!key[1],!!key[2],!!key[3],e,src)}},afterKeypress:function(profile,e,src){if(profile.onHotKeypress){var key=linb.Event.getKey(e);return false!==profile.boxing().onHotKeypress(profile,key[0],!!key[1],!!key[2],!!key[3],e,src)}},afterKeyup:function(profile,e,src){if(profile.onHotKeyup){var key=linb.Event.getKey(e);return false!==profile.boxing().onHotKeyup(profile,key[0],!!key[1],!!key[2],!!key[3],e,src)}}},"all");hls.onHotKeydown=hls.onHotKeypress=hls.onHotKeyup=src.e2}if(hash.NavKeys){_.each(hash.NavKeys,function(o,i){var map=arguments.callee,k,m1=map.m1||(map.m1={KEY:1,$key:1});if(m1[i]){return }var m2=map.m2||(map.m2={input:1,textarea:1}),m3=map.m3||(map.m3={tab:1,enter:1,up:1,down:1,left:1,right:1}),m4=map.m4||(map.m4={tab:1,up:1,down:1,left:1,right:1}),t=hash[i]||(hash[i]={});if(null===o){t.afterKeydown=null}else{t.afterKeydown=function(profile,e,src){var k=linb.Event.getKey(e),key=k[0],shift=k[2],alt=k[3],b=false;if(m2[k=src.tagName.toLowerCase()]){if(m3[key]){var reg=linb([src]).caret(),txt=src.value;switch(key){case"up":if(!/[\n\r]/.test(txt.substr(0,reg[0]))){b=true}break;case"left":if(reg[0]===0&&(reg[1]!==txt.length||reg[1]===0)){b=true}break;case"down":if(!/[\n\r]/.test(txt.substr(reg[1],txt.length))){b=true}break;case"right":if(reg[1]===txt.length&&(reg[0]!==0||reg[1]===0)){b=true}break;default:if(k=="input"||alt){b=true}break;case"tab":b=true;break}}}else{if(m4[key]){b=true}}if(b){if(profile.beforeNextFocus&&false===profile.boxing().beforeNextFocus(profile,key,!!shift,e)){return false}if(key!="tab"){linb(src).nextFocus(("up"==key||"left"==key)?false:true)}}}}});hls.beforeNextFocus=src.e3}if((t=hash.DropableKeys)&&t.length){_.arr.each(t,function(o){self._dropable(o)});t=self.prototype;_.arr.each("addPanel,removePanel,getPanelPara,getPanelChildren,getDropKeys,setDropKeys".split(","),function(o){if(!t[o]){t[o]=src[o]}});self.$DataModel.dropKeys=self.$DataStruct.dropKeys="";hls.onDragEnter=hls.onDragLeave=hls.onDrop=hls.onDropTest=hls.onDropMarkShow=hls.onDropMarkClear=src.e4}if((t=hash.DragableKeys)&&t.length){_.arr.each(t,function(o){self._dragable(o)});t=self.prototype;_.arr.each("getDragKey,setDragKey".split(","),function(o){if(!t[o]){t[o]=src[o]}});self.$DataModel.dragKey=self.$DataStruct.dragKey="";hls.onGetDragData=hls.onStartDrag=hls.onDragStop=src.e5}self.setEventHandlers(hls)},addTemplateKeys:function(arr){var self=this,key=self.KEY,me=arguments.callee,reg=me._reg||(me._reg=/\./g);_.arr.each(arr,function(i){self.$cssKeys[i]=(self.$Keys[i]=i=="KEY"?key:key+"-"+i).replace(reg,"-").toLowerCase().replace("linb-ui","linb")});return self},$CSSCACHE:{},$getCSSValue:function(cls,key){var cache=this.$CSSCACHE,ck="."+cls+":"+key;return cache[ck]||(cache[ck]=parseInt(linb.CSS.$getCSSValue("."+cls,key))||0)},getTheme:function(){return this.$theme},setTheme:function(key){key=key||"default";var ns=this;if(key!=ns.$theme){if(key!="default"){linb.CSS.includeLink(linb.getPath("linb.appearance."+key,"/theme.css"),"theme:"+key)}var o=linb.CSS.get("id","theme:"+ns.$theme);if(o){o.disabled=true;linb(o).remove(false)}ns.$theme=key;ns.$CSSCACHE={};var count=0;_.asyRun(function(){if(count>10){throw new Error("errLoadTheme:"+key)}count++;var s=linb.CSS.$getCSSValue(".setting-uikey","fontFamily");if(s==key||key=="default"){linb.UI.getAll().reLayout(false,true);count=null}else{_.asyRun(arguments.callee,200)}},100)}return this},setAppearance:function(hash){_.merge(this.$Appearances,hash,"all");return this},getAppearance:function(){return this.$Appearances},setTemplate:function(hash,cacheId){if(hash){var self=this,me=arguments.callee,r2=me.r2||(me.r2=/[a-z]/),sc=linb.absObj.$specialChars,_ks=["KEY"],fun=me._fun||(me._fun=function(hash,arr){var o,i;for(i in hash){if(!sc[i.charAt(0)]){if(!r2.test(i)){arr[arr.length]=i;o=hash[i];if(typeof o=="object"){arguments.callee(o,arr)}}}}}),t;fun(hash,_ks);self.addTemplateKeys(_ks);t=self.$Templates;if(typeof cacheId=="string"){hash._subid=cacheId;t[cacheId]=hash}else{t._=hash}if(t=hash.$dynamic){for(var i in t){for(var j in t[i]){me.call(self,t[i],j)}}}}return this},getTemplate:function(cacheId){return this.$Templates[cacheId||"_"]},setBehavior:function(hash){if(hash){var self=this,check=linb.absObj.$specialChars,handler=linb.Event.$EVENTHANDLER,ehs="$eventhandler",eventType=linb.Event._getEventType,me=arguments.callee,r1=me.r1||(me.r1=/[a-z]/),r2=me.r2||(me.r2=/^(on|before|after)/),t=self.$Behaviors,m,i,j,o,v,type;self._setDefaultBehavior(hash);if(hash.KEY){_.merge(hash,hash.KEY,"all");delete hash.KEY}for(i in hash){o=hash[i];if(!check[i.charAt(0)]){if(!r1.test(i)){m=t[i]||(t[i]={});for(j in o){v=o[j];if(!check[j.charAt(0)]){type=eventType(j);if(v){m[j]=v;(m[ehs]||(m[ehs]={}))["on"+type]=handler}else{delete m[j];if(t[ehs]){delete t[ehs]["on"+type]}}}}}else{if(r2.test(i)){type=eventType(i);if(o){t[i]=o;(t[ehs]||(t[ehs]={}))["on"+type]=handler}else{delete t[i];if(t[ehs]){delete t[ehs]["on"+type]}}}else{t[i]=o}}}}}return self},getBehavior:function(){return this.$Behaviors},$applyCSS:function(){var self=linb.UI,cache=self.$cache_css;if(cache){if(!self.$cssNo){self.$cssNo=1}linb.CSS.addStyleSheet(cache,"linb.UI-CSS"+(self.$cssNo++));self.$cache_css=""}},buildCSSText:function(hash){var self=this,me=arguments.callee,r1=me._r1||(me._r1=/(^|\s|,)([0-9A-Z_]+)/g),h=[],r=[],browser=linb.browser,ie6=browser.ie6,ie=browser.ie,gek=browser.gek,ks=self.$cssKeys,t,v,o;for(var i in hash){o=hash[i];t=i.replace(r1,function(a,b,c){return b+"."+(ks[c]||c)}).toLowerCase();o.$order=parseInt(o.$order)||0;o.$=t;h[h.length]=o}h.sort(function(x,y){x=x.$order;y=y.$order;return x>y?1:x==y?0:-1});for(var i=0,l=h.length;i<l;){o=h[i++];r[r.length]=o.$+"{";if(t=o.$before){r[r.length]=t}if(t=o.$text){r[r.length]=t}for(var j in o){switch(j.charAt(0)){case"$":continue;break;case"_":if(!ie6){continue}break;case"*":if(!ie){continue}break;case"-":if(!gek){continue}break}if((v=o[j])||o[j]===0){switch(typeof v){case"string":case"number":r[r.length]=j+":"+v+";";break;case"function":r[r.length]=j+":"+v(self.KEY)+";";break;default:_.arr.each(v,function(k){if(k){r[r.length]=j+":"+k+";"}})}}}if(v=o.$after){r[r.length]=v}r[r.length]="}"}return r.join("")},_dropable:function(key){var self=this,h2=linb.Event.$EVENTHANDLER2,o=self.$Behaviors,v=key=="KEY"?o:(o[key]||(o[key]={}));_.merge(v,{beforeMouseover:function(profile,e,src){if(profile.properties.disabled||profile.properties.readonly){return }var self=this,dd=linb.DragDrop,pp=dd.getProfile(),key=pp.dragKey,data=pp.dragData,item,box,t,args;if(!key||!data||!(new RegExp("\\b"+key+"\\b")).test(profile.box.getDropKeys(profile,self))){return }box=profile.boxing();if(box.getItemByDom){item=box.getItemByDom(src)}args=[profile,e,self,key,data,item];if((t=profile.onDropTest)&&(false===box.onDropTest.apply(box,args))){return }if((t=profile.box._onDropTest)&&(false===t.apply(profile.host||profile,args))){return }dd.setDropElement(src);if(profile.onDropMarkShow&&(false===box.onDropMarkShow.apply(box,args))){}else{if((t=profile.box._onDropMarkShow)&&(false===t.apply(profile.host||profile,args))){}else{_.resetRun("setDropFace",dd.setDropFace,0,[self],dd)}}if(t=profile.box._onDragEnter){t.apply(profile.host||profile,args)}if(profile.onDragEnter){box.onDragEnter.apply(box,args)}},beforeMouseout:function(profile,e,src){if(profile.properties.disabled||profile.properties.readonly){return }var self=this,dd=linb.DragDrop,pp=dd.getProfile(),key=pp.dragKey,data=pp.dragData,item,box,args;if(pp.dropElement==src.id){box=profile.boxing();if(box.getItemByDom){item=box.getItemByDom(src)}args=[profile,e,self,key,data,item];if(profile.onDropMarkClear&&(false===box.onDropMarkClear.apply(box,args))){}else{if((t=profile.box._onDropMarkClear)&&(false===t.apply(profile.host||profile,args))){}else{_.resetRun("setDropFace",dd.setDropFace,0,[null],linb.DragDrop)}}if(t=profile.box._onDragLeave){t.apply(profile.host||profile,args)}if(profile.onDragLeave){box.onDragLeave.apply(box,args)}dd.setDropElement(null)}},beforeDrop:function(profile,e,src){var self=this,dd=linb.DragDrop,pp=dd.getProfile(),key=pp.dragKey,data=pp.dragData,item,t,args,box=profile.boxing();if(box.getItemByDom){item=box.getItemByDom(src)}args=[profile,e,self,key,data,item];if(profile.onDropMarkClear&&(false===box.onDropMarkClear.apply(box,args))){}else{if((t=profile.box._onDropMarkClear)&&(false===t.apply(profile.host||profile,args))){}}if(profile.onDrop&&(false===box.onDrop.apply(box,args))){}else{if((t=profile.box._onDrop)&&(false===t.apply(profile.host||profile,args))){}}}},"all");_.merge(v.$eventhandler||(v.$eventhandler={}),{onmouseover:h2,onmouseout:h2,ondrop:h2});return self},_dragable:function(key){var self=this,h2=linb.Event.$EVENTHANDLER2,o=self.$Behaviors,v=key=="KEY"?o:(o[key]||(o[key]={}));_.merge(v,{beforeMousedown:function(profile,e,src){if(profile.properties.disabled){return }if(!profile.properties.dragKey){return }var pos=linb.Event.getPos(e),box=profile.boxing(),args=[profile,e,src],t;if(profile.onStartDrag&&(false===box.onStartDrag.apply(box,args))){}else{if((t=profile.box._onStartDrag)&&(false===t.apply(profile.host||profile,args))){}else{var con=profile.box;linb([src]).startDrag(e,{dragType:"icon",targetLeft:pos.left+12,targetTop:pos.top+12,dragCursor:"pointer",dragDefer:1,dragKey:con.getDragKey(profile,this),dragData:con.getDragData(profile,e,this)})}}},beforeDragbegin:function(profile,e,src){linb(src).onMouseout(true,{$force:true}).onMouseup(true)},beforeDragstop:function(profile,e,src){var t;if(profile.onDragStop){profile.boxing().onDragStop(profile.e,src)}if(t=profile.box._onDragStop){t.apply(profile.host||profile,arguments)}}},"all");_.merge(v.$eventhandler||(v.$eventhandler={}),{onmousedown:h2,ondragbegin:h2});return self},adjustData:function(profile,hashIn,hashOut){if(!hashOut){hashOut={}}var i,o,w=linb.wrapRes,me=arguments.callee,r=me._r||(me._r=/\B\$([\w]+[\.][\w\.]+[\w])/g);for(i in hashIn){if(i.charAt(0)=="$"){continue}if(!(i in hashOut)){hashOut[i]=typeof (o=hashIn[i])=="string"?(((o.indexOf("$")!=-1)?(o=o.replace(r,function(a,b){return w(b)})):o)&&((o.charAt(0)=="@")?(linb.SC.get(o.substr(1,o.length))||o):o)):o}}if((typeof (o=hashOut.renderer)=="function")||(typeof (o=hashIn.renderer)=="function")){hashOut.caption=o(hashIn,hashOut,profile)}if("disabled" in hashIn){hashOut.disabled=hashIn.disabled?"ui-disabled":""}hashOut.iconDisplay=hashIn.image?"":"display:none";return hashOut},cacheData:function(key,obj){_.set(linb.cache,["UIDATA",key],obj);return this},getCachedData:function(key){var r=_.get(linb.cache,["UIDATA",key]);if(typeof r=="function"){r=r()}return _.clone(r)},Behaviors:{onContextmenu:function(profile,e,src){return profile.boxing().onContextmenu(profile,e,src)!==false}},DataModel:{tag:"",tagVar:{ini:{}},disabled:{ini:false,action:function(v){this.root.css("opacity",v?0.5:1)}},dock:{ini:"none",listbox:["none","top","bottom","left","right","center","middle","origin","width","height","fill","cover"],action:function(v){var self=this;if(self.domNode){linb.UI.$dock(self,true,true)}}},dockIgnore:{ini:false,action:function(v){var self=this;if(!v&&self.domNode&&self.properties.dock!="none"){linb.UI.$dock(self,true,true)}}},dockOrder:{ini:1,action:function(v){var self=this;if(self.domNode&&self.properties.dock!="none"){linb.UI.$dock(self,true,true)}}},dockMargin:{ini:{left:0,top:0,right:0,bottom:0},action:function(v){var self=this;if(self.domNode&&self.properties.dock!="none"){linb.UI.$dock(self,true,true)}}},dockFloat:{ini:false,action:function(v){var self=this;if(self.domNode&&self.properties.dock!="none"){linb.UI.$dock(self,true,true)}}},dockMinW:0,dockMinH:0,tips:""},EventHandlers:{onRender:function(profile){},onLayout:function(profile){},onDestroy:function(profile){},beforeDestroy:function(profile){},onShowTips:function(profile,node,pos){},onContextmenu:function(profile,e,node){}},RenderTrigger:function(){var self=this,b=self.boxing(),p=self.properties;if(self.box._onresize){var style=self.domNode.style,t;if((t=style.visibility)!="hidden"){self._$v=t;style.visibility="hidden"}linb.UI.$tryResize(self,p.width,p.height)}if(p.disabled){b.setDisabled(true,true)}self.inValid=1},$tryResize:function(profile,w,h,syn,force,key){var s=profile.box,t=s._onresize,args=profile.$rs_args;if(t&&(w||h)){if(!args){args=profile.$rs_args=[profile,null,null];_.asyRun(profile.$resizeFun=function(){delete profile.$rs_args;delete profile.$resizeFun;if(!linb.Dom.byId(profile.domId)){return }t.apply(s,args);var style=profile.domNode.style;if("_$v" in profile){if(style.visibility!="visible"){style.visibility=profile._$v}delete profile._$v}})}if(w){args[1]=w}if(h){args[2]=h}args[3]=force;args[4]=key}if(syn){_.tryF(profile.$resizeFun)}},LayoutTrigger:function(){var self=this,b=self.boxing(),p=self.properties;if(p.dock&&p.dock!="none"){if(!self.$laidout){self.$laidout=1;var stl=self.domNode.style;switch(p.dock){case"top":case"bottom":case"width":stl.width=0;break;case"left":case"right":case"height":stl.height=0;break;default:stl.width=stl.height=0}}linb.UI.$dock(this,false,true)}},$dock_args:["top","bottom","left","right","center","middle","width","height"],$dock_map:{middle:1,center:1},$dock:function(profile,force,trigger){var prop=profile.properties,margin=prop.dockMargin,node=profile.root,value=prop.dock||"none",p=node.parent(),auto="auto",pid=p.id(),order=function(x,y){x=parseInt(x.properties.dockOrder)||0;y=parseInt(y.properties.dockOrder)||0;return x>y?1:x==y?0:-1},win=false,region,inMatix="$inMatix",f,t,_adjust=function(v){return linb.browser.ie6?v-v%2:v};if(pid&&_.str.startWith(pid,linb.Dom._matixid)){return }if(profile.$dockParent!=pid||profile.$dockType!=value||force){profile.$dockParent=pid;profile.$dockType=value;profile.unLink("$dock");profile.unLink("$dock1");profile.unLink("$dock2");switch(value){case"middle":region={right:auto,bottom:auto,left:prop.left||"",width:prop.width||"",height:prop.height||""};break;case"center":region={right:auto,bottom:auto,top:prop.top||"",width:prop.width||"",height:prop.height||""};break;case"origin":region={right:auto,bottom:auto,width:prop.width||"",height:prop.height||""};break;case"top":region={left:margin.left,right:margin.right,bottom:auto,height:prop.height||""};break;case"bottom":region={left:margin.left,right:margin.right,top:auto,height:prop.height||""};break;case"left":region={right:auto,width:prop.width||""};break;case"right":region={left:auto,width:prop.width||""};break;case"width":region={bottom:auto,height:prop.height||"",top:prop.top||""};break;case"height":region={right:auto,width:prop.width||"",left:prop.left||""};break;case"fill":case"cover":region={right:auto,bottom:auto};break;case"none":region={left:prop.left,top:prop.top,width:prop.width||"",height:prop.height||""};break}node.cssRegion(region,true);if(p.get(0)===document.body){p=linb.win;win=true;if(win&&!linb.cache._resizeTime){linb.cache._resizeTime=1}}if(value!="none"){f=p.$getEvent("onSize","dock");if(!f){f=function(arg){var me=arguments.callee,map=linb.UI.$dock_map,arr=linb.UI.$dock_args,rePos=me.rePos,node=me.node,style=node.get(0).style,win=me.win,obj,i,k,o,key,target;if(arg.$dockid||!win||(_()-linb.cache._resizeTime>100)){obj={left:0,top:0,right:0,bottom:0,width:parseInt(style&&style.width)||node.width(),height:parseInt(style&&style.height)||node.height()};for(k=0;key=arr[k++];){target=me[key];if(target.length){if(!map[key]){arg.width=arg.height=1}for(i=0;o=target[i++];){if(!o.properties.dockIgnore){rePos(o,obj,key,arg.$dockid,win||arg.width,win||arg.height)}}}}if(obj.later){_.each(obj.later,function(o){try{o.node.cssRegion(o,true)}catch(e){_.asyRun(function(){o.width+=1;o.height+=1;o.node.cssRegion(o,true)})}})}if(win){linb.cache._resizeTime=_()}}};f.node=p;_.arr.each(linb.UI.$dock_args,function(key){f[key]=[]});f.win=win;f.rePos=function(profile,obj,value,id,w,h){var flag=false;if(id&&profile.$id!=id){flag=true}var prop=profile.properties,flt=prop.dockFloat,margin=prop.dockMargin,node=profile.root,style=profile.domNode.style,left,top,right,bottom,temp,other,x=parseInt(prop._dockBorderWidth)||0,y=parseInt(prop._dockBorderHeight)||0,region={};switch(value){case"middle":node.top((obj.height-node.height())/2);break;case"center":node.left((obj.width-node.width())/2);break;case"top":if(!flag){left=margin.left;right=margin.right;top=(flt?0:obj.top)+margin.top;if(parseFloat(style.top)!=top){region.top=top}temp=obj.width-left-right-x;if(parseFloat(style.width)!=temp){region.width=_adjust(temp)}if(!_.isEmpty(region)){node.cssRegion(region,true)}}if(!flt){obj.top+=(node.offsetHeight()+margin.top+margin.bottom)}break;case"bottom":if(!flag){left=margin.left;right=margin.right;bottom=(flt?0:obj.bottom)+margin.bottom;if(parseFloat(style.bottom)!=bottom){region.bottom=bottom}temp=obj.width-left-right-x;if(parseFloat(style.width)!=temp){region.width=_adjust(temp)}if(!_.isEmpty(region)){node.cssRegion(region,true)}}if(!flt){obj.bottom+=(node.offsetHeight()+margin.top+margin.bottom)}break;case"left":if(!flag){left=(flt?0:obj.left)+margin.left;top=(flt?0:obj.top)+margin.top;bottom=(flt?0:obj.bottom)+margin.bottom;if(parseFloat(style.left)!=left){region.left=left}if(parseFloat(style.top)!=top){region.top=top}temp=obj.height-top-bottom-y;if(parseFloat(style.height)!=temp){region.height=_adjust(temp)}if(!_.isEmpty(region)){node.cssRegion(region,true)}}if(!flt){obj.left+=(node.offsetWidth()+margin.left+margin.right)}break;case"right":if(!flag){right=(flt?0:obj.right)+margin.right;top=(flt?0:obj.top)+margin.top;bottom=(flt?0:obj.bottom)+margin.bottom;if(parseFloat(style.right)!=right){region.right=right}if(parseFloat(style.top)!=top){region.top=top}temp=obj.height-top-bottom-y;if(parseFloat(style.height)!=temp){region.height=_adjust(temp)}if(!_.isEmpty(region)){node.cssRegion(region,true)}}if(!flt){obj.right+=(node.offsetWidth()+margin.left+margin.right)}break;case"width":if(!w){return }left=(prop.dock=="cover"?0:(flt?0:obj.left))+margin.left;right=(prop.dock=="cover"?0:(flt?0:obj.right))+margin.right;top=prop.dock=="width"?(parseInt(prop.top)||0):((prop.dock=="cover"?0:(flt?0:obj.top))+margin.top);temp=obj.width-left-right-x;obj.later=obj.later||{};obj.later[profile.$id]=obj.later[profile.$id]||{};_.merge(obj.later[profile.$id],{node:node,width:_adjust(prop.dockMinW?Math.max(prop.dockMinW,temp):temp),left:left,top:top},"all");break;case"height":if(!h){return }top=(prop.dock=="cover"?0:(flt?0:obj.top))+margin.top;bottom=(prop.dock=="cover"?0:(flt?0:obj.bottom))+margin.bottom;left=prop.dock=="height"?(parseInt(prop.left)||0):((prop.dock=="cover"?0:(flt?0:obj.left))+margin.left);temp=obj.height-top-bottom-y;obj.later=obj.later||{};obj.later[profile.$id]=obj.later[profile.$id]||{};_.merge(obj.later[profile.$id],{node:node,height:_adjust(prop.dockMinH?Math.max(prop.dockMinH,temp):temp),left:left,top:top},"all");break}};p.onSize(f,"dock")}if(value=="fill"||value=="cover"){profile.link(f.height,"$dock1");profile.link(f.width,"$dock2");f.height.sort(order);f.width.sort(order)}else{if(value=="origin"){profile.link(f.center,"$dock1");profile.link(f.middle,"$dock2")}else{profile.link(f[value],"$dock");f[value].sort(order)}}linb

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -