roojs-core.js
authoredward <edward@roojs.com>
Fri, 4 Dec 2015 03:29:57 +0000 (11:29 +0800)
committeredward <edward@roojs.com>
Fri, 4 Dec 2015 03:29:57 +0000 (11:29 +0800)
roojs-core-debug.js

roojs-core-debug.js
roojs-core.js

index 87129cb..4b70d7b 100644 (file)
@@ -56,6 +56,7 @@ Roo.apply = function(o, c, defaults){
         isFirefox = ua.indexOf("firefox") > -1,
         isIE = ua.indexOf("msie") > -1,
         isIE7 = ua.indexOf("msie 7") > -1,
+        isIE11 = /Trident.*rv\:11\./.test(ua),
         isGecko = !isSafari && ua.indexOf("gecko") > -1,
         isBorderBox = isIE && !isStrict,
         isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1),
@@ -617,6 +618,8 @@ Roo.factory(conf, Roo.data);
         /** @type Boolean */
         isIE7 : isIE7,
         /** @type Boolean */
+        isIE11 : isIE11,
+        /** @type Boolean */
         isGecko : isGecko,
         /** @type Boolean */
         isBorderBox : isBorderBox,
index fc61ca6..a3f5443 100644 (file)
@@ -1,14 +1,14 @@
 //Roo.js
