roojs-core.js
authorChris <chris@roojs.com>
Tue, 26 Nov 2013 08:48:55 +0000 (16:48 +0800)
committerChris <chris@roojs.com>
Tue, 26 Nov 2013 08:48:55 +0000 (16:48 +0800)
roojs-ui.js
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js

index f733598..8d6c8f2 100644 (file)
@@ -1,16 +1,16 @@
 //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("msie")>-1,F=ua.indexOf("msie 7")>-1,G=!D&&ua.indexOf("gecko")>-1,H=E&&!B,I=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),J=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),K=(ua.indexOf("linux")!=-1),M=window.location.href.toLowerCase().indexOf("https")===0;if(E&&!F){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(){},clone:function(o,N,f,c,O,P){var o2,Q,R;Q=P||{};switch(L.type(o)){case 'date':return new Date(o);case 'regexp':return o;case 'function':return o;case 'array':o2=[];break;default:if(o['_~roo~_']){return Q[o['_~roo~_']];}
-R=Y.guid();o2=(N)?{}:Y.Object(o);o['_~roo~_']=R;Q[R]=o;}
-Roo.each(o,function(v,k){if((k||k===0)&&(!f||(f.call(c||this,v,k,this,o)!==false))){if(k!=='_~roo~_'){if(k=='prototype'){}else {this[k]=Roo.clone(v,N,f,c,O||o,Q);}}}},o2);if(!P){Roo.Object.each(Q,function(v,k){if(v['_~roo~_']){try{delete v['_~roo~_'];}catch(e){v['_~roo~_']=null;}}},this);Q=null;}return o2;},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 N={};for(var b in o){var O=b.split('@');if(O[1]){var s=O[0];if(!N[s]){N[s]=Roo.select(s);}
-N[s].on(O[1],o[b]);}}
-N=null;},id:function(el,N){N=N||"roo-gen";el=Roo.getDom(el);var id=N+(++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,N){if(typeof sp=='object'){N=sp;sp=sb;sb=function(){sp.apply(this,arguments);};}var F=function(){},O,P=sp.prototype;F.prototype=P;O=sb.prototype=new F();O.constructor=sb;sb.superclass=P;if(P.constructor==Object.prototype.constructor){P.constructor=sp;}
-sb.override=function(o){Roo.override(sb,o);};O.override=io;Roo.override(sb,N);return sb;};}(),override:function(N,O){if(O){var p=N.prototype;for(var P in O){p[P]=O[P];}}},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 N=new ns[c.xtype](c);N.xns=false;return N;}
+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("msie")>-1,F=ua.indexOf("msie 7")>-1,G=!D&&ua.indexOf("gecko")>-1,H=E&&!B,I=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),J=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),K=(ua.indexOf("linux")!=-1),L=window.location.href.toLowerCase().indexOf("https")===0;if(E&&!F){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}
+Roo.apply(Roo,{isStrict:B,isSecure:L,isReady:false,debug:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/localhost/s.gif",emptyFn:function(){},clone:function(o,M,f,c,N,O){var o2,P,Q;P=O||{};switch(this.type(o)){case 'date':return new Date(o);case 'regexp':return o;case 'function':return o;case 'array':o2=[];break;default:if(o['_~roo~_']){return P[o['_~roo~_']];}
+Q=Y.guid();o2=(M)?{}:Y.Object(o);o['_~roo~_']=Q;P[Q]=o;}
+Roo.each(o,function(v,k){if((k||k===0)&&(!f||(f.call(c||this,v,k,this,o)!==false))){if(k!=='_~roo~_'){if(k=='prototype'){}else {this[k]=Roo.clone(v,M,f,c,N||o,P);}}}},o2);if(!O){Roo.Object.each(P,function(v,k){if(v['_~roo~_']){try{delete v['_~roo~_'];}catch(e){v['_~roo~_']=null;}}},this);P=null;}return o2;},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 M={};for(var b in o){var N=b.split('@');if(N[1]){var s=N[0];if(!M[s]){M[s]=Roo.select(s);}
+M[s].on(N[1],o[b]);}}
+M=null;},id:function(el,M){M=M||"roo-gen";el=Roo.getDom(el);var id=M+(++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,M){if(typeof sp=='object'){M=sp;sp=sb;sb=function(){sp.apply(this,arguments);};}var F=function(){},N,O=sp.prototype;F.prototype=O;N=sb.prototype=new F();N.constructor=sb;sb.superclass=O;if(O.constructor==Object.prototype.constructor){O.constructor=sp;}
+sb.override=function(o){Roo.override(sb,o);};N.override=io;Roo.override(sb,M);return sb;};}(),override:function(M,N){if(N){var p=M.prototype;for(var O in N){p[O]=N[O];}}},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 M=new ns[c.xtype](c);M.xns=false;return M;}
 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 N=[];for(var O in o){var ov=o[O],k=Roo.encodeURIComponent(O);var P=typeof ov;if(P=='undefined'){N.push(k,"=&");}else if(P!="function"&&P!="object"){N.push(k,"=",Roo.encodeURIComponent(ov),"&");}else if(ov instanceof Array){if(ov.length){for(var i=0,Q=ov.length;i<Q;i++){N.push(k,"=",Roo.encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else {N.push(k,"=&");}}}
-N.pop();return N.join("");},encodeURIComponent:function(N){try{return encodeURIComponent(N);}catch(e){}if(N==''||N==null){return '';}function nibble_to_hex(Q){var R='0123456789ABCDEF';return R.charAt(Q);}
-N=N.toString();var O='';for(var i=0;i<N.length;i++){var c=N.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 P=nibble_to_hex((b&0xF0)>>>4)+nibble_to_hex(b&0x0F);O+='%'+P;}}return O;},urlDecode:function(N,O){if(!N||!N.length){return {};}var P={};var Q=N.split('&');var R,S,T;for(var i=0,U=Q.length;i<U;i++){R=Q[i].split('=');S=decodeURIComponent(R[0]);T=decodeURIComponent(R[1]);if(O!==true){if(typeof P[S]=="undefined"){P[S]=T;}else if(typeof P[S]=="string"){P[S]=[P[S]];P[S].push(T);}else {P[S].push(T);}}else {P[S]=T;}}return P;},each:function(N,fn,O){if(typeof N.length=="undefined"||typeof N=="string"){N=[N];}for(var i=0,P=N.length;i<P;i++){if(fn.call(O||N[i],N[i],i,N)===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,N,O,P){if(typeof cb=="function"){if(P){cb.defer(P,N,O||[]);}else {cb.apply(N,O||[]);}}},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,N){if(typeof v!='number'){return N;}return v;},destroy:function(){for(var i=0,a=arguments,N=a.length;i<N;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,N){return v===null||v===undefined||(!N?v==='':false);},isOpera:C,isSafari:D,isIE:E,isIE7:F,isGecko:G,isBorderBox:H,isWindows:I,isLinux:K,isMac:J,useShims:((E&&!F)||(G&&J)),selectNode:function(N,O){var P=Roo.DomQuery.selectNode(N,O);return P?Roo.get(P):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");
+console.log(s);},urlEncode:function(o){if(!o){return "";}var M=[];for(var N in o){var ov=o[N],k=Roo.encodeURIComponent(N);var O=typeof ov;if(O=='undefined'){M.push(k,"=&");}else if(O!="function"&&O!="object"){M.push(k,"=",Roo.encodeURIComponent(ov),"&");}else if(ov instanceof Array){if(ov.length){for(var i=0,P=ov.length;i<P;i++){M.push(k,"=",Roo.encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else {M.push(k,"=&");}}}
+M.pop();return M.join("");},encodeURIComponent:function(M){try{return encodeURIComponent(M);}catch(e){}if(M==''||M==null){return '';}function nibble_to_hex(P){var Q='0123456789ABCDEF';return Q.charAt(P);}
+M=M.toString();var N='';for(var i=0;i<M.length;i++){var c=M.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 O=nibble_to_hex((b&0xF0)>>>4)+nibble_to_hex(b&0x0F);N+='%'+O;}}return N;},urlDecode:function(M,N){if(!M||!M.length){return {};}var O={};var P=M.split('&');var Q,R,S;for(var i=0,T=P.length;i<T;i++){Q=P[i].split('=');R=decodeURIComponent(Q[0]);S=decodeURIComponent(Q[1]);if(N!==true){if(typeof O[R]=="undefined"){O[R]=S;}else if(typeof O[R]=="string"){O[R]=[O[R]];O[R].push(S);}else {O[R].push(S);}}else {O[R]=S;}}return O;},each:function(M,fn,N){if(typeof M.length=="undefined"||typeof M=="string"){M=[M];}for(var i=0,O=M.length;i<O;i++){if(fn.call(N||M[i],M[i],i,M)===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,M,N,O){if(typeof cb=="function"){if(O){cb.defer(O,M,N||[]);}else {cb.apply(M,N||[]);}}},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,M){if(typeof v!='number'){return M;}return v;},destroy:function(){for(var i=0,a=arguments,M=a.length;i<M;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,M){return v===null||v===undefined||(!M?v==='':false);},isOpera:C,isSafari:D,isIE:E,isIE7:F,isGecko:G,isBorderBox:H,isWindows:I,isLinux:K,isMac:J,useShims:((E&&!F)||(G&&J)),selectNode:function(M,N){var O=Roo.DomQuery.selectNode(M,N);return O?Roo.get(O):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");
 //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);}
index 369cab3..e0be2c9 100644 (file)
@@ -182,7 +182,7 @@ Roo.apply = function(o, c, defaults){
 
             marked = cloned || {};
 
-            switch (L.type(o)) {
+            switch (this.type(o)) {
                 case 'date':
                     return new Date(o);
                 case 'regexp':