📄 dojo.js
字号:
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,_1cb,_1cc){if(!farr.length){if(typeof _1cc=="function"){_1cc();}return;}if((typeof _1cb=="undefined")&&(typeof cb=="number")){_1cb=cb;cb=function(){};}else{if(!cb){cb=function(){};if(!_1cb){_1cb=0;}}}setTimeout(function(){(farr.shift())();cb();dojo.lang.delayThese(farr,cb,_1cb,_1cc);},_1cb);};dojo.provide("dojo.string.extras");dojo.string.substituteParams=function(_1cd,hash){var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);return _1cd.replace(/\%\{(\w+)\}/g,function(_1d0,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 _1d3=str.split(" ");for(var i=0;i<_1d3.length;i++){_1d3[i]=_1d3[i].charAt(0).toUpperCase()+_1d3[i].substring(1);}return _1d3.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 _1d8=escape(str);var _1d9,re=/%u([0-9A-F]{4})/i;while((_1d9=_1d8.match(re))){var num=Number("0x"+_1d9[1]);var _1dc=escape("&#"+num+";");ret+=_1d8.substring(0,_1d9.index)+_1dc;_1d8=_1d8.substring(_1d9.index+_1d9[0].length);}ret+=_1d8.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,_1e1){str=str.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,""");if(!_1e1){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,_1ea){if(_1ea){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,_1ee,_1ef){if(_1ef){str=str.toLowerCase();_1ee=_1ee.toLowerCase();}return str.indexOf(_1ee)==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,_1f5){if(_1f5=="\n"){text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");}else{if(_1f5=="\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,_1f7){var _1f8=[];for(var i=0,_1fa=0;i<str.length;i++){if(str.charAt(i)=="\\"){i++;continue;}if(str.charAt(i)==_1f7){_1f8.push(str.substring(_1fa,i));_1fa=i+1;}}_1f8.push(str.substr(_1fa));return _1f8;};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 _1fc=dojo.doc();do{var id="dj_unique_"+(++arguments.callee._idIncrement);}while(_1fc.getElementById(id));return id;};dojo.dom.getUniqueId._idIncrement=0;dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_1fe,_1ff){var node=_1fe.firstChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.nextSibling;}if(_1ff&&node&&node.tagName&&node.tagName.toLowerCase()!=_1ff.toLowerCase()){node=dojo.dom.nextElement(node,_1ff);}return node;};dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_201,_202){var node=_201.lastChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.previousSibling;}if(_202&&node&&node.tagName&&node.tagName.toLowerCase()!=_202.toLowerCase()){node=dojo.dom.prevElement(node,_202);}return node;};dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_205){if(!node){return null;}do{node=node.nextSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&_205&&_205.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.nextElement(node,_205);}return node;};dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_207){if(!node){return null;}if(_207){_207=_207.toLowerCase();}do{node=node.previousSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&_207&&_207.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.prevElement(node,_207);}return node;};dojo.dom.moveChildren=function(_208,_209,trim){var _20b=0;if(trim){while(_208.hasChildNodes()&&_208.firstChild.nodeType==dojo.dom.TEXT_NODE){_208.removeChild(_208.firstChild);}while(_208.hasChildNodes()&&_208.lastChild.nodeType==dojo.dom.TEXT_NODE){_208.removeChild(_208.lastChild);}}while(_208.hasChildNodes()){_209.appendChild(_208.firstChild);_20b++;}return _20b;};dojo.dom.copyChildren=function(_20c,_20d,trim){var _20f=_20c.cloneNode(true);return this.moveChildren(_20f,_20d,trim);};dojo.dom.replaceChildren=function(node,_211){var _212=[];if(dojo.render.html.ie){for(var i=0;i<node.childNodes.length;i++){_212.push(node.childNodes[i]);}}dojo.dom.removeChildren(node);node.appendChild(_211);for(var i=0;i<_212.length;i++){dojo.dom.destroyNode(_212[i]);}};dojo.dom.removeChildren=function(node){var _215=node.childNodes.length;while(node.hasChildNodes()){dojo.dom.removeNode(node.firstChild);}return _215;};dojo.dom.replaceNode=function(node,_217){return node.parentNode.replaceChild(_217,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,_21b,_21c){var _21d=[];var _21e=(_21b&&(_21b instanceof Function||typeof _21b=="function"));while(node){if(!_21e||_21b(node)){_21d.push(node);}if(_21c&&_21d.length>0){return _21d[0];}node=node.parentNode;}if(_21c){return null;}return _21d;};dojo.dom.getAncestorsByTag=function(node,tag,_221){tag=tag.toLowerCase();return dojo.dom.getAncestors(node,function(el){return ((el.tagName)&&(el.tagName.toLowerCase()==tag));},_221);};dojo.dom.getFirstAncestorByTag=function(node,tag){return dojo.dom.getAncestorsByTag(node,tag,true);};dojo.dom.isDescendantOf=function(node,_226,_227){if(_227&&node){node=node.parentNode;}while(node){if(node==_226){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 _22a=dojo.doc();if(!dj_undef("ActiveXObject")){var _22b=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<_22b.length;i++){try{doc=new ActiveXObject(_22b[i]+".XMLDOM");}catch(e){}if(doc){break;}}}else{if((_22a.implementation)&&(_22a.implementation.createDocument)){doc=_22a.implementation.createDocument("","",null);}}return doc;};dojo.dom.createDocumentFromText=function(str,_22e){if(!_22e){_22e="text/xml";}if(!dj_undef("DOMParser")){var _22f=new DOMParser();return _22f.parseFromString(str,_22e);}else{if(!dj_undef("ActiveXObject")){var _230=dojo.dom.createDocument();if(_230){_230.async=false;_230.loadXML(str);return _230;}else{dojo.debug("toXml didn't work?");}}else{var _231=dojo.doc();if(_231.createElement){var tmp=_231.createElement("xml");tmp.innerHTML=str;if(_231.implementation&&_231.implementation.createDocument){var _233=_231.implementation.createDocument("foo","",null);for(var i=0;i<tmp.childNodes.length;i++){_233.importNode(tmp.childNodes.item(i),true);}return _233;}return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));}}}return null;};dojo.dom.prependChild=function(node,_236){if(_236.firstChild){_236.insertBefore(node,_236.firstChild);}else{_236.appendChild(node);}return true;};dojo.dom.insertBefore=function(node,ref,_239){if((_239!=true)&&(node===ref||node.nextSibling===ref)){return false;}var _23a=ref.parentNode;_23a.insertBefore(node,ref);return true;};dojo.dom.insertAfter=function(node,ref,_23d){var pn=ref.parentNode;if(ref==pn.lastChild){if((_23d!=true)&&(node===ref)){return false;}pn.appendChild(node);}else{return this.insertBefore(node,ref.nextSibling,_23d);}return true;};dojo.dom.insertAtPosition=function(node,ref,_241){if((!node)||(!ref)||(!_241)){return false;}switch(_241.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,_243,_244){var _245=_243.childNodes;if(!_245.length||_245.length==_244){_243.appendChild(node);return true;}if(_244==0){return dojo.dom.prependChild(node,_243);}return dojo.dom.insertAfter(node,_245[_244-1]);};dojo.dom.textContent=function(node,text){if(arguments.length>1){var _248=dojo.doc();dojo.dom.replaceChildren(node,_248.createTextNode(text));return text;}else{if(node.textContent!=undefined){return node.textContent;}var _249="";if(node==null){return _249;}for(var i=0;i<node.childNodes.length;i++){switch(node.childNodes[i].nodeType){case 1:case 5:_249+=dojo.dom.textContent(node.childNodes[i]);break;case 3:case 2:case 4:_249+=node.childNodes[i].nodeValue;break;default:break;}}return _249;}};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,_24f,_250,_251){if(elem==null||((elem==undefined)&&(typeof elem=="undefined"))){dojo.raise("No element given to dojo.dom.setAttributeNS");}if(!((elem.setAttributeNS==undefined)&&(typeof elem.setAttributeNS=="undefined"))){elem.setAttributeNS(_24f,_250,_251);}else{var _252=elem.ownerDocument;var _253=_252.createNode(2,_250,_24f);_253.nodeValue=_251;elem.setAttributeNode(_253);}};dojo.provide("dojo.undo.browser");try{if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -