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

📄 dojo.js

📁 Ajax 一个动态树的源码
💻 JS
📖 第 1 页 / 共 5 页
字号:
/*	Copyright (c) 2004-2006, The Dojo Foundation	All Rights Reserved.	Licensed under the Academic Free License version 2.1 or above OR the	modified BSD license. For more information on Dojo licensing, see:		http://dojotoolkit.org/community/licensing.shtml*//*	This is a compiled version of Dojo, built for deployment and not for	development. To get an editable version, please visit:		http://dojotoolkit.org	for documentation and information on getting the source.*/if(typeof dojo=="undefined"){var dj_global=this;function dj_undef(_1,_2){if(_2==null){_2=dj_global;}return (typeof _2[_1]=="undefined");}if(dj_undef("djConfig")){var djConfig={};}if(dj_undef("dojo")){var dojo={};}dojo.version={major:0,minor:3,patch:1,flag:"",revision:Number("$Rev: 4342 $".match(/[0-9]+/)[0]),toString:function(){with(dojo.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};dojo.evalProp=function(_3,_4,_5){return (_4&&!dj_undef(_3,_4)?_4[_3]:(_5?(_4[_3]={}):undefined));};dojo.parseObjPath=function(_6,_7,_8){var _9=(_7!=null?_7:dj_global);var _a=_6.split(".");var _b=_a.pop();for(var i=0,l=_a.length;i<l&&_9;i++){_9=dojo.evalProp(_a[i],_9,_8);}return {obj:_9,prop:_b};};dojo.evalObjPath=function(_d,_e){if(typeof _d!="string"){return dj_global;}if(_d.indexOf(".")==-1){return dojo.evalProp(_d,dj_global,_e);}var _f=dojo.parseObjPath(_d,dj_global,_e);if(_f){return dojo.evalProp(_f.prop,_f.obj,_e);}return null;};dojo.errorToString=function(_10){if(!dj_undef("message",_10)){return _10.message;}else{if(!dj_undef("description",_10)){return _10.description;}else{return _10;}}};dojo.raise=function(_11,_12){if(_12){_11=_11+": "+dojo.errorToString(_12);}try{dojo.hostenv.println("FATAL: "+_11);}catch(e){}throw Error(_11);};dojo.debug=function(){};dojo.debugShallow=function(obj){};dojo.profile={start:function(){},end:function(){},stop:function(){},dump:function(){}};function dj_eval(_14){return dj_global.eval?dj_global.eval(_14):eval(_14);}dojo.unimplemented=function(_15,_16){var _17="'"+_15+"' not implemented";if(_16!=null){_17+=" "+_16;}dojo.raise(_17);};dojo.deprecated=function(_18,_19,_1a){var _1b="DEPRECATED: "+_18;if(_19){_1b+=" "+_19;}if(_1a){_1b+=" -- will be removed in version: "+_1a;}dojo.debug(_1b);};dojo.inherits=function(_1c,_1d){if(typeof _1d!="function"){dojo.raise("dojo.inherits: superclass argument ["+_1d+"] must be a function (subclass: ["+_1c+"']");}_1c.prototype=new _1d();_1c.prototype.constructor=_1c;_1c.superclass=_1d.prototype;_1c["super"]=_1d.prototype;};dojo.render=(function(){function vscaffold(_1e,_1f){var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1e};for(var _21 in _1f){tmp[_21]=false;}return tmp;}return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};})();dojo.hostenv=(function(){var _22={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,searchIds:[],parseWidgets:true};if(typeof djConfig=="undefined"){djConfig=_22;}else{for(var _23 in _22){if(typeof djConfig[_23]=="undefined"){djConfig[_23]=_22[_23];}}}return {name_:"(unset)",version_:"(unset)",getName:function(){return this.name_;},getVersion:function(){return this.version_;},getText:function(uri){dojo.unimplemented("getText","uri="+uri);}};})();dojo.hostenv.getBaseScriptUri=function(){if(djConfig.baseScriptUri.length){return djConfig.baseScriptUri;}var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);if(!uri){dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);}var _26=uri.lastIndexOf("/");djConfig.baseScriptUri=djConfig.baseRelativePath;return djConfig.baseScriptUri;};(function(){var _27={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_28,_29){this.modulePrefixes_[_28]={name:_28,value:_29};},getModulePrefix:function(_2a){var mp=this.modulePrefixes_;if((mp[_2a])&&(mp[_2a]["name"])){return mp[_2a].value;}return _2a;},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};for(var _2c in _27){dojo.hostenv[_2c]=_27[_2c];}})();dojo.hostenv.loadPath=function(_2d,_2e,cb){var uri;if((_2d.charAt(0)=="/")||(_2d.match(/^\w+:/))){uri=_2d;}else{uri=this.getBaseScriptUri()+_2d;}if(djConfig.cacheBust&&dojo.render.html.capable){uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");}try{return ((!_2e)?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb));}catch(e){dojo.debug(e);return false;}};dojo.hostenv.loadUri=function(uri,cb){if(this.loadedUris[uri]){return 1;}var _33=this.getText(uri,null,true);if(_33==null){return 0;}this.loadedUris[uri]=true;if(cb){_33="("+_33+")";}var _34=dj_eval(_33);if(cb){cb(_34);}return 1;};dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){var ok=true;try{ok=this.loadUri(uri,cb);}catch(e){dojo.debug("failed loading ",uri," with error: ",e);}return ((ok)&&(this.findModule(_36,false)))?true:false;};dojo.loaded=function(){};dojo.unloaded=function(){};dojo.hostenv.loaded=function(){this.loadNotifying=true;this.post_load_=true;var mll=this.modulesLoadedListeners;for(var x=0;x<mll.length;x++){mll[x]();}this.modulesLoadedListeners=[];this.loadNotifying=false;dojo.loaded();};dojo.hostenv.unloaded=function(){var mll=this.unloadListeners;while(mll.length){(mll.pop())();}dojo.unloaded();};dojo.addOnLoad=function(obj,_3d){var dh=dojo.hostenv;if(arguments.length==1){dh.modulesLoadedListeners.push(obj);}else{if(arguments.length>1){dh.modulesLoadedListeners.push(function(){obj[_3d]();});}}if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){dh.callLoaded();}};dojo.addOnUnload=function(obj,_40){var dh=dojo.hostenv;if(arguments.length==1){dh.unloadListeners.push(obj);}else{if(arguments.length>1){dh.unloadListeners.push(function(){obj[_40]();});}}};dojo.hostenv.modulesLoaded=function(){if(this.post_load_){return;}if((this.loadUriStack.length==0)&&(this.getTextStack.length==0)){if(this.inFlightCount>0){dojo.debug("files still in flight!");return;}dojo.hostenv.callLoaded();}};dojo.hostenv.callLoaded=function(){if(typeof setTimeout=="object"){setTimeout("dojo.hostenv.loaded();",0);}else{dojo.hostenv.loaded();}};dojo.hostenv.getModuleSymbols=function(_42){var _43=_42.split(".");for(var i=_43.length-1;i>0;i--){var _45=_43.slice(0,i).join(".");var _46=this.getModulePrefix(_45);if(_46!=_45){_43.splice(0,i,_46);break;}}return _43;};dojo.hostenv._global_omit_module_check=false;dojo.hostenv.loadModule=function(_47,_48,_49){if(!_47){return;}_49=this._global_omit_module_check||_49;var _4a=this.findModule(_47,false);if(_4a){return _4a;}if(dj_undef(_47,this.loading_modules_)){this.addedToLoadingCount.push(_47);}this.loading_modules_[_47]=1;var _4b=_47.replace(/\./g,"/")+".js";var _4c=this.getModuleSymbols(_47);var _4d=((_4c[0].charAt(0)!="/")&&(!_4c[0].match(/^\w+:/)));var _4e=_4c[_4c.length-1];var _4f=_47.split(".");if(_4e=="*"){_47=(_4f.slice(0,-1)).join(".");while(_4c.length){_4c.pop();_4c.push(this.pkgFileName);_4b=_4c.join("/")+".js";if(_4d&&(_4b.charAt(0)=="/")){_4b=_4b.slice(1);}ok=this.loadPath(_4b,((!_49)?_47:null));if(ok){break;}_4c.pop();}}else{_4b=_4c.join("/")+".js";_47=_4f.join(".");var ok=this.loadPath(_4b,((!_49)?_47:null));if((!ok)&&(!_48)){_4c.pop();while(_4c.length){_4b=_4c.join("/")+".js";ok=this.loadPath(_4b,((!_49)?_47:null));if(ok){break;}_4c.pop();_4b=_4c.join("/")+"/"+this.pkgFileName+".js";if(_4d&&(_4b.charAt(0)=="/")){_4b=_4b.slice(1);}ok=this.loadPath(_4b,((!_49)?_47:null));if(ok){break;}}}if((!ok)&&(!_49)){dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");}}if(!_49&&!this["isXDomain"]){_4a=this.findModule(_47,false);if(!_4a){dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");}}return _4a;};dojo.hostenv.startPackage=function(_51){var _52=dojo.evalObjPath((_51.split(".").slice(0,-1)).join("."));this.loaded_modules_[(new String(_51)).toLowerCase()]=_52;var _53=_51.split(/\./);if(_53[_53.length-1]=="*"){_53.pop();}return dojo.evalObjPath(_53.join("."),true);};dojo.hostenv.findModule=function(_54,_55){var lmn=(new String(_54)).toLowerCase();if(this.loaded_modules_[lmn]){return this.loaded_modules_[lmn];}var _57=dojo.evalObjPath(_54);if((_54)&&(typeof _57!="undefined")&&(_57)){this.loaded_modules_[lmn]=_57;return _57;}if(_55){dojo.raise("no loaded module named '"+_54+"'");}return null;};dojo.kwCompoundRequire=function(_58){var _59=_58["common"]||[];var _5a=(_58[dojo.hostenv.name_])?_59.concat(_58[dojo.hostenv.name_]||[]):_59.concat(_58["default"]||[]);for(var x=0;x<_5a.length;x++){var _5c=_5a[x];if(_5c.constructor==Array){dojo.hostenv.loadModule.apply(dojo.hostenv,_5c);}else{dojo.hostenv.loadModule(_5c);}}};dojo.require=function(){dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);};dojo.requireIf=function(){if((arguments[0]===true)||(arguments[0]=="common")||(arguments[0]&&dojo.render[arguments[0]].capable)){var _5d=[];for(var i=1;i<arguments.length;i++){_5d.push(arguments[i]);}dojo.require.apply(dojo,_5d);}};dojo.requireAfterIf=dojo.requireIf;dojo.provide=function(){return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);};dojo.setModulePrefix=function(_5f,_60){return dojo.hostenv.setModulePrefix(_5f,_60);};dojo.exists=function(obj,_62){var p=_62.split(".");for(var i=0;i<p.length;i++){if(!(obj[p[i]])){return false;}obj=obj[p[i]];}return true;};}if(typeof window=="undefined"){dojo.raise("no window object");}(function(){if(djConfig.allowQueryConfig){var _65=document.location.toString();var _66=_65.split("?",2);if(_66.length>1){var _67=_66[1];var _68=_67.split("&");for(var x in _68){var sp=_68[x].split("=");if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){var opt=sp[0].substr(9);try{djConfig[opt]=eval(sp[1]);}catch(e){djConfig[opt]=sp[1];}}}}}if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){var _6c=document.getElementsByTagName("script");var _6d=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;for(var i=0;i<_6c.length;i++){var src=_6c[i].getAttribute("src");if(!src){continue;}var m=src.match(_6d);if(m){var _71=src.substring(0,m.index);if(src.indexOf("bootstrap1")>-1){_71+="../";}if(!this["djConfig"]){djConfig={};}if(djConfig["baseScriptUri"]==""){djConfig["baseScriptUri"]=_71;}if(djConfig["baseRelativePath"]==""){djConfig["baseRelativePath"]=_71;}break;}}}var dr=dojo.render;var drh=dojo.render.html;var drs=dojo.render.svg;var dua=drh.UA=navigator.userAgent;var dav=drh.AV=navigator.appVersion;var t=true;var f=false;drh.capable=t;drh.support.builtin=t;dr.ver=parseFloat(drh.AV);dr.os.mac=dav.indexOf("Macintosh")>=0;dr.os.win=dav.indexOf("Windows")>=0;dr.os.linux=dav.indexOf("X11")>=0;drh.opera=dua.indexOf("Opera")>=0;drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);drh.safari=dav.indexOf("Safari")>=0;var _79=dua.indexOf("Gecko");drh.mozilla=drh.moz=(_79>=0)&&(!drh.khtml);if(drh.mozilla){drh.geckoVersion=dua.substring(_79+6,_79+14);}drh.ie=(document.all)&&(!drh.opera);drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;dojo.locale=(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();dr.vml.capable=drh.ie;drs.capable=f;drs.support.plugin=f;drs.support.builtin=f;if(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("org.w3c.dom.svg","1.0")){drs.capable=t;drs.support.builtin=t;drs.support.plugin=f;}})();dojo.hostenv.startPackage("dojo.hostenv");dojo.render.name=dojo.hostenv.name_="browser";dojo.hostenv.searchIds=[];dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];dojo.hostenv.getXmlhttpObject=function(){var _7a=null;var _7b=null;try{_7a=new XMLHttpRequest();}catch(e){}if(!_7a){for(var i=0;i<3;++i){var _7d=dojo.hostenv._XMLHTTP_PROGIDS[i];try{_7a=new ActiveXObject(_7d);}catch(e){_7b=e;}if(_7a){dojo.hostenv._XMLHTTP_PROGIDS=[_7d];break;}}}if(!_7a){return dojo.raise("XMLHTTP not available",_7b);}return _7a;};dojo.hostenv.getText=function(uri,_7f,_80){var _81=this.getXmlhttpObject();if(_7f){_81.onreadystatechange=function(){if(4==_81.readyState){if((!_81["status"])||((200<=_81.status)&&(300>_81.status))){_7f(_81.responseText);}}};}

⌨️ 快捷键说明

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