📄 dojo.js
字号:
_1c4=_1c4-_1c2.length;if(_1c4<=0){var res=func.apply(_1bd,_1c6);_1c4=_1c5;return res;}else{return function(){return gather(arguments,_1c6,_1c4);};}}return gather([],_1bf,_1c1);};dojo.lang.curryArguments=function(_1c9,func,args,_1cc){var _1cd=[];var x=_1cc||0;for(x=_1cc;x<args.length;x++){_1cd.push(args[x]);}return dojo.lang.curry.apply(dojo.lang,[_1c9,func].concat(_1cd));};dojo.lang.tryThese=function(){for(var x=0;x<arguments.length;x++){try{if(typeof arguments[x]=="function"){var ret=(arguments[x]());if(ret){return ret;}}}catch(e){dojo.debug(e);}}};dojo.lang.delayThese=function(farr,cb,_1d3,_1d4){if(!farr.length){if(typeof _1d4=="function"){_1d4();}return;}if((typeof _1d3=="undefined")&&(typeof cb=="number")){_1d3=cb;cb=function(){};}else{if(!cb){cb=function(){};if(!_1d3){_1d3=0;}}}setTimeout(function(){(farr.shift())();cb();dojo.lang.delayThese(farr,cb,_1d3,_1d4);},_1d3);};dojo.provide("dojo.string.extras");dojo.string.substituteParams=function(_1d5,hash){var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);return _1d5.replace(/\%\{(\w+)\}/g,function(_1d8,key){if(typeof (map[key])!="undefined"&&map[key]!=null){return map[key];}dojo.raise("Substitution not found: "+key);});};dojo.string.capitalize=function(str){if(!dojo.lang.isString(str)){return "";}if(arguments.length==0){str=this;}var _1db=str.split(" ");for(var i=0;i<_1db.length;i++){_1db[i]=_1db[i].charAt(0).toUpperCase()+_1db[i].substring(1);}return _1db.join(" ");};dojo.string.isBlank=function(str){if(!dojo.lang.isString(str)){return true;}return (dojo.string.trim(str).length==0);};dojo.string.encodeAscii=function(str){if(!dojo.lang.isString(str)){return str;}var ret="";var _1e0=escape(str);var _1e1,re=/%u([0-9A-F]{4})/i;while((_1e1=_1e0.match(re))){var num=Number("0x"+_1e1[1]);var _1e4=escape("&#"+num+";");ret+=_1e0.substring(0,_1e1.index)+_1e4;_1e0=_1e0.substring(_1e1.index+_1e1[0].length);}ret+=_1e0.replace(/\+/g,"%2B");return ret;};dojo.string.escape=function(type,str){var args=dojo.lang.toArray(arguments,1);switch(type.toLowerCase()){case "xml":case "html":case "xhtml":return dojo.string.escapeXml.apply(this,args);case "sql":return dojo.string.escapeSql.apply(this,args);case "regexp":case "regex":return dojo.string.escapeRegExp.apply(this,args);case "javascript":case "jscript":case "js":return dojo.string.escapeJavaScript.apply(this,args);case "ascii":return dojo.string.encodeAscii.apply(this,args);default:return str;}};dojo.string.escapeXml=function(str,_1e9){str=str.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,""");if(!_1e9){str=str.replace(/'/gm,"'");}return str;};dojo.string.escapeSql=function(str){return str.replace(/'/gm,"''");};dojo.string.escapeRegExp=function(str){return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");};dojo.string.escapeJavaScript=function(str){return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");};dojo.string.escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.string.summary=function(str,len){if(!len||str.length<=len){return str;}return str.substring(0,len).replace(/\.+$/,"")+"...";};dojo.string.endsWith=function(str,end,_1f2){if(_1f2){str=str.toLowerCase();end=end.toLowerCase();}if((str.length-end.length)<0){return false;}return str.lastIndexOf(end)==str.length-end.length;};dojo.string.endsWithAny=function(str){for(var i=1;i<arguments.length;i++){if(dojo.string.endsWith(str,arguments[i])){return true;}}return false;};dojo.string.startsWith=function(str,_1f6,_1f7){if(_1f7){str=str.toLowerCase();_1f6=_1f6.toLowerCase();}return str.indexOf(_1f6)==0;};dojo.string.startsWithAny=function(str){for(var i=1;i<arguments.length;i++){if(dojo.string.startsWith(str,arguments[i])){return true;}}return false;};dojo.string.has=function(str){for(var i=1;i<arguments.length;i++){if(str.indexOf(arguments[i])>-1){return true;}}return false;};dojo.string.normalizeNewlines=function(text,_1fd){if(_1fd=="\n"){text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");}else{if(_1fd=="\r"){text=text.replace(/\r\n/g,"\r");text=text.replace(/\n/g,"\r");}else{text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1");}}return text;};dojo.string.splitEscaped=function(str,_1ff){var _200=[];for(var i=0,_202=0;i<str.length;i++){if(str.charAt(i)=="\\"){i++;continue;}if(str.charAt(i)==_1ff){_200.push(str.substring(_202,i));_202=i+1;}}_200.push(str.substr(_202));return _200;};dojo.provide("dojo.dom");dojo.dom.ELEMENT_NODE=1;dojo.dom.ATTRIBUTE_NODE=2;dojo.dom.TEXT_NODE=3;dojo.dom.CDATA_SECTION_NODE=4;dojo.dom.ENTITY_REFERENCE_NODE=5;dojo.dom.ENTITY_NODE=6;dojo.dom.PROCESSING_INSTRUCTION_NODE=7;dojo.dom.COMMENT_NODE=8;dojo.dom.DOCUMENT_NODE=9;dojo.dom.DOCUMENT_TYPE_NODE=10;dojo.dom.DOCUMENT_FRAGMENT_NODE=11;dojo.dom.NOTATION_NODE=12;dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};dojo.dom.isNode=function(wh){if(typeof Element=="function"){try{return wh instanceof Element;}catch(e){}}else{return wh&&!isNaN(wh.nodeType);}};dojo.dom.getUniqueId=function(){var _204=dojo.doc();do{var id="dj_unique_"+(++arguments.callee._idIncrement);}while(_204.getElementById(id));return id;};dojo.dom.getUniqueId._idIncrement=0;dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_206,_207){var node=_206.firstChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.nextSibling;}if(_207&&node&&node.tagName&&node.tagName.toLowerCase()!=_207.toLowerCase()){node=dojo.dom.nextElement(node,_207);}return node;};dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_209,_20a){var node=_209.lastChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.previousSibling;}if(_20a&&node&&node.tagName&&node.tagName.toLowerCase()!=_20a.toLowerCase()){node=dojo.dom.prevElement(node,_20a);}return node;};dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_20d){if(!node){return null;}do{node=node.nextSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&_20d&&_20d.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.nextElement(node,_20d);}return node;};dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_20f){if(!node){return null;}if(_20f){_20f=_20f.toLowerCase();}do{node=node.previousSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&_20f&&_20f.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.prevElement(node,_20f);}return node;};dojo.dom.moveChildren=function(_210,_211,trim){var _213=0;if(trim){while(_210.hasChildNodes()&&_210.firstChild.nodeType==dojo.dom.TEXT_NODE){_210.removeChild(_210.firstChild);}while(_210.hasChildNodes()&&_210.lastChild.nodeType==dojo.dom.TEXT_NODE){_210.removeChild(_210.lastChild);}}while(_210.hasChildNodes()){_211.appendChild(_210.firstChild);_213++;}return _213;};dojo.dom.copyChildren=function(_214,_215,trim){var _217=_214.cloneNode(true);return this.moveChildren(_217,_215,trim);};dojo.dom.replaceChildren=function(node,_219){var _21a=[];if(dojo.render.html.ie){for(var i=0;i<node.childNodes.length;i++){_21a.push(node.childNodes[i]);}}dojo.dom.removeChildren(node);node.appendChild(_219);for(var i=0;i<_21a.length;i++){dojo.dom.destroyNode(_21a[i]);}};dojo.dom.removeChildren=function(node){var _21d=node.childNodes.length;while(node.hasChildNodes()){dojo.dom.removeNode(node.firstChild);}return _21d;};dojo.dom.replaceNode=function(node,_21f){return node.parentNode.replaceChild(_21f,node);};dojo.dom.destroyNode=function(node){if(node.parentNode){node=dojo.dom.removeNode(node);}if(node.nodeType!=3){if(dojo.evalObjPath("dojo.event.browser.clean",false)){dojo.event.browser.clean(node);}if(dojo.render.html.ie){node.outerHTML="";}}};dojo.dom.removeNode=function(node){if(node&&node.parentNode){return node.parentNode.removeChild(node);}};dojo.dom.getAncestors=function(node,_223,_224){var _225=[];var _226=(_223&&(_223 instanceof Function||typeof _223=="function"));while(node){if(!_226||_223(node)){_225.push(node);}if(_224&&_225.length>0){return _225[0];}node=node.parentNode;}if(_224){return null;}return _225;};dojo.dom.getAncestorsByTag=function(node,tag,_229){tag=tag.toLowerCase();return dojo.dom.getAncestors(node,function(el){return ((el.tagName)&&(el.tagName.toLowerCase()==tag));},_229);};dojo.dom.getFirstAncestorByTag=function(node,tag){return dojo.dom.getAncestorsByTag(node,tag,true);};dojo.dom.isDescendantOf=function(node,_22e,_22f){if(_22f&&node){node=node.parentNode;}while(node){if(node==_22e){return true;}node=node.parentNode;}return false;};dojo.dom.innerXML=function(node){if(node.innerXML){return node.innerXML;}else{if(node.xml){return node.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(node);}}}};dojo.dom.createDocument=function(){var doc=null;var _232=dojo.doc();if(!dj_undef("ActiveXObject")){var _233=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<_233.length;i++){try{doc=new ActiveXObject(_233[i]+".XMLDOM");}catch(e){}if(doc){break;}}}else{if((_232.implementation)&&(_232.implementation.createDocument)){doc=_232.implementation.createDocument("","",null);}}return doc;};dojo.dom.createDocumentFromText=function(str,_236){if(!_236){_236="text/xml";}if(!dj_undef("DOMParser")){var _237=new DOMParser();return _237.parseFromString(str,_236);}else{if(!dj_undef("ActiveXObject")){var _238=dojo.dom.createDocument();if(_238){_238.async=false;_238.loadXML(str);return _238;}else{dojo.debug("toXml didn't work?");}}else{var _239=dojo.doc();if(_239.createElement){var tmp=_239.createElement("xml");tmp.innerHTML=str;if(_239.implementation&&_239.implementation.createDocument){var _23b=_239.implementation.createDocument("foo","",null);for(var i=0;i<tmp.childNodes.length;i++){_23b.importNode(tmp.childNodes.item(i),true);}return _23b;}return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));}}}return null;};dojo.dom.prependChild=function(node,_23e){if(_23e.firstChild){_23e.insertBefore(node,_23e.firstChild);}else{_23e.appendChild(node);}return true;};dojo.dom.insertBefore=function(node,ref,_241){if((_241!=true)&&(node===ref||node.nextSibling===ref)){return false;}var _242=ref.parentNode;_242.insertBefore(node,ref);return true;};dojo.dom.insertAfter=function(node,ref,_245){var pn=ref.parentNode;if(ref==pn.lastChild){if((_245!=true)&&(node===ref)){return false;}pn.appendChild(node);}else{return this.insertBefore(node,ref.nextSibling,_245);}return true;};dojo.dom.insertAtPosition=function(node,ref,_249){if((!node)||(!ref)||(!_249)){return false;}switch(_249.toLowerCase()){case "before":return dojo.dom.insertBefore(node,ref);case "after":return dojo.dom.insertAfter(node,ref);case "first":if(ref.firstChild){return dojo.dom.insertBefore(node,ref.firstChild);}else{ref.appendChild(node);return true;}break;default:ref.appendChild(node);return true;}};dojo.dom.insertAtIndex=function(node,_24b,_24c){var _24d=_24b.childNodes;if(!_24d.length||_24d.length==_24c){_24b.appendChild(node);return true;}if(_24c==0){return dojo.dom.prependChild(node,_24b);}return dojo.dom.insertAfter(node,_24d[_24c-1]);};dojo.dom.textContent=function(node,text){if(arguments.length>1){var _250=dojo.doc();dojo.dom.replaceChildren(node,_250.createTextNode(text));return text;}else{if(node.textContent!=undefined){return node.textContent;}var _251="";if(node==null){return _251;}for(var i=0;i<node.childNodes.length;i++){switch(node.childNodes[i].nodeType){case 1:case 5:_251+=dojo.dom.textContent(node.childNodes[i]);break;case 3:case 2:case 4:_251+=node.childNodes[i].nodeValue;break;default:break;}}return _251;}};dojo.dom.hasParent=function(node){return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));};dojo.dom.isTag=function(node){if(node&&node.tagName){for(var i=1;i<arguments.length;i++){if(node.tagName==String(arguments[i])){return String(arguments[i]);}}}return "";};dojo.dom.setAttributeNS=function(elem,_257,_258,_259){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -