roojs-core.js
authorAlan Knowles <alan@akbkhome.com>
Sat, 7 Apr 2012 08:25:13 +0000 (16:25 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sat, 7 Apr 2012 08:25:13 +0000 (16:25 +0800)
roojs-core-debug.js
roojs-ui.js
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 80d3029..b14b246 100644 (file)
@@ -1142,7 +1142,7 @@ this.el.unmask(this.removeMask);},onLoad:function(){this.el.unmask(this.removeMa
 //Roo/XTemplate.js
 Roo.XTemplate=function(){Roo.XTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.XTemplate,Roo.Template,{re:/\{([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var s=this.html;s=['<tpl>',s,'</tpl>'].join('');var re=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,A=/^<tpl\b[^>]*?for="(.*?)"/,B=/^<tpl\b[^>]*?if="(.*?)"/,C=/^<tpl\b[^>]*?exec="(.*?)"/,m,id=0,D=[];while(true==!!(m=s.match(re))){var m2=m[0].match(A),m3=m[0].match(B),m4=m[0].match(C),E=null,fn=null,F=null,G=m2&&m2[1]?m2[1]:'';if(m3){E=m3&&m3[1]?m3[1]:null;if(E){fn=new Function('values','parent','with(values){ return '+(Roo.util.Format.htmlDecode(E))+'; }');}}if(m4){E=m4&&m4[1]?m4[1]:null;if(E){F=new Function('values','parent','with(values){ '+(Roo.util.Format.htmlDecode(E))+'; }');}}if(G){switch(G){case '.':G=new Function('values','parent','with(values){ return values; }');break;case '..':G=new Function('values','parent','with(values){ return parent; }');break;default:G=new Function('values','parent','with(values){ return '+G+'; }');}}
 D.push({id:id,target:G,exec:F,test:fn,body:m[1]||''});s=s.replace(m[0],'{xtpl'+id+'}');++id;}for(var i=D.length-1;i>=0;--i){this.compileTpl(D[i]);}
-this.master=D[D.length-1];this.tpls=D;return this;},applySubTemplate:function(id,A,B){var t=this.tpls[id];try{if(t.test&&!t.test.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'test': Exception thrown");Roo.log(e.toString());Roo.log(t.test);return ''}try{if(t.exec&&t.exec.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'exec': Exception thrown");Roo.log(e.toString());Roo.log(t.exec);return ''}try{var vs=t.target?t.target.call(this,A,B):A;B=t.target?A:B;if(t.target&&vs instanceof Array){var C=[];for(var i=0,D=vs.length;i<D;i++){C[C.length]=t.compiled.call(this,vs[i],B);}return C.join('');}return t.compiled.call(this,vs,B);}catch(e){Roo.log("Xtemplate.applySubTemplate : Exception thrown");Roo.log(e.toString());Roo.log(t.compiled);return '';}},compileTpl:function(A){var fm=Roo.util.Format;var B=this.disableFormats!==true;var C=Roo.isGecko?"+":",";var D=function(F){Roo.log("Property not found :"+F);return '';};var fn=function(m,F,G,H){H=H?H.replace(/\\'/g,"'"):H;if(typeof(G)=='undefined'){G='htmlEncode';}if(G=='raw'){G=false;}if(F.substr(0,4)=='xtpl'){return "'"+C+'this.applySubTemplate('+F.substr(4)+', values, parent)'+C+"'";}var I=[];var J='';Roo.each(F.split('.'),function(st){J+=(J.length?'.':'')+st;I.push("(typeof("+J+") == 'undefined')");});var K='(('+I.join(" || ")+") ? udef('"+F+"') : ";if(G&&B){H=H?','+H:"";if(G.substr(0,5)!="this."){G="fm."+G+'(';}else {G='this.call("'+G.substr(5)+'", ';H=", values";}return "'"+C+K+G+F+H+"))"+C+"'";}if(H.length){return "'"+C+K+F+'('+H+"))"+C+"'";}return "'"+C+K+F+")"+C+"'";};var E;if(Roo.isGecko){E="tpl.compiled = function(values, parent){  with(values) { return '"+A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};};";}else {E=["tpl.compiled = function(values, parent){  with (values) { return ['"];E.push(A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));E.push("'].join('');};};");E=E.join('');}
+this.master=D[D.length-1];this.tpls=D;return this;},applySubTemplate:function(id,A,B){var t=this.tpls[id];try{if(t.test&&!t.test.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'test': Exception thrown");Roo.log(e.toString());Roo.log(t.test);return ''}try{if(t.exec&&t.exec.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'exec': Exception thrown");Roo.log(e.toString());Roo.log(t.exec);return ''}try{var vs=t.target?t.target.call(this,A,B):A;B=t.target?A:B;if(t.target&&vs instanceof Array){var C=[];for(var i=0,D=vs.length;i<D;i++){C[C.length]=t.compiled.call(this,vs[i],B);}return C.join('');}return t.compiled.call(this,vs,B);}catch(e){Roo.log("Xtemplate.applySubTemplate : Exception thrown");Roo.log(e.toString());Roo.log(t.compiled);return '';}},compileTpl:function(A){var fm=Roo.util.Format;var B=this.disableFormats!==true;var C=Roo.isGecko?"+":",";var D=function(F){Roo.log("Property not found :"+F);return '';};var fn=function(m,F,G,H){H=H?H.replace(/\\'/g,"'"):H;if(typeof(G)=='undefined'){G='htmlEncode';}if(G=='raw'){G=false;}if(F.substr(0,4)=='xtpl'){return "'"+C+'this.applySubTemplate('+F.substr(4)+', values, parent)'+C+"'";}var I=[];var J='';Roo.each(F.split('.'),function(st){J+=(J.length?'.':'')+st;I.push("(typeof("+J+") == 'undefined')");});var K='(('+I.join(" || ")+") ? undef('"+F+"') : ";if(G&&B){H=H?','+H:"";if(G.substr(0,5)!="this."){G="fm."+G+'(';}else {G='this.call("'+G.substr(5)+'", ';H=", values";}return "'"+C+K+G+F+H+"))"+C+"'";}if(H.length){return "'"+C+K+F+'('+H+"))"+C+"'";}return "'"+C+K+F+")"+C+"'";};var E;if(Roo.isGecko){E="tpl.compiled = function(values, parent){  with(values) { return '"+A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};};";}else {E=["tpl.compiled = function(values, parent){  with (values) { return ['"];E.push(A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));E.push("'].join('');};};");E=E.join('');}
 Roo.debug&&Roo.log(E.replace(/\\n/,'\n'));eval(E);return this;},applyTemplate:function(A){return this.master.compiled.call(this,A,{});},apply:function(){return this.applyTemplate.apply(this,arguments);}});Roo.XTemplate.from=function(el){el=Roo.getDom(el);return new Roo.XTemplate(el.value||el.innerHTML);};
 //Roo/XComponent.js
 Roo.XComponent=function(A){Roo.apply(this,A);this.addEvents({'built':true});this.region=this.region||'center';Roo.XComponent.register(this);this.modules=false;this.el=false;}
index c8fa7cf..295f2a9 100644 (file)
@@ -52526,7 +52526,7 @@ Roo.extend(Roo.XTemplate, Roo.Template, {
                 udef_ar.push(  "(typeof(" + lookfor + ") == 'undefined')"  );
             });
             
-            var udef_st = '((' + udef_ar.join(" || ") +") ? udef('" + name + "') : "; // .. needs )
+            var udef_st = '((' + udef_ar.join(" || ") +") ? undef('" + name + "') : "; // .. needs )
             
             
             if(format && useF){
index b07d1ad..ef4cb02 100644 (file)
@@ -38024,7 +38024,7 @@ Roo.extend(Roo.XTemplate, Roo.Template, {
                 udef_ar.push(  "(typeof(" + lookfor + ") == 'undefined')"  );
             });
             
-            var udef_st = '((' + udef_ar.join(" || ") +") ? udef('" + name + "') : "; // .. needs )
+            var udef_st = '((' + udef_ar.join(" || ") +") ? undef('" + name + "') : "; // .. needs )
             
             
             if(format && useF){
index 31f667a..78269f3 100644 (file)
@@ -849,7 +849,7 @@ this.el.unmask(this.removeMask);},onLoad:function(){this.el.unmask(this.removeMa
 //Roo/XTemplate.js
 Roo.XTemplate=function(){Roo.XTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.XTemplate,Roo.Template,{re:/\{([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var s=this.html;s=['<tpl>',s,'</tpl>'].join('');var re=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,A=/^<tpl\b[^>]*?for="(.*?)"/,B=/^<tpl\b[^>]*?if="(.*?)"/,C=/^<tpl\b[^>]*?exec="(.*?)"/,m,id=0,D=[];while(true==!!(m=s.match(re))){var m2=m[0].match(A),m3=m[0].match(B),m4=m[0].match(C),E=null,fn=null,F=null,G=m2&&m2[1]?m2[1]:'';if(m3){E=m3&&m3[1]?m3[1]:null;if(E){fn=new Function('values','parent','with(values){ return '+(Roo.util.Format.htmlDecode(E))+'; }');}}if(m4){E=m4&&m4[1]?m4[1]:null;if(E){F=new Function('values','parent','with(values){ '+(Roo.util.Format.htmlDecode(E))+'; }');}}if(G){switch(G){case '.':G=new Function('values','parent','with(values){ return values; }');break;case '..':G=new Function('values','parent','with(values){ return parent; }');break;default:G=new Function('values','parent','with(values){ return '+G+'; }');}}
 D.push({id:id,target:G,exec:F,test:fn,body:m[1]||''});s=s.replace(m[0],'{xtpl'+id+'}');++id;}for(var i=D.length-1;i>=0;--i){this.compileTpl(D[i]);}
-this.master=D[D.length-1];this.tpls=D;return this;},applySubTemplate:function(id,A,B){var t=this.tpls[id];try{if(t.test&&!t.test.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'test': Exception thrown");Roo.log(e.toString());Roo.log(t.test);return ''}try{if(t.exec&&t.exec.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'exec': Exception thrown");Roo.log(e.toString());Roo.log(t.exec);return ''}try{var vs=t.target?t.target.call(this,A,B):A;B=t.target?A:B;if(t.target&&vs instanceof Array){var C=[];for(var i=0,D=vs.length;i<D;i++){C[C.length]=t.compiled.call(this,vs[i],B);}return C.join('');}return t.compiled.call(this,vs,B);}catch(e){Roo.log("Xtemplate.applySubTemplate : Exception thrown");Roo.log(e.toString());Roo.log(t.compiled);return '';}},compileTpl:function(A){var fm=Roo.util.Format;var B=this.disableFormats!==true;var C=Roo.isGecko?"+":",";var D=function(F){Roo.log("Property not found :"+F);return '';};var fn=function(m,F,G,H){H=H?H.replace(/\\'/g,"'"):H;if(typeof(G)=='undefined'){G='htmlEncode';}if(G=='raw'){G=false;}if(F.substr(0,4)=='xtpl'){return "'"+C+'this.applySubTemplate('+F.substr(4)+', values, parent)'+C+"'";}var I=[];var J='';Roo.each(F.split('.'),function(st){J+=(J.length?'.':'')+st;I.push("(typeof("+J+") == 'undefined')");});var K='(('+I.join(" || ")+") ? udef('"+F+"') : ";if(G&&B){H=H?','+H:"";if(G.substr(0,5)!="this."){G="fm."+G+'(';}else {G='this.call("'+G.substr(5)+'", ';H=", values";}return "'"+C+K+G+F+H+"))"+C+"'";}if(H.length){return "'"+C+K+F+'('+H+"))"+C+"'";}return "'"+C+K+F+")"+C+"'";};var E;if(Roo.isGecko){E="tpl.compiled = function(values, parent){  with(values) { return '"+A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};};";}else {E=["tpl.compiled = function(values, parent){  with (values) { return ['"];E.push(A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));E.push("'].join('');};};");E=E.join('');}
+this.master=D[D.length-1];this.tpls=D;return this;},applySubTemplate:function(id,A,B){var t=this.tpls[id];try{if(t.test&&!t.test.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'test': Exception thrown");Roo.log(e.toString());Roo.log(t.test);return ''}try{if(t.exec&&t.exec.call(this,A,B)){return '';}}catch(e){Roo.log("Xtemplate.applySubTemplate 'exec': Exception thrown");Roo.log(e.toString());Roo.log(t.exec);return ''}try{var vs=t.target?t.target.call(this,A,B):A;B=t.target?A:B;if(t.target&&vs instanceof Array){var C=[];for(var i=0,D=vs.length;i<D;i++){C[C.length]=t.compiled.call(this,vs[i],B);}return C.join('');}return t.compiled.call(this,vs,B);}catch(e){Roo.log("Xtemplate.applySubTemplate : Exception thrown");Roo.log(e.toString());Roo.log(t.compiled);return '';}},compileTpl:function(A){var fm=Roo.util.Format;var B=this.disableFormats!==true;var C=Roo.isGecko?"+":",";var D=function(F){Roo.log("Property not found :"+F);return '';};var fn=function(m,F,G,H){H=H?H.replace(/\\'/g,"'"):H;if(typeof(G)=='undefined'){G='htmlEncode';}if(G=='raw'){G=false;}if(F.substr(0,4)=='xtpl'){return "'"+C+'this.applySubTemplate('+F.substr(4)+', values, parent)'+C+"'";}var I=[];var J='';Roo.each(F.split('.'),function(st){J+=(J.length?'.':'')+st;I.push("(typeof("+J+") == 'undefined')");});var K='(('+I.join(" || ")+") ? undef('"+F+"') : ";if(G&&B){H=H?','+H:"";if(G.substr(0,5)!="this."){G="fm."+G+'(';}else {G='this.call("'+G.substr(5)+'", ';H=", values";}return "'"+C+K+G+F+H+"))"+C+"'";}if(H.length){return "'"+C+K+F+'('+H+"))"+C+"'";}return "'"+C+K+F+")"+C+"'";};var E;if(Roo.isGecko){E="tpl.compiled = function(values, parent){  with(values) { return '"+A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};};";}else {E=["tpl.compiled = function(values, parent){  with (values) { return ['"];E.push(A.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));E.push("'].join('');};};");E=E.join('');}
 Roo.debug&&Roo.log(E.replace(/\\n/,'\n'));eval(E);return this;},applyTemplate:function(A){return this.master.compiled.call(this,A,{});},apply:function(){return this.applyTemplate.apply(this,arguments);}});Roo.XTemplate.from=function(el){el=Roo.getDom(el);return new Roo.XTemplate(el.value||el.innerHTML);};
 //Roo/XComponent.js
 Roo.XComponent=function(A){Roo.apply(this,A);this.addEvents({'built':true});this.region=this.region||'center';Roo.XComponent.register(this);this.modules=false;this.el=false;}