📄 application.js
字号:
el=el.parentNode;if(el==null)return;target=el._biComponent;}
if(target==null)
return;var enabledAncestor=null;var c=target;while(c)
{if(!c.getEnabled())
enabledAncestor=null;else if(enabledAncestor==null)
enabledAncestor=c;c=c._parent;}
target=enabledAncestor;if(target==null)
return;var biEvent=new BiMouseEvent(type,e);BiMouseEvent._storeEventState(biEvent);switch(type)
{case"mousedown":(new BiPopupManager).hideAutoHiding(target);var tmp=target;while(tmp!=null&&!tmp.getCanFocus())
tmp=tmp._parent;if(tmp!=null&&tmp.getCanFocus())
{if(BiBrowserCheck.ie)
{try
{tmp._element.setActive();}
catch(ex){}}
else {}}
break;case"mouseover":try
{var tmp=e.relatedTarget||e.fromElement;while(tmp!=null&&tmp._biComponent==null)
tmp=tmp.parentNode;if(tmp&&tmp._biComponent==target)
{biEvent.dispose();return;}}catch(ex){}
break;case"mouseout":try
{var tmp=e.relatedTarget||e.toElement;while(tmp!=null&&tmp._biComponent==null)
tmp=tmp.parentNode;if(tmp&&tmp._biComponent==target)
{biEvent.dispose();return;}}catch(ex){}
break;}
var rv=target.dispatchEvent(biEvent);switch(type)
{case"mouseover":(new BiToolTipManager).handleMouseOver(biEvent);break;case"mouseout":(new BiToolTipManager).handleMouseOut(biEvent);break;case"contextmenu":if(!rv)break;var cm;while(target&&!(cm=target.getContextMenu()))
target=target._parent;if(cm)
{cm._component=target;cm.setLocation(biEvent.getScreenX(),biEvent.getScreenY());cm._component=target;cm.setVisible(true);}
break;}
biEvent.dispose();return rv;};_p._onkeyevent=function(e)
{if(!e)
e=this._window.event;var el=this._mozActiveElement||e.target||e.srcElement;while(el!=null&&el._biComponent==null)
el=el.parentNode;if(el==null)return;var target=el._biComponent;while(target&&!target.getEnabled())
target=target._parent;if(target==null)
return;return target.dispatchEvent(new BiKeyboardEvent(e.type,e));};_p._onactivateevent=function(e){if(!e)
e=this._window.event
var el=e.target||e.srcElement;while(el!=null&&el._biComponent==null)
el=el.parentNode;if(el==null)return;var target=el._biComponent;while(target!=null&&!target.getCanFocus())
target=target._parent;if(target==null)return;this._setFocusedComponent(target);};_p._setFocusedComponent=function(oComponent)
{if(this._lastFocused==oComponent)
return;var blurComp=this._lastFocused;var focusComp=oComponent;while(blurComp&&blurComp._anonymous)
blurComp=blurComp.getParent();while(focusComp&&focusComp._anonymous)
focusComp=focusComp.getParent();if(blurComp==focusComp)
return;if(oComponent)
{var fr=oComponent.getFocusRoot();fr._activeComponent=oComponent;}
else if(this._lastFocused)
{var fr=this._lastFocused.getFocusRoot();fr._activeComponent=null;}
this._lastFocused=oComponent;(new BiPopupManager).hideAutoHiding(focusComp);if(blurComp)
{blurComp._focused=false;var e=new BiFocusEvent("focusout");e._relatedTarget=focusComp;blurComp.dispatchEvent(e);}
if(focusComp)
{focusComp._focused=true;var e=new BiFocusEvent("focusin");e._relatedTarget=blurComp;focusComp.dispatchEvent(e);}
if(blurComp)
{var e=new BiFocusEvent("blur");e._relatedTarget=focusComp;blurComp.dispatchEvent(e);(new BiToolTipManager).handleBlur(e);}
if(focusComp)
{var e=new BiFocusEvent("focus");e._relatedTarget=blurComp;focusComp.dispatchEvent(e);(new BiToolTipManager).handleFocus(e);}
if(BiBrowserCheck.moz&&blurComp)
blurComp._blurComponent();};_p._onwindowblur=function(e)
{if(!BiBrowserCheck.moz)
(new BiPopupManager).hideAutoHiding();};_p._onresizeevent=function(e)
{var c=this._window.document.body._biComponent;c.dispatchEvent(new BiEvent("resize"));};_p._onselectevent=function(e){if(!e)
e=this._window.event;var el=e.target||e.srcElement;while(el!=null&&el._biComponent==null)
el=el.parentNode;if(el==null)return;var target=el._biComponent;if(!target.getCanSelect())
{if(BiBrowserCheck.moz)
e.preventDefault();e.returnValue=false;}};_p._ondragevent=function(e){if(!e)
e=this._window.event;if((e.target||e.srcElement).tagName=="IMG")
this._onselectevent();};_p.setCaptureComponent=function(oComponent){this._captureComponent=oComponent;};_p.dispose=function(){if(this._disposed)return;BiObject.prototype.dispose.call(this);if(this._window){this.detachMouseEvents();this.detachKeyboardEvents();var doc=this._window.document;doc.body.onselect=doc.onselectstart=doc.onselectionchange=doc.ondragstart=doc.body.onactivate=null;this._window.onblur=null;if(BiBrowserCheck.moz)
{window.removeEventListener("resize",this.__onresizeevent,false);}}
this.__onmouseevent=this.__onkeyevent=this.__onselectevent=this.__onwindowblur=this.__ondragevent=this.__onactivateevent=this.__onresizeevent=null;this._mozActiveElement=null;};_p._mozOnFocus=function(e,c,el)
{var old=this._mozActiveElement;this._mozActiveElement=el;this._mozUpdateFocusVisuals(el);if(old&&old!=el)
this._mozUpdateFocusVisuals(old);this._setFocusedComponent(c);if(e)
e.stopPropagation();};_p._mozOnBlur=function(e,c,el)
{if(this._mozActiveElement==el)
this._mozActiveElement=null;this._mozUpdateFocusVisuals(el);};_p._mozUpdateFocusVisuals=function(el)
{if(el==this._mozActiveElement)
el.setAttribute("bi-moz-focused","true");else el.removeAttribute("bi-moz-focused");};function BiEvent(sType){BiObject.call(this);this._type=sType;}
var _p=BiEvent.prototype=new BiObject;_p._className="BiEvent";_p._bubbles=false;_p._propagationStopped=true;_p._defaultPrevented=false;BiEvent.prototype.getType=function(){return this._type;};BiEvent.prototype.getTarget=function(){return this._target;};BiEvent.prototype.getCurrentTarget=function(){return this._currentTarget;};BiEvent.prototype.getBubbles=function(){return this._bubbles;};_p.initDispatch=function(){};_p.stopPropagation=function(){this._propagationStopped=true;};_p.preventDefault=function(){this._defaultPrevented=true;};_p.dispose=function(){this._target=null;this._currentTarget=null;};_p.getDefaultPrevented=function(){return this._defaultPrevented;};function BiErrorEvent(sType,oException){BiEvent.call(this,sType);this._exception=oException;}
var _p=BiErrorEvent.prototype=new BiEvent;_p._className="BiErrorEvent";BiErrorEvent.prototype.getException=function(){return this._exception;};_p.dispose=function(){BiEvent.prototype.dispose.call(this);this._exception=null;};function BiMouseEvent(sType,oEvent){BiEvent.call(this,sType);this._event=oEvent;}
var _p=BiMouseEvent.prototype=new BiEvent;_p._className="BiMouseEvent";_p._bubbles=true;_p._propagationStopped=false;if(BiBrowserCheck.ie)
{BiMouseEvent.LEFT=1;BiMouseEvent.RIGHT=2;BiMouseEvent.MIDDLE=4;}
else {BiMouseEvent.LEFT=0;BiMouseEvent.MIDDLE=1;BiMouseEvent.RIGHT=2;}
_p.getClientX=function(){return this._event.clientX;};_p.getClientY=function(){return this._event.clientY;};_p.getScreenX=function(){return this._event.screenX;};_p.getScreenY=function(){return this._event.screenY;};_p.getOffsetX=function(){return this.getScreenX()-this.getTarget()._getScreenClientArea().left;};_p.getOffsetY=function(){return this.getScreenY()-this.getTarget()._getScreenClientArea().top;};_p.getCtrlKey=function(){return this._event.ctrlKey;};_p.getShiftKey=function(){return this._event.shiftKey;};_p.getAltKey=function(){return this._event.altKey;};_p.getRelatedTarget=function()
{var relEl;if(BiBrowserCheck.ie)
{if(this._type=="mouseover")
relEl=this._event.fromElement;else if(this._type=="mouseout")
relEl=this._event.toElement;}
else relEl=this._event.relatedTarget;try
{while(relEl!=null&&relEl._biComponent==null)
relEl=relEl.parentNode;}
catch(ex)
{return null;}
if(relEl==null)
return null;return relEl._biComponent;};_p.getButton=function(){return this._event.button;};_p.getWheelDelta=function()
{if(BiBrowserCheck.ie)
return this._event.wheelDelta?this._event.wheelDelta/40:0;else {var v=this._event.detail||0;if(v>1000)
v=3;else if(v< -1000)
v= -3
return-v;}};_p.getTarget=function()
{var el=this._event.target||this._event.srcElement;while(el!=null&&el._biComponent==null)
el=el.parentNode;return el==null?this._target:el._biComponent||this._target;};_p.preventDefault=function()
{this._defaultPrevented=true;if(BiBrowserCheck.moz)
this._event.preventDefault();this._event.returnValue=false;};_p.dispose=function(){BiEvent.prototype.dispose.call(this);this._event=null;};BiMouseEvent._storeEventState=function(biEvent)
{BiMouseEvent._screenX=biEvent.getScreenX();BiMouseEvent._screenY=biEvent.getScreenY();BiMouseEvent._clientX=biEvent.getClientX();BiMouseEvent._clientY=biEvent.getClientY();BiMouseEvent._button=biEvent.getButton();};BiMouseEvent.getScreenX=function(){return BiMouseEvent._screenX;};BiMouseEvent.getScreenY=function(){return BiMouseEvent._screenY;};BiMouseEvent.getClientX=function(){return BiMouseEvent._clientX;};BiMouseEvent.getClientY=function(){return BiMouseEvent._clientY;};BiMouseEvent.getButton=function(){return BiMouseEvent._button;};BiMouseEvent._screenX=BiMouseEvent._screenY=BiMouseEvent._clientX=BiMouseEvent._clientY=BiMouseEvent._button=0;if(BiBrowserCheck.moz)
BiMouseEvent._button= -1;function BiKeyboardEvent(sType,oEvent){BiEvent.call(this,sType);this._event=oEvent;this._keyCode=oEvent.keyCode||oEvent.charCode;}
var _p=BiKeyboardEvent.prototype=new BiEvent;_p._className="BiKeyboardEvent";_p._bubbles=true;_p._propagationStopped=false;_p.getCtrlKey=function(){return this._event.ctrlKey;};_p.getShiftKey=function(){return this._event.shiftKey;};_p.getAltKey=function(){return this._event.altKey;};_p.getKeyCode=function(){return this._keyCode;};_p.preventDefault=function()
{this._defaultPrevented=true;if(BiBrowserCheck.moz)
this._event.preventDefault();this._event.returnValue=false;if(BiBrowserCheck.ie)
this._event.keyCode=0;};_p.dispose=function(){BiEvent.prototype.dispose.call(this);this._event=null;};BiKeyboardEvent.ENTER=13;BiKeyboardEvent.TAB=9;BiKeyboardEvent.UP=38;BiKeyboardEvent.DOWN=40;BiKeyboardEvent.LEFT=37;BiKeyboardEvent.RIGHT=39;BiKeyboardEvent.SPACE=32;BiKeyboardEvent.SHIFT=16;BiKeyboardEvent.CTRL=17;BiKeyboardEvent.CONTROL=17;BiKeyboardEvent.ALT=18;BiKeyboardEvent.ESC=27;BiKeyboardEvent.F1=112;BiKeyboardEvent.F2=113;BiKeyboardEvent.F3=114;BiKeyboardEvent.F4=115;BiKeyboardEvent.F5=116;BiKeyboardEvent.F6=117;BiKeyboardEvent.F7=118;BiKeyboardEvent.F8=119;BiKeyboardEvent.F9=120;BiKeyboardEvent.F10=121;BiKeyboardEvent.F11=122;BiKeyboardEvent.F12=123;BiKeyboardEvent.DEL=46;BiKeyboardEvent.DELETE=46;BiKeyboardEvent.BACKSPACE=8;BiKeyboardEvent.INSERT=45;BiKeyboardEvent.HOME=36;BiKeyboardEvent.END=35;BiKeyboardEvent.PAGE_UP=33;BiKeyboardEvent.PAGE_DOWN=34;BiKeyboardEvent.NUM_LOCK=144;BiKeyboardEvent.NUMPAD0=96;BiKeyboardEvent.NUMPAD1=97;BiKeyboardEvent.NUMPAD2=98;BiKeyboardEvent.NUMPAD3=99;BiKeyboardEvent.NUMPAD4=100;BiKeyboardEvent.NUMPAD5=101;BiKeyboardEvent.NUMPAD6=102;BiKeyboardEvent.NUMPAD7=103;BiKeyboardEvent.NUMPAD8=104;BiKeyboardEvent.NUMPAD9=105;BiKeyboardEvent.NUMPAD_DIVIDE=111;BiKeyboardEvent.NUMPAD_MULTIPLY=106;BiKeyboardEvent.NUMPAD_MINUS=109;BiKeyboardEvent.NUMPAD_PLUS=107;function BiFocusEvent(sType){BiEvent.call(this,sType);if(sType=="focusin"||sType=="focusout"){this._bubbles=true;this._propagationStopped=false;}}
var _p=BiFocusEvent.prototype=new BiEvent;_p._className="BiFocusEvent";BiFocusEvent._lastFocused=null;_p.initDispatch=function(){};BiFocusEvent.prototype.getRelatedTarget=function(){return this._relatedTarget;};function BiXmlHttp()
{if(window.XMLHttpRequest)
return new XMLHttpRequest();else if(window.ActiveXObject)
return new ActiveXObject(BiXmlHttp._activeXName);}
BiXmlHttp.create=function(){return new BiXmlHttp();};function BiXmlDocument(){if(document.implementation&&document.implementation.createDocument)
{var doc=document.implementation.createDocument("","",null);doc.addEventListener("load",function(e){this.readyState=4;},false);doc.readyState=4;return doc;}
else if(window.ActiveXObject)
return new ActiveXObject(BiXmlDocument._activeXName);}
BiXmlDocument.create=function(){return new BiXmlDocument();};BiXmlDocument._biGetActiveXName=BiXmlHttp._biGetActiveXName=function(sType){var servers=["MSXML2","Microsoft","MSXML","MSXML3"];var o;for(var i=0;i<servers.length;i++){try{o=new ActiveXObject(servers[i]+"."+sType);return servers[i]+"."+sType;}
catch(ex){};}
throw new Error("Could not find an installed XML parser");};if(window.ActiveXObject)
{BiXmlDocument._activeXName=BiXmlDocument._biGetActiveXName("DomDocument");BiXmlHttp._activeXName=BiXmlHttp._biGetActiveXName("XmlHttp");}
function BiWebService(){var el=document.createElement("meta");if(el.addBehavior)
{el.addBehavior(application.getPath()+""+BiWebService.HTC_PATH);document.getElementsByTagName("head")[0].appendChild(el);return el;}
throw new Error("Not yet implemented");}
BiWebService.HTC_PATH="js/biwebservice.htc";BiWebService.create=function(){return new BiWebService;};if(window.XMLHttpRequest)
{XMLDocument.prototype.__realLoad=XMLDocument.prototype.load;XMLDocument.prototype.load=function(sUri)
{this.readyState=0;this.__realLoad(sUri);};XMLDocument.prototype.__defineSetter__("onreadystatechange",function(f)
{if(this._onreadystatechange)
this.removeEventListener("load",this._onreadystatechange,false);this._onreadystatechange=f;if(f)
this.addEventListener("load",f,false);return f;});XMLDocument.prototype.__defineGetter__("onreadystatechange",function()
{return this._onreadystatechange;});XMLDocument.prototype.loadXML=function(s)
{var doc2=(new DOMParser).parseFromString(s,"text/xml");while(this.hasChildNodes())
this.removeChild(this.lastChild);var cs=doc2.childNodes;var l=cs.length;for(var i=0;i<l;i++)
this.appendChild(this.importNode(cs[i],true));};BiXmlDocument._mozHasParseError=function(oDoc)
{return!oDoc.documentElement||oDoc.documentElement.localName=="parsererror"&&oDoc.documentElement.getAttribute("xmlns")=="http://www.mozilla.org/newlayout/xml/parsererror.xml";};XMLDocument.prototype.__defineGetter__("parseError",function()
{var hasError=BiXmlDocument._mozHasParseError(this);var res={errorCode:0,filepos:0,line:0,linepos:0,reason:"",srcText:"",url:""};if(hasError)
{res.errorCode= -1;try
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -