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

📄 application.js

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 JS
📖 第 1 页 / 共 5 页
字号:
{var n=Number(s.replace(/\%/g,""));return n/100*(sAxis=="x"?screen.availWidth:screen.availHeight);}
return s;};BiLauncher._getAttr=function(el,name,def,tp)
{var res;if(!el||!el.getAttribute(name))
res=def;else res=el.getAttribute(name);if(tp)
return BiLauncher._toPixel(res,tp);return res;};function biExec(sRootPath,sAdfRelPath,bUseCurrentWindow)
{var args=[sAdfRelPath];for(var i=3;i<arguments.length;i++)
args.push(arguments[i]);var l=new BiLauncher(sRootPath);l.setAdfPath(sAdfRelPath);l.setNewWindow(!bUseCurrentWindow);var ok=l.launch.apply(l,args);if(!ok)
alert(l.getErrorMessage())
return ok;}
function BiTextLoader(){if(_biInPrototype)return;BiEventTarget.call(this);this._xmlHttp=new BiXmlHttp();var oThis=this;this.__onreadystatechange=function(){oThis._onreadystatechange();};}
_p=_biExtend(BiTextLoader,BiEventTarget,"BiTextLoader");_p._method="GET";_p._async=false;_p._uri=null;_p._user="";_p._password="";_p._loadCount=0;BiTextLoader.load=function(oUri){var tl=new BiTextLoader;tl.load(oUri);var s=tl.getText();tl.dispose();return s;};BiTextLoader.prototype.getMethod=function(){return this._method;};BiTextLoader.prototype.setMethod=function(v){this._method=v;};BiTextLoader.prototype.getUri=function(){return this._uri;};BiTextLoader.prototype.getAsync=function(){return this._async;};BiTextLoader.prototype.setAsync=function(v){this._async=v;};BiTextLoader.prototype.getUser=function(){return this._user;};BiTextLoader.prototype.setUser=function(v){this._user=v;};BiTextLoader.prototype.getPassword=function(){return this._password;};BiTextLoader.prototype.setPassword=function(v){this._password=v;};_p.setUri=function(oUri)
{if(oUri instanceof BiUri)
this._uri=oUri;else this._uri=new BiUri(application.getAdfPath(),oUri);};_p.load=function(oUri){this.open("GET",oUri||this._uri,this._async);this.send();};_p.post=function(oUri,oXmlDocument){this.open("POST",oUri||this._uri,this._async);this.send(oXmlDocument);};_p.open=function(sMethod,oUri,bAsync,sUser,sPassword){this._method=sMethod;this.setUri(oUri);this._async=bAsync!=null?bAsync:true;this._user=sUser;this._password=sPassword;this._xmlHttp.abort();this._xmlHttp.onreadystatechange=this.__onreadystatechange;this._xmlHttp.open(this._method,String(this._uri),this._async,this._user,this._password);};_p.send=function(oObject){this._loadCount=0;this._xmlHttp.send(oObject);};_p.abort=function(){this._xmlHttp.abort();};_p.getLoaded=function(){return this._xmlHttp.readyState==4;};_p.getLoading=function(){return this._xmlHttp.readyState<4;};_p.getText=function(){return String(this._xmlHttp.responseText);};_p.getXmlHttp=function(){return this._xmlHttp;};_p.getError=function()
{if(this.getUri().getScheme()=="file"||this.getUri().getScheme()=="jar")
{return this._xmlHttp.status!=0;}
return this._xmlHttp.status!=200;};_p.dispose=function(){if(this._disposed)return;BiEventTarget.prototype.dispose.call(this);this.__onreadystatechange=null;delete this._xmlHttp.onreadystatechange;this._xmlHttp=null;};_p._onreadystatechange=function()
{if(this._xmlHttp&&this._xmlHttp.readyState==4)
{if(this._loadCount==0)
{this._loadCount++;this.dispatchEvent(new BiEvent("load"));application.flushLayoutQueue();}}};function BiXmlLoader(){if(_biInPrototype)return;BiTextLoader.call(this);this.addEventListener("load",BiXmlLoader._onLoad);}
_p=_biExtend(BiXmlLoader,BiTextLoader,"BiXmlLoader");_p._disposed=false;BiXmlLoader.load=function(oUri){var xl=new BiXmlLoader();xl.load(oUri);var doc=xl.getDocument();xl.dispose();return doc;};_p.getDocument=function(){return this.getXmlHttp().responseXML;};_p.getError=function(){return BiTextLoader.prototype.getError.call(this)||this.getDocument().parseError.errorCode!=0;};BiXmlLoader._onLoad=function(e)
{var xl=e.getTarget();if(BiBrowserCheck.ie&&xl.getUri().getScheme()=="file"&&!xl.getError())
{var s=xl.getText();s=s.replace(/<\?xml[^\?]*\?>/,"");var d=xl.getXmlHttp().responseXML;d.loadXML(s);}};function BiScriptLoaderQueue(){if(_biInPrototype)return;BiEventTarget.call(this);this._items=[];this._uris={};};_p=_biExtend(BiScriptLoaderQueue,BiEventTarget,"BiScriptLoaderQueue");_p._async=true;BiScriptLoaderQueue.prototype.getAsync=function(){return this._async;};BiScriptLoaderQueue.prototype.setAsync=function(v){this._async=v;};_p._allExecuted=true;_p.add=function(oUri)
{var sUri=String(oUri);if(sUri in this._uris)
return;this._allExecuted=false;var tl=new BiTextLoader();tl.setUri(oUri);tl.addEventListener("load",this._onProgress,this);this._uris[sUri]=true;this._items.push({src:oUri,textLoader:tl});};_p.addInline=function(sText){this._allExecuted=false;this._items.push({text:sText});};_p.load=function()
{if(this._getAllLoaded())
this._onAllLoaded();else {for(var i=0;i<this._items.length;i++)
{if(this._items[i].textLoader)
{this._items[i].textLoader.setAsync(this._async);this._items[i].textLoader.load();}}
if(this._getAllLoaded())
this._onAllLoaded();}};_p.abort=function(){for(var i=0;i<this._items.length;i++){if(this._items[i].textLoader)
this._items[i].textLoader.abort();}};_p.getLoaded=function()
{if(this._allExecuted)
return true;return this._allExecuted&&this._getAllLoaded()};_p._getAllLoaded=function(){var items=this._items;var tl;for(var i=0;i<items.length;i++){tl=items[i].textLoader;if(tl&&!tl.getLoaded())
return false;}
return true;};_p.getLoadedCount=function(){if(this.getLoaded())
return this.getScriptCount();var n=0;var items=this._items;var tl;for(var i=0;i<items.length;i++){tl=items[i].textLoader;if(!tl||tl.getLoaded())
n++}
return n;};_p.getScriptCount=function(){return this._items.length;};_p._onProgress=function(e){if(e.getTarget().getError()){throw new Error("Error loading file \""+e.getTarget().getUri()+"\"");}
if(this._getAllLoaded())
this._onAllLoaded();else this.dispatchEvent(new BiEvent("progress"));};_p._onAllLoaded=function(){if(this._allExecuted||this._errorLoading)return;this.dispatchEvent(new BiEvent("progress"));var items=this._items;for(var i=0;i<items.length;i++){if(items[i].textLoader){try{this.execScript(items[i].textLoader.getText());}catch(ex){this._errorLoading=true;ex.uri=items[i].textLoader.getUri();throw ex;}}
else{try{this.execScript(items[i].text);}catch(ex){this._errorLoading=true;ex.text=items[i].text;throw ex;}}}
this._allExecuted=true;this.dispatchEvent(new BiEvent("load"));this._uris={};};_p.dispose=function(){if(this._disposed)return;BiEventTarget.prototype.dispose.call(this);if(this._items){for(var i=0;i<this._items.length;i++){if(this._items[i].textLoader)
this._items[i].textLoader.dispose();this._items[i].textLoader=null;this._items[i].text=null;this._items[i]=null;}}};_p.execScript=function(s){if(window.execScript){window.execScript(s);}else{window.eval(s);}};function BiXmlResourceParser()
{if(_biInPrototype)return;BiXmlLoader.call(this);this._componentsById={};}
_p=_biExtend(BiXmlResourceParser,BiXmlLoader,"BiXmlResourceParser");_p._disposed=false;_p._autoNameMapping=false;BiXmlResourceParser.prototype.getAutoNameMapping=function(){return this._autoNameMapping;};BiXmlResourceParser.prototype.setAutoNameMapping=function(v){this._autoNameMapping=v;};_p._rootNode=null;BiXmlResourceParser.getClassFromUri=function(oUri)
{return BiXmlResourceParser.getClassFromDocument(BiXmlLoader.load(oUri));};BiXmlResourceParser.getClassFromDocument=function(oDoc)
{return BiXmlResourceParser.getClassFromNode(oDoc.documentElement);};BiXmlResourceParser.getClassFromNode=function(oNode)
{if(oNode==null||oNode.nodeType!=1)
return null;var tagName=oNode.localName||oNode.baseName;var constr=window["Bi"+tagName]||window[tagName];if(typeof constr=="function")
{var p=new constr;var newConstr=function(){constr.apply(this,arguments);this._xmlResourceParser=new BiXmlResourceParser;this._xmlResourceParser.setRootNode(oNode);this._xmlResourceParser.processAttributes(this,oNode);this._xmlResourceParser.processChildNodes(this,oNode);if(typeof p.initialize=="function")
p.initialize.apply(this,arguments);};newConstr.prototype=p;p.dispose();p._disposed=false;p.dispose=function()
{if(this.getDisposed())return;constr.prototype.dispose.call(this);this._xmlResourceParser.dispose();};p.getComponentById=function(sId)
{return this._xmlResourceParser.getComponentById(sId);};p.getXmlResourceParser=function()
{return this._xmlResourceParser;};p.initialize=p.initialize||function(){};application.addEventListener("dispose",function(){newConstr=null;oNode=null;});return newConstr;}
throw new Error("BiXmlResourceParser getClassFromNode. Cannot create object from \""+oNode.tagName+"\"");};BiXmlResourceParser.prototype.setRootNode=function(v){this._rootNode=v;};_p.getRootNode=function()
{if(this._rootNode)
return this._rootNode;else {if(this.getLoaded())
return this.getDocument();return null;}};_p.fromNode=function(oNode)
{if(oNode==null||oNode.nodeType!=1)
return null;var id=oNode.getAttribute("id");var c;if(id&&(c=this._componentsById[id]))
{if(c.getDisposed())
{this._removeObject(c);}
else {return c;}}
var tagName=oNode.localName||oNode.baseName;var o;var constr=window["Bi"+tagName]||window[tagName];if(typeof constr=="function")
{o=new constr;this.processAttributes(o,oNode);this.processChildNodes(o,oNode);return o;}
throw new Error("BiXmlResourceParser fromNode. Cannot create object from \""+oNode.tagName+"\"");};_p._removeObject=function(o)
{var id=o.getId();delete this._componentsById[id];if(this._autoNameMapping)
{try
{delete window[id];}
catch(ex)
{window[id]=null;}}};_p._addObject=function(o,id)
{this._componentsById[id]=o;if(this._autoNameMapping)
{if(id in window&&window[id]!=o)
throw new Error("Naming conflict. \""+id+"\" is already in use or reserved.");window[id]=o;}
var orgDispose=o.dispose;var oResParser=this;o.dispose=function()
{oResParser._removeObject(this);orgDispose.call(this);o.dispose=orgDispose;orgDispose=null;oResParser=null;};};_p.processAttributes=function(o,oNode)
{var attrs=oNode.attributes;var l=attrs.length;var name,value,parts,className,setterName,constr;for(var i=0;i<l;i++)
{name=attrs[i].nodeName;value=attrs[i].nodeValue;if(name=="xmlns"||name.substr(0,4)=="xml:"||name.substr(0,6)=="xmlns:")
continue;if(name.indexOf(".")>0)
{parts=name.split(".");className=parts[0];setterName="set"+parts[1].capitalize();constr=window["Bi"+className]||window[className];if(typeof constr=="function")
{if(typeof constr[setterName]=="function")
{constr[setterName](o,value);}
else throw new Error("No such attached property \""+name+"\"");}
else throw new Error("No such class: \""+className+"\"");}
else o.setAttribute(name,value,this);if(name=="id")
this._addObject(o,value);}};_p.processChildNodes=function(obj,oNode)
{var tagName=oNode.localName||oNode.baseName;var re=new RegExp("^"+tagName+"\\.(.+)$");var cs=oNode.childNodes;var l=cs.length;var fc,s;var emptyRe= /^\s*$/;for(var i=0;i<l;i++)
{if(re.test(cs[i].localName||cs[i].baseName))
{var propertyName=RegExp.$1;var cs2=cs[i].childNodes;var l2=cs2.length;for(var j=0;j<l2;j++)
{if(cs2[j].nodeType==3)
{s=cs2[j].data;if(emptyRe.test(s))
continue;obj.setAttribute(propertyName,s,this);break;}
else if(cs2[j].nodeType==1)
{obj.setProperty(propertyName,this.fromNode(cs2[j]));break;}}}
else obj.addXmlNode(cs[i],this);}};_p.getComponentById=function(sId)
{var o=this._componentsById[sId];if(o)
{if(o.getDisposed())
this._removeObject(o);else return o;}
if(this.getLoaded())
{var rn=this.getRootNode();var n=rn.selectSingleNode("//*[@id='"+sId+"']");if(!n)
return null;o=this.fromNode(n);if(o)
return o;}
return null;};_p.getLoaded=function()
{return this._rootNode!=null||BiXmlLoader.prototype.getLoaded.call(this);};_p.dispose=function()
{if(this.getDisposed())return;BiXmlLoader.prototype.dispose.call(this);for(var id in this._componentsById)
{this._removeObject(this._componentsById[id]);}
this._rootNode=null;};function BiResourceLoader()
{if(_biInPrototype)return;BiEventTarget.call(this);this._resources=[];this._resourcesById=[];this._duplicateScripts={};}
_p=_biExtend(BiResourceLoader,BiEventTarget,"BiResourceLoader");_p._lastLoaded= -1;_p._lastStarted= -1;_p._count=0;_p._loaded=false;_p._autoNameMapping=false;BiResourceLoader.prototype.getAutoNameMapping=function(){return this._autoNameMapping;};_p.setAutoNameMapping=function(b)
{this._autoNameMapping=b;if(this._xmlResourceParser)
this._xmlResourceParser.setAutoNameMapping(b);};_p.getResourceById=function(sId)
{if(sId in this._resourcesById)
return this._resourcesById[sId].object;return null;};_p.addResource=function(sType,oData,sId)
{var lastRes=this._resources[this._resources.length-1];if((sType=="script"||sType=="inlinescript")&&!(lastRes instanceof BiScriptLoaderQueue))
{lastRes=new BiScriptLoaderQueue;lastRes.addEventListener("load",this.load,this);lastRes.addEventListener("progress",this._onprogress,this);lastRes.addEventListener("error",this._onerror,this);this._resources.push(lastRes);}
if(sType=="script")
{if(!(oData in this._duplicateScripts))
{lastRes.add(oData);this._duplicateScripts[oData]=true;this._count++;}}
else if(sType=="inlinescript")
{lastRes.addInline(oData);this._count++;}
else {var item={name:sType,node:oData,id:sId};this._resources.push(item);if(sId)
this._resourcesById[sId]=item;this._count++;}};_p._createGeneralObject=function(oItem)
{var node=oItem.node;if(!this._xmlResourceParser)
{this._xmlResourceParser=new BiXmlResourceParser;this._xmlResourceParser.setRootNode(node.parentNode);this._xmlResourceParser.setAutoNameMapping(this._autoNameMapping);}
var o=this._xmlResourceParser.fromNode(node);oItem.object=o;oItem.node=null;if(o instanceof BiEventTarget)
{o.addEventListener("load",this.load,this);o.addEventListener("error",this._onerror,this);}
if(typeof o.load=="function")
o.load();};_p.load=function()
{if(this._loaded)return;var allLoaded=true;if(this._lastStarted== -1)
{allLoaded=false;this._lastStarted=0;this._startLoad(this._resources[0]);}
else {for(var i=this._lastStarted;i<this._resources.length;i++)
{var obj=this._resources[i];if(this._isLoaded(obj))
{this._lastLoaded=i;this._removeListeners(obj);this._onprogress();continue;}
else {if(i==this._lastStarted)
{allLoaded=false;break;}
this._lastStarted=i;this._startLoad(obj);if(!this._isLoaded(obj))
{allLoaded=false;break;}
else {this._lastLoaded=i;this._removeListeners(obj);this._onprogress();}}}}
if(allLoaded)
this._onAllLoaded();};_p._startLoad=function(obj)
{if(obj instanceof BiScriptLoaderQueue)
obj.load();else this._createGeneralObject(obj);};_p._isLoaded=function(obj)
{if(obj instanceof BiScriptLoaderQueue)
return obj.getLoaded();else if(obj.object==null)

⌨️ 快捷键说明

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