aw.js
来自「很好的HTML控件」· JavaScript 代码 · 共 54 行 · 第 1/5 页
JS
54 行
FOR TESTING AND EVALUATION ONLY:
This software is not free and is licensed to you for testing
and evaluation only. You are not allowed to distribute
or use any parts of this software for any other purposes.
*****************************************************************/
if(!window.AW){var AW=function(a,b){return AW.dispatch(a,b)};AW.version=201;AW.toString=function(){return "ActiveWidgets 2.0.1"}}if(!AW.System){AW.System={}}if(!AW.HTML){AW.HTML={}}if(!AW.Templates){AW.Templates={}}if(!AW.Scroll){AW.Scroll={}}if(!AW.Panels){AW.Panels={}}if(!AW.Formats){AW.Formats={}}if(!AW.HTTP){AW.HTTP={}}if(!AW.CSV){AW.CSV={}}if(!AW.XML){AW.XML={}}if(!AW.UI){AW.UI={}}if(!AW.Grid){AW.Grid={}}if(!AW.Tree){AW.Tree={}}if(!AW.UI.Controllers){AW.UI.Controllers={}}if(!AW.Grid.Controllers){AW.Grid.Controllers={}}
(function(){AW.all={id:0};AW.docs=[document];AW.log=function(level,arg){try{var i,s="";for(i=0;i<arg.length;i++){s+=arg[i]+" "}window.status=s}catch(error){window.status=error.message}};AW.debug=function(){AW.log("debug",arguments)};AW.info=function(){AW.log("info",arguments)};AW.warn=function(){AW.log("warn",arguments)};AW.error=function(){AW.log("error",arguments)};AW.fatal=function(){AW.log("fatal",arguments)};AW.forEach=function(array,handler){var i,custom={};for(i in array){if(!custom[i]){handler(i,array[i])}}};AW.element=function(id){var i,e,docs=AW.docs;for(i=0;i<docs.length;i++){e=docs[i].getElementById(id);if(e){return e}}};AW.object=function(id){var parts=id.split("-");var tag=parts[0];var obj=AW.all[tag];var target=obj;for(var i=1;i<parts.length;i++){if(obj["_"+parts[i]+"Content"]){for(var j=i;j<parts.length;j++){target=target.getContent(parts[j])}break}else if(parts[i+1] && parts[i+1].match(/^(\d+)$/)){if(parts[i+2] && parts[i+2].match(/^(\d+)$/)){if(parts[i+3] && parts[i+3].match(/^(\d+)$/)){obj=obj.getTemplate(parts[i],parts[i+1],parts[i+2],parts[i+3]);i+=3}else{obj=obj.getTemplate(parts[i],parts[i+1],parts[i+2]);i+=2}}else{obj=obj.getTemplate(parts[i],parts[i+1]);i+=1}}else{obj=obj.getTemplate(parts[i])}target=obj}return target};var events={"DOMFocusIn":"focus"};AW.dispatch=function(element,event){var type="_on"+(events[event.type] || event.type)+"Event";var target=AW.object(element.id);var obj=target;while(obj._parent){obj=obj._parent}return target[type].call(obj,event)};AW.paint=function(element){if(element.$paint){return}element.$paint=true;var obj=AW.object(element.id);while(obj && obj._parent){obj=obj._parent}if(obj && obj.raiseEvent){obj.raiseEvent("paint")}window.setTimeout(function(){element.style.removeExpression("visibility");element=null},0);return "inherit"};AW.camelCase=function(){var i,s=arguments[0];for(i=1;i<arguments.length;i++){s+=arguments[i].substr(0,1).toUpperCase()+arguments[i].substr(1)}return s};AW.textPattern=/(\"|&|<|>)/gm;AW.textTable={"\"":""","&":"&","<":"<",">":">"};AW.textReplace=function(c){return AW.textTable[c] || ""};AW.htmlPattern=/("|&|<|>|<[^<>]*>)/gm;AW.htmlTable={""":"\"","&":"&","<":"<",">":">"};AW.htmlReplace=function(e){return AW.htmlTable[e] || ""};AW.valueToText=function(v){return v?String(v).replace(AW.textPattern,AW.textReplace):""};AW.textToValue=function(t){return t?String(t).replace(AW.htmlPattern,AW.htmlReplace):""}})();
(function(){AW.browser="";if(document.recalc){AW.browser="ie"}else if(window.__defineGetter__){AW.browser="gecko"}else if(window.opera){AW.browser="opera"}else if(navigator.userAgent.match("Safari")){AW.browser="safari"}if(AW.browser){AW[AW.browser]=true}AW.os="";if(!navigator.userAgent.match("Windows")){AW.unix=true}if(navigator.userAgent.match("Mac OS")){AW.os="mac"}if(navigator.userAgent.match("Linux")){AW.os="linux"}AW.strict=(document.compatMode && document.compatMode.match("CSS"))|| AW.browser=="safari";var htmlc="aw-all";if(AW.strict){htmlc+=" aw-strict"}if(AW.browser){htmlc+=" aw-"+AW.browser}if(AW.unix){htmlc+=" aw-unix"}if(AW.os){htmlc+=" aw-"+AW.os}if(AW.ie){if(typeof(window.XMLHttpRequest)=="object"){AW.ie7=true;htmlc+=" aw-ie7"}else{AW.ie6=true;htmlc+=" aw-ie6"}}if(AW.gecko){if(typeof(document.inputEncoding)=="string"){AW.ff15=true;htmlc+=" aw-ff15"}else{AW.ff1=true;htmlc+=" aw-ff1"}}document.getElementsByTagName("html")[0].className+=htmlc;if(AW.strict){AW.dx=8;AW.dy=4}else{AW.dx=0;AW.dy=0}})();
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?