-window["undefined"]=window["undefined"];var Roo={};Roo.apply=function(o,c,A){if(A){Roo.apply(o,A);}if(o&&c&&typeof c=='object'){for(var p in c){o[p]=c[p];}}return o;};(function(){var A=0;var ua=navigator.userAgent.toLowerCase();var B=document.compatMode=="CSS1Compat",C=ua.indexOf("opera")>-1,D=(/webkit|khtml/).test(ua),E=ua.indexOf("firefox")>-1,F=ua.indexOf("msie")>-1,G=ua.indexOf("msie 7")>-1,H=!D&&ua.indexOf("gecko")>-1,I=F&&!B,J=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),K=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),L=(ua.indexOf("linux")!=-1),M=window.location.href.toLowerCase().indexOf("https")===0,N=(function(){try{document.createEvent("TouchEvent");return true;}catch(e){return false;}})();if(F&&!G){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}
-Roo.apply(Roo,{isStrict:B,isSecure:M,isReady:false,debug:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/localhost/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}return o;},addBehaviors:function(o){if(!Roo.isReady){Roo.onReady(function(){Roo.addBehaviors(o);});return;}var O={};for(var b in o){var P=b.split('@');if(P[1]){var s=P[0];if(!O[s]){O[s]=Roo.select(s);}
-O[s].on(P[1],o[b]);}}
-O=null;},id:function(el,O){O=O||"roo-gen";el=Roo.getDom(el);var id=O+(++A);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sb,sp,O){if(typeof sp=='object'){O=sp;sp=sb;sb=function(){sp.apply(this,arguments);};}var F=function(){},P,Q=sp.prototype;F.prototype=Q;P=sb.prototype=new F();P.constructor=sb;sb.superclass=Q;if(Q.constructor==Object.prototype.constructor){Q.constructor=sp;}
-sb.override=function(o){Roo.override(sb,o);};P.override=io;Roo.override(sb,O);return sb;};}(),override:function(O,P){if(P){var p=O.prototype;for(var Q in P){p[Q]=P[Q];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},factory:function(c,ns){if(!c.xtype||(!ns&&!c.xns)||(c.xns===false)){return c;}
-ns=c.xns?c.xns:ns;if(c.constructor==ns[c.xtype]){return c;}if(ns[c.xtype]){if(Roo.debug)Roo.log("Roo.Factory("+c.xtype+")");var O=new ns[c.xtype](c);O.xns=false;return O;}
+window["undefined"]=window["undefined"];var Roo={};Roo.apply=function(o,c,A){if(A){Roo.apply(o,A);}if(o&&c&&typeof c=='object'){for(var p in c){o[p]=c[p];}}return o;};(function(){var A=0;var ua=navigator.userAgent.toLowerCase();var B=document.compatMode=="CSS1Compat",C=ua.indexOf("opera")>-1,D=(/webkit|khtml/).test(ua),E=ua.indexOf("firefox")>-1,F=ua.indexOf("msie")>-1,G=ua.indexOf("msie 7")>-1,H=/Trident.*rv\:11\./.test(ua),I=!D&&ua.indexOf("gecko")>-1,J=F&&!B,K=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),L=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),M=(ua.indexOf("linux")!=-1),N=window.location.href.toLowerCase().indexOf("https")===0,O=(function(){try{document.createEvent("TouchEvent");return true;}catch(e){return false;}})();if(F&&!G){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}
+Roo.apply(Roo,{isStrict:B,isSecure:N,isReady:false,debug:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/localhost/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}return o;},addBehaviors:function(o){if(!Roo.isReady){Roo.onReady(function(){Roo.addBehaviors(o);});return;}var P={};for(var b in o){var Q=b.split('@');if(Q[1]){var s=Q[0];if(!P[s]){P[s]=Roo.select(s);}
+P[s].on(Q[1],o[b]);}}
+P=null;},id:function(el,P){P=P||"roo-gen";el=Roo.getDom(el);var id=P+(++A);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sb,sp,P){if(typeof sp=='object'){P=sp;sp=sb;sb=function(){sp.apply(this,arguments);};}var F=function(){},Q,R=sp.prototype;F.prototype=R;Q=sb.prototype=new F();Q.constructor=sb;sb.superclass=R;if(R.constructor==Object.prototype.constructor){R.constructor=sp;}
+sb.override=function(o){Roo.override(sb,o);};Q.override=io;Roo.override(sb,P);return sb;};}(),override:function(P,Q){if(Q){var p=P.prototype;for(var R in Q){p[R]=Q[R];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},factory:function(c,ns){if(!c.xtype||(!ns&&!c.xns)||(c.xns===false)){return c;}
+ns=c.xns?c.xns:ns;if(c.constructor==ns[c.xtype]){return c;}if(ns[c.xtype]){if(Roo.debug)Roo.log("Roo.Factory("+c.xtype+")");var P=new ns[c.xtype](c);P.xns=false;return P;}
 c.xns=false;return c;},log:function(s){if((typeof(console)=='undefined')||(typeof(console.log)=='undefined')){return;}
-console.log(s);},urlEncode:function(o){if(!o){return "";}var O=[];for(var P in o){var ov=o[P],k=Roo.encodeURIComponent(P);var Q=typeof ov;if(Q=='undefined'){O.push(k,"=&");}else if(Q!="function"&&Q!="object"){O.push(k,"=",Roo.encodeURIComponent(ov),"&");}else if(ov instanceof Array){if(ov.length){for(var i=0,R=ov.length;i<R;i++){O.push(k,"=",Roo.encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else {O.push(k,"=&");}}}
-O.pop();return O.join("");},encodeURIComponent:function(O){try{return encodeURIComponent(O);}catch(e){}if(O==''||O==null){return '';}function nibble_to_hex(R){var S='0123456789ABCDEF';return S.charAt(R);}
-O=O.toString();var P='';for(var i=0;i<O.length;i++){var c=O.charCodeAt(i);var bs=new Array();if(c>0x10000){bs[0]=0xF0|((c&0x1C0000)>>>18);bs[1]=0x80|((c&0x3F000)>>>12);bs[2]=0x80|((c&0xFC0)>>>6);bs[3]=0x80|(c&0x3F);}else if(c>0x800){bs[0]=0xE0|((c&0xF000)>>>12);bs[1]=0x80|((c&0xFC0)>>>6);bs[2]=0x80|(c&0x3F);}else if(c>0x80){bs[0]=0xC0|((c&0x7C0)>>>6);bs[1]=0x80|(c&0x3F);}else {bs[0]=c;}for(var j=0;j<bs.length;j++){var b=bs[j];var Q=nibble_to_hex((b&0xF0)>>>4)+nibble_to_hex(b&0x0F);P+='%'+Q;}}return P;},urlDecode:function(O,P){if(!O||!O.length){return {};}var Q={};var R=O.split('&');var S,T,U;for(var i=0,V=R.length;i<V;i++){S=R[i].split('=');T=decodeURIComponent(S[0]);U=decodeURIComponent(S[1]);if(P!==true){if(typeof Q[T]=="undefined"){Q[T]=U;}else if(typeof Q[T]=="string"){Q[T]=[Q[T]];Q[T].push(U);}else {Q[T].push(U);}}else {Q[T]=U;}}return Q;},each:function(O,fn,P){if(typeof O.length=="undefined"||typeof O=="string"){O=[O];}for(var i=0,Q=O.length;i<Q;i++){if(fn.call(P||O[i],O[i],i,O)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(a instanceof Array){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else {r.push(a);}}return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,O,P,Q){if(typeof cb=="function"){if(Q){cb.defer(Q,O,P||[]);}else {cb.apply(O,P||[]);}}},getDom:function(el){if(!el){return null;}return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getCmp:function(id){return Roo.ComponentMgr.get(id);},num:function(v,O){if(typeof v!='number'){return O;}return v;},destroy:function(){for(var i=0,a=arguments,O=a.length;i<O;i++){var as=a[i];if(as){if(as.dom){as.removeAllListeners();as.remove();continue;}if(typeof as.purgeListeners=='function'){as.purgeListeners();}if(typeof as.destroy=='function'){as.destroy();}}}},type:function(o){if(o===undefined||o===null){return false;}if(o.htmlElement){return 'element';}var t=typeof o;if(t=='object'&&o.nodeName){switch(o.nodeType){case 1:return 'element';case 3:return (/\S/).test(o.nodeValue)?'textnode':'whitespace';}}if(t=='object'||t=='function'){switch(o.constructor){case Array:return 'array';case RegExp:return 'regexp';}if(typeof o.length=='number'&&typeof o.item=='function'){return 'nodelist';}}return t;},isEmpty:function(v,O){return v===null||v===undefined||(!O?v==='':false);},isOpera:C,isSafari:D,isFirefox:E,isIE:F,isIE7:G,isGecko:H,isBorderBox:I,isWindows:J,isLinux:L,isMac:K,isTouch:N,useShims:((F&&!G)||(H&&K)),selectNode:function(O,P){var Q=Roo.DomQuery.selectNode(O,P);return Q?Roo.get(Q):new Roo.Element(false);}});})();Roo.namespace("Roo","Roo.util","Roo.grid","Roo.dd","Roo.tree","Roo.data","Roo.form","Roo.menu","Roo.state","Roo.lib","Roo.layout","Roo.app","Roo.ux","Roo.bootstrap","Roo.bootstrap.dash");
+console.log(s);},urlEncode:function(o){if(!o){return "";}var P=[];for(var Q in o){var ov=o[Q],k=Roo.encodeURIComponent(Q);var R=typeof ov;if(R=='undefined'){P.push(k,"=&");}else if(R!="function"&&R!="object"){P.push(k,"=",Roo.encodeURIComponent(ov),"&");}else if(ov instanceof Array){if(ov.length){for(var i=0,S=ov.length;i<S;i++){P.push(k,"=",Roo.encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else {P.push(k,"=&");}}}
+P.pop();return P.join("");},encodeURIComponent:function(P){try{return encodeURIComponent(P);}catch(e){}if(P==''||P==null){return '';}function nibble_to_hex(S){var T='0123456789ABCDEF';return T.charAt(S);}
+P=P.toString();var Q='';for(var i=0;i<P.length;i++){var c=P.charCodeAt(i);var bs=new Array();if(c>0x10000){bs[0]=0xF0|((c&0x1C0000)>>>18);bs[1]=0x80|((c&0x3F000)>>>12);bs[2]=0x80|((c&0xFC0)>>>6);bs[3]=0x80|(c&0x3F);}else if(c>0x800){bs[0]=0xE0|((c&0xF000)>>>12);bs[1]=0x80|((c&0xFC0)>>>6);bs[2]=0x80|(c&0x3F);}else if(c>0x80){bs[0]=0xC0|((c&0x7C0)>>>6);bs[1]=0x80|(c&0x3F);}else {bs[0]=c;}for(var j=0;j<bs.length;j++){var b=bs[j];var R=nibble_to_hex((b&0xF0)>>>4)+nibble_to_hex(b&0x0F);Q+='%'+R;}}return Q;},urlDecode:function(P,Q){if(!P||!P.length){return {};}var R={};var S=P.split('&');var T,U,V;for(var i=0,W=S.length;i<W;i++){T=S[i].split('=');U=decodeURIComponent(T[0]);V=decodeURIComponent(T[1]);if(Q!==true){if(typeof R[U]=="undefined"){R[U]=V;}else if(typeof R[U]=="string"){R[U]=[R[U]];R[U].push(V);}else {R[U].push(V);}}else {R[U]=V;}}return R;},each:function(P,fn,Q){if(typeof P.length=="undefined"||typeof P=="string"){P=[P];}for(var i=0,R=P.length;i<R;i++){if(fn.call(Q||P[i],P[i],i,P)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(a instanceof Array){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else {r.push(a);}}return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,P,Q,R){if(typeof cb=="function"){if(R){cb.defer(R,P,Q||[]);}else {cb.apply(P,Q||[]);}}},getDom:function(el){if(!el){return null;}return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getCmp:function(id){return Roo.ComponentMgr.get(id);},num:function(v,P){if(typeof v!='number'){return P;}return v;},destroy:function(){for(var i=0,a=arguments,P=a.length;i<P;i++){var as=a[i];if(as){if(as.dom){as.removeAllListeners();as.remove();continue;}if(typeof as.purgeListeners=='function'){as.purgeListeners();}if(typeof as.destroy=='function'){as.destroy();}}}},type:function(o){if(o===undefined||o===null){return false;}if(o.htmlElement){return 'element';}var t=typeof o;if(t=='object'&&o.nodeName){switch(o.nodeType){case 1:return 'element';case 3:return (/\S/).test(o.nodeValue)?'textnode':'whitespace';}}if(t=='object'||t=='function'){switch(o.constructor){case Array:return 'array';case RegExp:return 'regexp';}if(typeof o.length=='number'&&typeof o.item=='function'){return 'nodelist';}}return t;},isEmpty:function(v,P){return v===null||v===undefined||(!P?v==='':false);},isOpera:C,isSafari:D,isFirefox:E,isIE:F,isIE7:G,isIE11:H,isGecko:I,isBorderBox:J,isWindows:K,isLinux:M,isMac:L,isTouch:O,useShims:((F&&!G)||(I&&L)),selectNode:function(P,Q){var R=Roo.DomQuery.selectNode(P,Q);return R?Roo.get(R):new Roo.Element(false);}});})();Roo.namespace("Roo","Roo.util","Roo.grid","Roo.dd","Roo.tree","Roo.data","Roo.form","Roo.menu","Roo.state","Roo.lib","Roo.layout","Roo.app","Roo.ux","Roo.bootstrap","Roo.bootstrap.dash");
 //Function.js
 (function(){if(Roo.isIE){function fnCleanUp(){var p=Function.prototype;delete p.createSequence;delete p.defer;delete p.createDelegate;delete p.createCallback;delete p.createInterceptor;window.detachEvent("onunload",fnCleanUp);}
 window.attachEvent("onunload",fnCleanUp);}})();Roo.apply(Function.prototype,{createCallback:function(){var A=arguments;var B=this;return function(){return B.apply(window,A);};},createDelegate:function(A,B,C){var D=this;return function(){var E=B||arguments;if(C===true){E=Array.prototype.slice.call(arguments,0);E=E.concat(B);}else if(typeof C=="number"){E=Array.prototype.slice.call(arguments,0);var F=[C,0].concat(B);Array.prototype.splice.apply(E,F);}return D.apply(A||window,E);};},defer:function(A,B,C,D){var fn=this.createDelegate(B,C,D);if(A){return setTimeout(fn,A);}