📄 jsx_opt.js
字号:
jsx3.Class.defineInterface("jsx3.gui.Form",null,function(p,c){var kc=jsx3.gui.Event;p.DEFAULTDISABLEDCOLOR="#a8a8b5";p.DEFAULTDISABLEDBACKGROUNDCOLOR="#d8d8e5";p.STATEINVALID=0;p.STATEVALID=1;p.STATEDISABLED=0;p.STATEENABLED=1;p.OPTIONAL=0;p.REQUIRED=1;c.doKeyBinding=function(a,h){var wb=jsx3.gui.HotKey.valueOf(h,a);return this.ti().registerHotKey(wb);};c.ti=function(){var gb=jsx3.gui.Window!=null;var T=jsx3.gui.Dialog!=null;var Ib=this;while(Ib!=null){if(gb&&Ib instanceof jsx3.gui.Window)return Ib.getRootBlock();if(T&&Ib instanceof jsx3.gui.Dialog)return Ib;var gc=Ib.getParent();if(gc==null)return Ib.getServer();Ib=gc;}return null;};c.getKeyBinding=function(){return this.jsxkeycode==null?null:this.jsxkeycode;};c.setKeyBinding=function(b){this.jsxkeycode=b;return this;};c.getDisabledBackgroundColor=function(){return this.jsxdisabledbgcolor;};c.setDisabledBackgroundColor=function(e){this.jsxdisabledbgcolor=e;return this;};c.UZ=function(){var hb=this.getEnabled()!=p.STATEDISABLED?this.getBackgroundColor():this.getDisabledBackgroundColor();return hb?"background-color:"+hb+";":"";};c.getDisabledColor=function(){return this.jsxdisabledcolor;};c.setDisabledColor=function(m){this.jsxdisabledcolor=m;return this;};c.getEnabled=function(){return this.jsxenabled==null?p.STATEENABLED:this.jsxenabled;};c.getValue=function(){return this.jsxvalue;};c.setValue=function(a){this.jsxvalue=a;return this;};c.setEnabled=function(q,j){if(this.jsxenabled!=q){this.jsxenabled=q;if(j)this.repaint();}return this;};c.QP=function(){if(this.getEnabled()!=p.STATEDISABLED){return "color:"+(this.getColor()?this.getColor():jsx3.gui.Block.DEFAULTCOLOR)+";";}else{return "color:"+(this.getDisabledColor()?this.getDisabledColor():p.DEFAULTDISABLEDCOLOR)+";";}};c.WP=function(){return this.getEnabled()==p.STATEENABLED?"":" disabled=\"disabled\" ";};c.CI=function(){return jsx3.gui.Block.prototype.CI.call(this,this.getIndex()||Number(0));};c.getRequired=function(){return this.jsxrequired==null?p.OPTIONAL:this.jsxrequired;};c.setRequired=function(g){this.jsxrequired=g;return this;};c.getValidationState=function(){return this._jsxVf==null?p.STATEVALID:this._jsxVf;};c.setValidationState=function(a){this._jsxVf=a;return this;};c.doValidate=jsx3.Method.newAbstract();c.doReset=function(){this.setValidationState(p.STATEVALID);return this;};p.validate=function(d,q){var Hb=d.getDescendantsOfType(jsx3.gui.Form);if(d.instanceOf(jsx3.gui.Form))Hb.unshift(d);var sc=p.STATEVALID;for(var E=0;E<Hb.length;E++){var Cb=Hb[E].doValidate();if(q)q(Hb[E],Cb);if(Cb!=p.STATEVALID)sc=Cb;}return sc;};p.reset=function(o){var Nb=o.getDescendantsOfType(jsx3.gui.Form);if(o.instanceOf(jsx3.gui.Form))Nb.unshift(o);for(var sb=0;sb<Nb.length;sb++)Nb[sb].doReset();};p.getVersion=function(){return "3.00.00";};c.emInit=function(e){if(this.emGetType()==jsx3.gui.Matrix.EditMask.NORMAL){this.setRelativePosition(jsx3.gui.Block.ABSOLUTE,true);this.setDisplay(jsx3.gui.Block.DISPLAYNONE,true);}};c.emGetType=function(){return jsx3.gui.Matrix.EditMask.NORMAL;};c.emPaintTemplate=function(){throw new jsx3.Exception("Not implemented.");};c.PS=function(k,s){return "<xsl:choose xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:when test=\"@jsxnomask='1'\"></xsl:when><xsl:when test=\"@jsxdisabled='1'\">"+s+"</xsl:when>"+"<xsl:otherwise>"+k+"</xsl:otherwise>"+"</xsl:choose>";};c.emBeginEdit=function(q,f,i,n,h,a,o){if(this.emGetType()==jsx3.gui.Matrix.EditMask.NORMAL){this.setRelativePosition(jsx3.gui.Block.ABSOLUTE,true);this.emUpdateDisplay(f,i);this.setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);this.setZIndex(10,true);this.focus();this.emFocus();}this.emSetValue(q);};c.emEndEdit=function(){if(this.emGetType()==jsx3.gui.Matrix.EditMask.NORMAL){this.emRestoreDisplay();}var hb=this.emGetValue();return hb;};c.emSetValue=function(a){this.setValue(a);};c.emGetValue=function(){var rc=this.getValue();return rc!=null?rc.toString():null;};c.emUpdateDisplay=function(k,d){var H=this.emGetSession();var Tb=this.getWidth(),Gc=this.getHeight();H.width=Tb;H.height=Gc;var hb=isNaN(Tb)?k.W:Math.min(parseInt(Tb),k.W);var kb=isNaN(Gc)?k.H:Math.min(parseInt(Gc),k.H);this.setDimensions(k.L,k.T,hb,kb,true);};c.emRestoreDisplay=function(){this.setDisplay(jsx3.gui.Block.DISPLAYNONE,true);var Nc=this.emGetSession();this.setWidth(Nc.width,false);this.setHeight(Nc.height,false);};c.emFocus=function(){};});jsx3.Form=jsx3.gui.Form;jsx3.Class.defineClass("jsx3.gui.HotKey",null,[jsx3.util.EventDispatcher],function(p,o){var Eb=jsx3.gui.Event;p.WAS_INVOKED="invoked";o.Ue=null;o.Zq=null;o.Aw=false;o.Iz=false;o.Ku=false;o.ty=false;o.Rc=true;o.Vx=false;p.valueOf=function(r,d){var I=r.toLowerCase().split("+");var gc=I.pop();var A=I.indexOf("ctrl")>=0;var Hc=I.indexOf("shift")>=0;var yb=I.indexOf("alt")>=0;var _=I.indexOf("meta")>=0;if(typeof(gc)=="string"&&gc.match(/^\[(\d+)\]$/))gc=parseInt(RegExp.$1);return new p(d||new Function(""),gc,Hc,A,yb,_);};o.init=function(i,h,b,d,a,c){if(!(typeof(i)=="function"))throw new jsx3.IllegalArgumentException("callback",i);this.Ue=i;this.Aw=b==null?null:Boolean(b);this.Iz=d==null?null:Boolean(d);this.ty=a==null?null:Boolean(a);this.Ku=c==null?null:Boolean(c);this.Zq=typeof(h)=="number"?h:p.keyDownCharToCode(h);if(this.Zq==null)throw new jsx3.IllegalArgumentException("key",h);};o.getKey=function(){var ab="";if(this.Ku)ab=ab+"meta+";if(this.ty)ab=ab+"alt+";if(this.Iz)ab=ab+"ctrl+";if(this.Aw)ab=ab+"shift+";var G=p.keyDownCodeToChar(this.Zq);ab=ab+(G!=null?G:"["+this.Zq+"]");return ab;};o.getKeyCode=function(){return this.Zq;};o.isMatch=function(f){var vc=f.keyCode()==this.Zq&&(this.Aw==null||f.shiftKey()==this.Aw)&&(this.Iz==null||f.ctrlKey()==this.Iz)&&(this.Ku==null||f.metaKey()==this.Ku)&&(this.ty==null||f.altKey()==this.ty);return vc;};o.invoke=function(s,r){if(this.Vx||!this.Rc)throw new jsx3.Exception("HotKey destroyed or not enabled");this.Ue.apply(s,r);this.publish({subject:p.WAS_INVOKED});};o.isEnabled=function(){return this.Rc;};o.setEnabled=function(a){this.Rc=a;};o.isDestroyed=function(){return this.Vx;};o.destroy=function(){this.Vx=true;delete this.Ue;};o.getFormatted=function(){var _b=null,Fb=null;if(jsx3.app.Browser.macosx){if(p.Tm.shift==null){var Ic=jsx3.html.getMode()==jsx3.html.MODE_FF_STRICT;p.Tm.shift=[Ic?"\u21EA":"\u0005",Eb.KEY_SHIFT];}_b="";Fb=p.Tm;}else{_b="+";Fb=p.Hu;}var H="";if(this.Iz)H=H+(Fb.ctrl[0]+_b);if(this.ty)H=H+(Fb.alt[0]+_b);if(this.Aw)H=H+(Fb.shift[0]+_b);if(this.Ku)H=H+(Fb.meta[0]+_b);var Dc=p.keyDownCodeToChar(this.Zq,true);H=H+(Dc!=null?Dc.length==1?Dc.toUpperCase():Dc:"["+this.Zq+"]");return H;};p.Tm={meta:["\u2318",Eb.KEY_META],alt:["\u2325",Eb.KEY_ALT],ctrl:["\u2303",Eb.KEY_CONTROL],shift:null,enter:["\u21A9",Eb.KEY_ENTER],esc:["\u238B",Eb.KEY_ESCAPE],tab:["\u21E5",Eb.KEY_TAB],del:["\u2326",Eb.KEY_DELETE],space:["\u2423",Eb.KEY_SPACE],backspace:["\u232B",Eb.KEY_BACKSPACE],up:["\u2191",Eb.KEY_ARROW_UP],down:["\u2193",Eb.KEY_ARROW_DOWN],left:["\u2190",Eb.KEY_ARROW_LEFT],right:["\u2192",Eb.KEY_ARROW_RIGHT],insert:["Insert",Eb.KEY_INSERT],home:["\u2196",Eb.KEY_HOME],end:["\u2198",Eb.KEY_END],pgup:["\u21DE",Eb.KEY_PAGE_UP],pgdn:["\u21DF",Eb.KEY_PAGE_DOWN]};p.Hu={meta:["Meta",Eb.KEY_META],alt:["Alt",Eb.KEY_ALT],ctrl:["Ctrl",Eb.KEY_CONTROL],shift:["Shift",Eb.KEY_SHIFT],enter:["Enter",Eb.KEY_ENTER],esc:["Esc",Eb.KEY_ESCAPE],tab:["Tab",Eb.KEY_TAB],del:["Del",Eb.KEY_DELETE],space:["Space",Eb.KEY_SPACE],backspace:["Backspace",Eb.KEY_BACKSPACE],up:["Up",Eb.KEY_ARROW_UP],down:["Down",Eb.KEY_ARROW_DOWN],left:["Left",Eb.KEY_ARROW_LEFT],right:["Right",Eb.KEY_ARROW_RIGHT],insert:["Insert",Eb.KEY_INSERT],home:["Home",Eb.KEY_HOME],end:["End",Eb.KEY_END],pgup:["PgUp",Eb.KEY_PAGE_UP],pgdn:["PgDn",Eb.KEY_PAGE_DOWN]};o.toString=function(){return "@HotKey key:"+this.Zq+" shift:"+this.Aw+" ctrl:"+this.Iz+" alt:"+this.ty+" meta:"+this.Ku;};p.Fx={39:222,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192};p.keyDownCharToCode=function(n){var gc=null;if(n.length==1){var Fb=n.charCodeAt(0);if(Fb>=65&&Fb<=90)gc=Fb;else{if(Fb>=97&&Fb<=122)gc=Fb-32;else{if(Fb>=48&&Fb<=57)gc=Fb;else gc=p.Fx[Fb];}}}else{if(p.Hu[n.toLowerCase()]){gc=p.Hu[n.toLowerCase()][1];}else{if(n.match(/^[fF](\d\d?)$/)){gc=parseInt(RegExp.$1)+Eb.KEY_F1-1;}}}return gc;};p.keyDownCodeToChar=function(i,a){var Y=null;if(i>=65&&i<=90)Y=String.fromCharCode(i+97-65);else{if(i>=48&&i<=57)Y=String.fromCharCode(i);else{if(i>=Eb.KEY_F1&&i<=Eb.KEY_F15)Y="F"+(i-Eb.KEY_F1+1);else{for(var wb in p.Fx){if(p.Fx[wb]==i){Y=String.fromCharCode(wb);break;}}if(Y==null){var S=a&&jsx3.app.Browser.macosx?p.Tm:p.Hu;for(var wb in S){if(S[wb][1]==i){Y=S[wb][0];break;}}}}}}return Y;};});jsx3.Class.defineClass("jsx3.gui.Painted",jsx3.app.Model,null,function(b,c){b.MASK_NO_EDIT={NN:false,EE:false,SS:false,WW:false,MM:false};b.MASK_ALL_EDIT={NN:true,EE:true,SS:true,WW:true,MM:true};c.init=function(l){this.jsxsuper(l);};c.getAbsolutePosition=function(q,o){if(o==null)o=this.getRendered(q);if(o==null)return {L:0,T:0,W:0,H:0};if(q==null)q=this.tA().getRendered(o);return jsx3.html.getRelativePosition(q,o);};c.applyDynamicProperties=function(){if(this._jsxvq!=null){var vc=this.getServer();if(vc==null)return;var H=vc.getProperties();for(var Lc in this._jsxvq)this[Lc]=H.get(this._jsxvq[Lc]);}};c.setDynamicProperty=function(o,s){if(this._jsxvq==null)this._jsxvq={};if(s==null){delete this._jsxvq[o];}else{if(o!=null&&o!=""){this._jsxvq[o]=s;}}return this;};c.getDynamicProperty=function(j){return this._jsxvq!=null?this._jsxvq[j]:null;};c.setAttribute=function(g,h){this.getAttributes()[g]=h;return this;};c.getAttribute=function(a){return this.getAttributes()[a];};c.getAttributes=function(){if(this.jsxcustom==null)this.jsxcustom={};return this.jsxcustom;};c.renderAttributes=function(o,f){var Ub=[];if(this.jsxcustom!=null){var z=jsx3.gui.Interactive&&this.instanceOf(jsx3.gui.Interactive);for(var C in this.jsxcustom){var Hb=o!=null&&(o instanceof Array&&o.indexOf(C)>=0||o[C])||f&&z&&jsx3.gui.Interactive.isBridgeEventHandler(C);var t=this.jsxcustom[C];if(!Hb&&t!=null)Ub.push(" "+C+"=\""+t.replace(/\"/g,""")+"\"");}}return Ub.join("");};c.removeAttribute=function(e){delete this.getAttributes()[e];return this;};c.removeAttributes=function(){delete this.jsxcustom;return this;};c.focus=function(){var G=this.getRendered();if(G!=null&&G.focus)G.focus();return G;};c.getMaskProperties=function(){return b.MASK_NO_EDIT;};c.getRendered=function(m){var eb=null;if(m instanceof jsx3.gui.Event){if(m.exists()&&m.srcElement())eb=m.srcElement().ownerDocument;}else{if(m!=null){eb=m.getElementById?m:m.ownerDocument;}}if(eb==null)eb=this.getDocument();return eb!=null?eb.getElementById(this.getId()):null;};c.containsHtmlElement=function(n){var wb=this.getRendered(n);if(wb){while(n!=null){if(wb==n)return true;n=n.parentNode;}}return false;};c.getDocument=function(){var Jb=this;while(Jb!=null){if(jsx3.gui.Window&&Jb instanceof jsx3.gui.Window)return Jb.getDocument();else{if(Jb._jsxW9!=null)return Jb._jsxW9.getRootDocument();}Jb=Jb.getParent();}return null;};c.tA=function(){var Xb=this;while(Xb!=null){if(jsx3.gui.Window&&Xb instanceof jsx3.gui.Window)return Xb.getRootBlock();else{if(Xb._jsxW9!=null)return Xb._jsxW9.getRootBlock();}Xb=Xb.getParent();}return null;};b.yj=null;c.repaint=function(){var B=this.getRendered();if(this.isDomPaint()){if(B!=null){var wb=B.previousSibling;var ab=this.paintDom();if(ab!=B)B.parentNode.replaceChild(ab,B);else{if(ab.parentNode==null)wb.parentNode.insertBefore(ab,wb);}}return null;}else{var xc=null;if(B!=null){xc=this.paint();jsx3.html.setOuterHTML(B,xc);var tb=B.ownerDocument;if(tb.recalc!=null)jsx3.sleep(function(){tb.recalc(true);},"jsx3.gui.Painted.recalc");}return xc;}};c.paint=jsx3.Method.newAbstract();c.isDomPaint=function(){return false;};c.paintDom=function(){throw new jsx3.Exception();};c.dg=function(){return "<span id=\""+this.getId()+"\" style=\"display:none;\"></span>";};b.mp=[];b.Bl=function(q){b.mp.push(q);jsx3.sleep(b.He,"jsx3.gui.Painted.domPaint");};b.He=function(){for(var Xb=0;Xb<b.mp.length;Xb++){var kb=b.mp[Xb];var Ic=kb.getRendered();if(Ic!=null){var gc=kb.paintDom();Ic.parentNode.replaceChild(gc,Ic);}}b.mp.splice(0,b.mp.length);};c.paintChild=function(a,q,p){if(p==null)p=this.getRendered();if(p!=null){if(a.isDomPaint()){p.appendChild(a.paintDom());}else{jsx3.html.insertAdjacentHTML(p,"beforeEnd",a.paint());}}};c.Zu=function(a,q){this.paintChild(a,q);};c.insertHTML=function(a){this.paintChild(a);return this;};c.paintChildren=function(q){if(q==null)q=this.getChildren();var bc=[];for(var Tb=0;Tb<q.length;Tb++){var Ac=q[Tb];if(Ac.isDomPaint()){bc.push(Ac.dg());b.Bl(Ac);}else{bc.push(Ac.paint());}}return bc.join("");};c.RL=function(s,j){if(this._jsxHg)this.vQ();if(this._jsxUf==null&&s)this._jsxUf=this.T5(j);return this._jsxUf;};c.I9=function(i){this._jsxUf=i;};c.C5=function(){this._jsxHg=true;};c.vQ=function(a){if(a){this.findDescendants(function(q){q.vQ(false);},true,true,false,true);}else{delete this._jsxUf;delete this._jsxHg;}};b.Nn=/(-\S)/gi;b.HM=function(m,l,q){if(l){var u=l.split(";");for(var Vb=0;u.length;Vb++){var P=(u[Vb]+"").trim();if(P=="")return;var wb=P.split(/\s*:\s*/);if(wb&&wb.length==2){var yc=wb[0].replace(b.Nn,function(r,i){return i.substring(1).toUpperCase();});m.style[yc]=wb[1];}}}else{if(q){var kc=["Top","Right","Bottom","Left"];for(var Vb=0;Vb<4;Vb++){var yc=q+kc[Vb];m.style[yc]="";}}}};c.recalcBox=function(k){this.findDescendants(function(o){o.vQ(false);},true,true,false,true);this.J1(this.getParent()?this.getParent().IO(this):null,this.getRendered());if(k){var nb=this.getRendered();if(nb!=null){var Eb=this.RL(true);for(var O=0;O<k.length;O++){if(k[O]=="padding"){b.HM(nb,Eb.N4(),"padding");}else{if(k[O]=="margin"){b.HM(nb,Eb.Q2(),"margin");}else{if(k[O]=="border"){b.HM(nb,Eb.jO(),"border");}}}}}}};c.IO=function(){var wb=this.RL();return wb!=null?{parentwidth:wb.XK(),parentheight:wb.P5()}:{};};c.T5=function(l){return new b.Box({});};c.k7=function(e,r,p){this.B_(e,r,p,1);};c.B_=function(d,a,n,s){if(s==1){this.C5();if(a!=null)n.addRepaint(this);}else{if(s==2){var Gc=this.RL(true,d);if(Gc.recalculate(d,a,n)){if(jsx3.gui.Interactive&&a){var J={parentwidth:Gc.XK(),parentheight:Gc.P5()};this.publish({subject:jsx3.gui.Interactive.AFTER_RESIZE_VIEW,gui:a,implicit:J});}var G=this.getChildren();for(var eb=G.length-1;eb>=0;eb--){var jc=a?a.childNodes[eb]?a.childNodes[eb]:true:null;n.add(G[eb],{parentwidth:Gc.XK(),parentheight:Gc.P5()},jc,true);}}}else{if(s==3){var Gc=this.RL(true,d);if(a)Gc.recalculate(d,a,n);}}}};c.nW=function(r,o,d){var Cb=new b.Queue(d);Cb.add(this,r,o);Cb.start();};c.J1=function(a,q,f){var oc={};oc.add=function(k,j,i){k.yE(this,j,i);};oc.addRepaint=function(k){k.repaint();};oc.isPositional=function(){return f;};oc.add(this,a,q);};c.yE=function(n,d,a){var Hc=this.RL(false);if(Hc==null||Hc.isValidQueue(n)){if(!n.isPositional())this.applyDynamicProperties();this.k7(d,a,n);}else{}};});jsx3.Class.defineClass("jsx3.gui.Painted.Queue",jsx3.lang.Object,null,function(h,g){h.Ad=250;h.SG=0;h.Kt=[];h.HE=true;h.jt=false;h.enableChunking=function(s){h.HE=s;};h.Ze=function(){if(h.HE){if(!h.jt)h.doChunk();}else{h.doChunk();}};h.doChunk=function(){if(h.HE){h.jt=false;if(h.od==null)h.od=(new Date()).getTime();var ib=h.od;var t=(new Date()).getTime();var ab=h.Kt.shift();while(ab!=null&&t<ib+h.Ad){if(ab.zy.length>0){var Wb=ab.zy.shift();if(Wb instanceof Array)Wb[0].yE(ab,Wb[1],Wb[2]);else Wb.repaint();t=(new Date()).getTime();}else{ab.destroy();ab=h.Kt.shift();}}h.od=null;if(ab!=null){h.Kt.unshift(ab);jsx3.sleep(h.doChunk,"jsx3.gui.Painted.queue");h.jt=true;}}else{while(h.Kt.length>0){var ab=h.Kt.shift();while(ab.zy.length>0){var Wb=ab.zy.shift();if(Wb instanceof Array)Wb[0].yE(ab,Wb[1],Wb[2]);else Wb.repaint();}}}};g.init=function(s){this.Gl= ++h.SG;this.zy=[];this.st=s;h.Kt.push(this);};g.add=function(d,l,i,p){if(i===true)i=d.getRendered();this.zy[p?"unshift":"push"]([d,l,i]);};g.addRepaint=function(s,a){this.zy[a?"unshift":"push"](s);};g.start=function(){h.Ze();};g.destroy=function(){delete this.zy;h.Kt.remove(this);};g.isPositional=function(){return this.st;};g.toString=function(){return "{Painted.Queue "+this.Gl+" "+(this.zy!=null?this.zy.length:"-")+"}";};});jsx3.Class.defineClass("jsx3.gui.Painted.Box",jsx3.lang.Object,null,function(p,c){p.Lf=/[^\d^-]*([-]*[\d]*)[^\d^-]*([-]*[\d]*)[^\d^-]*([-]*[\d]*)[^\d^-]*([-]*[\d]*)/;p.JG=/\b([\d])*px/g;p.Pp=["boxtype","tagname","margin","padding","border","left","top","width","height","empty","container"];p.ji=["top","right","bottom","left"];p.il=null;p.yz=0;p.Rw=["","display:-moz-inline-box;","display:inline-block;","display:-moz-inline-box;"];p.getCssFix=function(){return p.Rw[jsx3.html.getMode()];};c.init=function(i){this.styles="";this.attributes="";this.tokenindex=p.yz;this.implicit=i?i:{};this.calculate();};c.paint=function(){var Ac=new Array(2);var gc="<"+this.explicit.tagname+" "+this.attributes;var ob=this.KZ();ob=!jsx3.util.numIsNaN(ob)?"width:"+Math.max(0,ob)+"px;":"";var kb=this.wI();kb=!jsx3.util.numIsNaN(kb)?"height:"+Math.max(0,kb)+"px;":"";var D=this.explicit.empty?"\"/>":"\">";if(this.explicit.boxtype=="box"){var ub=this.O8();ub=jsx3.util.numIsNaN(ub)?"0px;":"left:"+ub+"px;";var dc=this.hH();dc=jsx3.util.numIsNaN(dc)?"0px;":"top:"+dc+"px;";var Eb=this.implicit.omitpos?"":"position:absolute;";Ac[0]=gc+" style=\""+Eb+ob+kb+ub+dc+this.N4()+this.Q2()+this.jO()+this.styles+D;}else{if(this.explicit.boxtype=="relativebox"){var Eb=this.implicit.omitpos?"":"position:relative;";Ac[0]=gc+" style=\""+Eb+this.RA()+ob+kb+this.N4()+this.Q2()+this.jO()+this.styles+D;}else{var ub=this.O8();ub=jsx3.util.numIsNaN(ub)?"":"left:"+ub+"px;";var dc=this.hH();dc=jsx3.util.numIsNaN(dc)?"":"top:"+dc+"px;";var Eb=this.implicit.omitpos?"":"position:relative;";Ac[0]=gc+" style=\""+Eb+ob+kb+ub+dc+this.N4()+this.Q2()+this.jO()+this.styles+D;}}Ac[1]=this.explicit.empty?"":"</"+this.explicit.tagname+">";return Ac;};c.setStyles=function(r){this.styles=r;return this;};c.setAttributes=function(j){this.attributes=j;return this;};c.RA=function(){return this.explicit.container&&(jsx3.html.getMode()==jsx3.html.MODE_FF_STRICT||jsx3.html.getMode()==jsx3.html.MODE_FF_QUIRKS)?"":p.getCssFix();};c.recalculate=function(o,e,j){for(var Ac in o)this.implicit[Ac]=o[Ac];var Gb=this.explicit.clientwidth;var Ub=this.explicit.clientheight;this.calculate();var y,Qb,Ob,Jb;if(e&&e.style){if(j==null||!j.isPositional()){y=this.KZ();if(!isNaN(y)&&y<0)y=0;if(y>=0)e.style.width=y+"px";Ob=this.wI();if(!isNaN(Ob)&&Ob<0)Ob=0;if(Ob>=0)e.style.height=Ob+"px";}if(this.explicit.boxtype=="box"&&!isNaN(this.O8())&&!isNaN(this.hH())){e.style.left=this.O8()+"px";e.style.top=this.hH()+"px";}}return true;};c.calculate=function(){this.explicit={};for(var Wb=0;Wb<p.Pp.length;Wb++){var D=p.Pp[Wb];var eb=this.implicit[D];if((eb==null||eb=="")&&(D=="margin"||D=="padding"||D=="border")){this.explicit[D+"width"]=0;this.explicit[D+"height"]=0;}else{if((eb==null||eb=="")&&this.implicit.boxtype=="box"&&(D=="left"||D=="top")){this.explicit[D]=0;}else{if(eb!=null){this.addProperty(D,eb);}}}}};p.registerServer=function(q,g){var K=q.getEnv("GUIREF");if(K){var X=K.clientWidth;var ob=K.clientHeight;}if(g)jsx3.gui.Event.subscribe(jsx3.gui.Event.RESIZE,q,"onResize");};p.unregisterServer=function(o,i){if(i)jsx3.gui.Event.unsubscribe(jsx3.gui.Event.RESIZE,o,"onResize");};c.addProperty=function(n,e){if(n=="width"||n=="height"){if(typeof(e)=="string"&&e.indexOf("%")>-1)e=parseInt(this.implicit["parent"+n]*(parseInt(e)/100));this.explicit[n]=Number(e);this.explicit["client"+n]=e-this.explicit["padding"+n]-this.explicit["border"+n];if(this.explicit["client"+n]<0)this.explicit["client"+n]=0;}else{if(n=="left"||n=="top"){this.explicit[n]=typeof(e)=="string"&&e.indexOf("%")>-1?parseInt(this.implicit["parent"+(n=="left"?"width":"height")]*(parseInt(e)/100)):Number(e);}else{if(n=="margin"||n=="padding"){e=(e+"").trim();if(e=="")return;var X=e.match(/\s/)?e.match(p.Lf):[null,e,e,e,e];if(!(isNaN(parseInt(X[1]))||isNaN(parseInt(X[2]))||isNaN(parseInt(X[3]))||isNaN(parseInt(X[4])))&&n=="padding"){this.explicit["paddingwidth"]=parseInt(X[2])+parseInt(X[4]);this.explicit["paddingheight"]=parseInt(X[1])+parseInt(X[3]);}else{if(e.indexOf(":")>-1){var Jb=p.AG(e,n);X=Jb.match(p.Lf);if(!(isNaN(parseInt(X[1]))||isNaN(parseInt(X[2]))||isNaN(parseInt(X[3]))||isNaN(parseInt(X[4])))&&n=="padding"){this.explicit["paddingwidth"]=parseInt(X[2])+parseInt(X[4]);this.explicit["paddingheight"]=parseInt(X[1])+parseInt(X[3]);}else{if(n=="padding"){this.explicit["paddingwidth"]=0;this.explicit["paddingheight"]=0;X=[null,0,0,0,0];}}}else{if(n=="padding"){this.explicit["paddingwidth"]=0;this.explicit["paddingheight"]=0;X=[null,0,0,0,0];}}}this.explicit[n]=n+":"+X[1]+"px "+X[2]+"px "+X[3]+"px "+X[4]+"px;";}else{if(n=="border"){e=e.trim();if(e=="")return;if(e.replace(/(^;*)|(;*$)/g,"").search(/(;)|(:)/)==-1){e=e.replace(/(^;*)|(;*$)/g,"");for(var zb=0;zb<2;zb++)e=e+(";"+e);}else{if(e.replace(/(^;*)|(;*$)/g,"").search(/:/)==-1){e=e.replace(/(^;*)|(;*$)/g,"");}}var X=e.match(p.JG);var Qb=e.split(";");if(e.indexOf(":")==-1&&X&&X.length==4){this.explicit["borderwidth"]=parseInt(X[1])+parseInt(X[3]);this.explicit["borderheight"]=parseInt(X[0])+parseInt(X[2]);}else{if(e.indexOf(":")>-1){var Jb=p.rp(e);Qb=Jb.split(";");X=Jb.match(p.JG);if(X!=null&&Qb.length==4){this.explicit["borderwidth"]=parseInt(X[1])+parseInt(X[3]);this.explicit["borderheight"]=parseInt(X[0])+parseInt(X[2]);}else{this.explicit["borderwidth"]=0;this.explicit["borderheight"]=0;Qb=["none"];}}else{this.explicit["borderwidth"]=0;this.explicit["borderheight"]=0;Qb=["none"];}}if(Qb.length==1||Qb[0]==Qb[1]&&Qb[1]==Qb[2]&&Qb[2]==Qb[3]){this.explicit[n]=n+":"+Qb[0]+";";}else{if(Qb.length==4){var db=new Array(4);for(var zb=0;zb<4;zb++){if(Qb[zb].match(/\d+px/))db[zb]=n+"-"+p.ji[zb]+":"+Qb[zb]+";";else db[zb]=n+"-"+p.ji[zb]+":0px;";}this.explicit[n]=db.join("");}}}else{if(n=="tagname"){if(e.search(/input\[(\S*)\]/i)>-1){this.explicit.tagname="input";this.explicit.type=RegExp.$1;}else{this.explicit.tagname=e;}}else{this.explicit[n]=e;}}}}}};c.W8=function(q){if(typeof(this.children)=="undefined")this.children=[];this.children.push(q);};c.pQ=function(s){return this.children!=null?this.children[s]:null;};c.jJ=function(){var Bc=0;var Lb=0;if(typeof(this.explicit.border)=="string"){var rb=this.explicit.border.match(p.JG);Lb=rb?parseInt(rb[rb.length-1]):0;}if(typeof(this.explicit.padding)=="string"){var rb=this.explicit.padding.match(p.Lf);Bc=rb?parseInt(rb[4]):0;}return Lb+Bc;};c.G_=function(){var ac=0;var Y=0;if(typeof(this.explicit.border)=="string"){var Jc=this.explicit.border.match(p.JG);Y=Jc?parseInt(Jc[0]):0;}if(typeof(this.explicit.padding)=="string"){var Jc=this.explicit.padding.match(p.Lf);ac=Jc?parseInt(Jc[1]):0;}return Y+ac;};c.XK=function(){return this.explicit.clientwidth;};c.P5=function(){return this.explicit.clientheight;};c.jU=function(){return this.explicit.width;};c.JV=function(){return this.explicit.height;};c.KZ=function(){return (this.explicit.type&&(this.explicit.type.toUpperCase()=="TEXT"||this.explicit.type.toUpperCase()=="PASSWORD")||this.explicit.tagname=="textarea")&&jsx3.html.getMode()==jsx3.html.MODE_FF_QUIRKS||jsx3.html.getMode()==jsx3.html.MODE_IE_QUIRKS?this.explicit.width:this.explicit.clientwidth;};c.wI=function(){return (this.explicit.type&&(this.explicit.type.toUpperCase()=="TEXT"||this.explicit.type.toUpperCase()=="PASSWORD")||this.explicit.tagname=="textarea")&&jsx3.html.getMode()==jsx3.html.MODE_FF_QUIRKS||jsx3.html.getMode()==jsx3.html.MODE_IE_QUIRKS?this.explicit.height:this.explicit.clientheight;};c.O8=function(){return this.explicit.left;};c.hH=function(){return this.explicit.top;};c.getBoxType=function(){return this.explicit.boxtype;};c.isValidQueue=function(q){if(q.Gl==null)return true;if(this.tokenindex<q.Gl){this.tokenindex=q.Gl;return true;}else{return false;}};c.Q2=function(){return this.explicit.margin?this.explicit.margin:"";};c.N4=function(){return this.explicit.padding?this.explicit.padding:"";};c.jO=function(){return this.explicit.border?this.explicit.border:"";};p.getBody=function(){return document.getElementsByTagName("body")[0];};p.getScrollSize=function(r){if(p.il==null){var J=r||p.getBody();var tc="<div id=\"_jsx3_gui_painted_box_0\" label=\"block\" class=\"jsx30block\" style=\"padding:0px;margin:0px;border-width:0px;position:absolute;width:100px;height:100px;left:-100px;top:-100px;overflow:scroll;\"> </div>";jsx3.html.insertAdjacentHTML(J,"beforeEnd",tc);p.il=100-parseInt(document.getElementById("_jsx3_gui_painted_box_0").clientWidth);}return p.il;};p.getScrollSizeOffset=function(d){var v=p.getScrollSize();return jsx3.html.getScrollSizeOffset(v,d);};p.AG=function(h,o){var pc="not matched";var dc="0";var jc="0";var Mc="0";var jb="0";var Wb=/(\s*(padding|padding-top|padding-right|padding-bottom|padding-left)\s*:\s*(\d+)(px)?\s*((\d+)(px)?)?\s*((\d+)(px)?)?\s*((\d+)(px)?)?\s*;)+/ig;var fc=/(\s*(margin|margin-top|margin-right|margin-bottom|margin-left)\s*:\s*(-*\d+)(px)?\s*((-*\d+)(px)?)?\s*((-*\d+)(px)?)?\s*((-*\d+)(px)?)?\s*;)+/ig;var Ec=o=="padding"?Wb:fc;var yc=h.split(";");if(yc){try{for(var bb=0;bb<yc.length;bb++){var yb=yc[bb]+";";var Nc=yb.search(Ec);if(Nc>0){var Yb={};Yb.desc="Missing Semicolon";Yb.cause=yc[bb];throw Yb;}else{if(Nc==-1){if(yc[bb].search(/[^\s*]/i)>=0){var Yb={};Yb.desc="Mismatch Rule";Yb.cause=yc[bb];throw Yb;}}else{pc=yb.replace(Ec,function(j,i,g,f,e,d,b,a,s,r,q,n,m){if(g.match(/-top/)){dc=f==null?"0":f;}else{if(g.match(/-right/)){jc=f==null?"0":f;}else{if(g.match(/-bottom/)){Mc=f==null?"0":f;}else{if(g.match(/-left/)){jb=f==null?"0":f;}else{dc=jsx3.util.strEmpty(f)?"0":f;jc=jsx3.util.strEmpty(b)?dc:b;Mc=jsx3.util.strEmpty(r)?dc:r;jb=jsx3.util.strEmpty(m)?jc:m;}}}}return dc+" "+jc+" "+Mc+" "+jb;});pc=dc+" "+jc+" "+Mc+" "+jb;}}}}catch(Kc){if(Kc.desc=="Missing Semicolon")pc="Migration broken. Semicolon is missing: "+Kc.cause;if(Kc.desc=="Mismatch Rule")pc="Migration broken. Dosen't match the regular expression. \nPlease control the rule '"+Kc.cause+"'.\nPlease check if all units are in px.\nPlease check if a colon is missing.\n"+"Please check the rule name";return pc;}}return pc;};p.rp=function(j){var D="not matched";var W=["0px","solid",""];var K=["0px","solid",""];var ac=["0px","solid",""];var x=["0px","solid",""];var Mb="";var bb="";var Sb="";var lc=/border\s*.*[^;]\s*border/ig;var wc=/^(\d+)(px)?$/i;var Nc=/^(dashed|dotted|double|groove|hidden|inset|none|outset|ridge|solid)$/i;var rb=/^(#[a-zA-Z0-9]{6}|rgb\s*\(\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)|(AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenrod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|Goldenrod|Gray|Green|GreenYellow|Honeydew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCora|LightCyan|LightGoldenrodYellow|LightGreen|LightGrey|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlu|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquamarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenrod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|Seashell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen))$/i;var Hb=j.split(";");if(Hb){for(var Y=0;Y<Hb.length;Y++){try{if(Hb[Y].match(lc)){var dc={};dc.desc="Missing Semicolon";dc.cause=Hb[Y];throw dc;}var Ic=Hb[Y].split(":");if(Ic.length==2){var wb=Ic[1].split(" ");for(var fc=0;fc<wb.length;fc++){if(wb[fc]!=""){if(wb[fc].match(wc)){Mb=wb[fc].replace(wc,function(h,g,f,e){return g;});Mb=Mb+"px";}else{if(wb[fc].match(Nc)){bb=wb[fc];}else{if(wb[fc].match(rb)){Sb=wb[fc];}else{var dc={};dc.desc="Mismatch Width Color Style";dc.cause=wb[fc];throw dc;}}}if(Ic[0].match(/^\s*border\s*$/)){W=[Mb,bb,Sb];K=[Mb,bb,Sb];ac=[Mb,bb,Sb];x=[Mb,bb,Sb];}else{if(Ic[0].match(/^\s*border-top\s*$/)){W[0]=Mb;W[1]=bb;W[2]=Sb;}else{if(Ic[0].match(/^\s*border-bottom\s*$/)){ac[0]=Mb;ac[1]=bb;ac[2]=Sb;}else{if(Ic[0].match(/^\s*border-right\s*$/)){K[0]=Mb;K[1]=bb;K[2]=Sb;}else{if(Ic[0].match(/^\s*border-left\s*$/)){x[0]=Mb;x[1]=bb;x[2]=Sb;}else{if(Ic[0].match(/^\s*border-width\s*$/)){W[0]=Mb;K[0]=Mb;ac[0]=Mb;x[0]=Mb;}else{if(Ic[0].match(/^\s*border-top-width\s*$/)){W[0]=Mb;}else{if(Ic[0].match(/^\s*border-bottom-width\s*$/)){ac[0]=Mb;}else{if(Ic[0].match(/^\s*border-right-width\s*$/)){K[0]=Mb;}else{if(Ic[0].match(/^\s*border-left-width\s*$/)){x[0]=Mb;}else{if(Ic[0].match(/^\s*border-style\s*$/)){W[1]=bb;K[1]=bb;ac[1]=bb;x[1]=bb;}else{if(Ic[0].match(/^\s*border-top-style\s*$/)){W[1]=bb;}else{if(Ic[0].match(/^\s*border-bottom-style\s*$/)){ac[1]=bb;}else{if(Ic[0].match(/^\s*border-right-style\s*$/)){K[1]=bb;}else{if(Ic[0].match(/^\s*border-left-style\s*$/)){x[1]=bb;}else{if(Ic[0].match(/^\s*border-color\s*$/)){W[2]=Sb;K[2]=Sb;ac[2]=Sb;x[2]=Sb;}else{if(Ic[0].match(/^\s*border-top-color\s*$/)){W[2]=Sb;}else{if(Ic[0].match(/^\s*border-bottom-color\s*$/)){ac[2]=Sb;}else{if(Ic[0].match(/^\s*border-right-color\s*$/)){K[2]=Sb;}else{if(Ic[0].match(/^\s*border-left-color\s*$/)){x[2]=Sb;}else{var dc={};dc.desc="Mismatch Name";dc.cause=Ic[0];throw dc;}}}}}}}}}}}}}}}}}}}}}}}else{if(Hb[Y].search(/[^\s*]/i)>=0){var dc={};dc.desc="Missing Colon";dc.cause=Hb[Y];throw dc;}}}catch(Kc){if(Kc.desc=="Missing Semicolon")D="Migration broken. Semicolon is missing: "+Kc.cause;if(Kc.desc=="Mismatch Width Color Style")D="Migration broken. Dosen't match the regular expression. \nPlease control the rule '"+Kc.cause+"'.\nPlease check if all units are in px.\nPlease control the type of the border.\nPlease control the color";if(Kc.desc=="Mismatch Name")D="Migration broken. Rule name "+Kc.cause+" must match one of these rule names:\n border, border-left, ...";if(Kc.desc=="Missing Colon")D="Migration broken. Colon missing: "+Kc.cause;return D;}}D=W[0]+" "+W[1]+" "+W[2]+";"+K[0]+" "+K[1]+" "+K[2]+";"+ac[0]+" "+ac[1]+" "+ac[2]+";"+x[0]+" "+x[1]+" "+x[2];}return D;};c.toString=function(){var Tb="IMPLICIT:\n";for(var P in this.implicit)Tb=Tb+(P+": "+this.implicit[P]+"\n");Tb=Tb+"\nEXPLICIT:\n";for(var P in this.explicit)Tb=Tb+(P+": "+this.explicit[P]+"\n");return Tb;};});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -