sync
authorAlan Knowles <alan@roojs.com>
Fri, 3 Aug 2012 05:51:14 +0000 (13:51 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 3 Aug 2012 05:51:14 +0000 (13:51 +0800)
Roo/DomTemplate.js
examples/view/domtemplate.html
roojs-all.js
roojs-core-debug.js
roojs-core.js
roojs-debug.js

index f855500..5e6e3f2 100644 (file)
@@ -71,7 +71,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
      *  x.t:(test,tesT) 
      * 
      */
-    re : /(\{|%7B])([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|%7D)/g,
+    re : /(\{|\%7B)([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|\%7D)/g,
     //re : /\{([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
     
     iterChild : function (node, method) {
@@ -111,7 +111,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
         
         // create a top level template from the snippet..
         
-        Roo.log(div.innerHTML);
+        //Roo.log(div.innerHTML);
         
         var tpl = {
             uid : 'master',
@@ -269,6 +269,9 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
             return '';
         };
           
+        //Roo.log(tpl.body);
+        
+        
         
         var fn = function(m, lbrace, name, format, args)
         {
index 0465a00..3e3d054 100644 (file)
@@ -9,17 +9,17 @@
   
 
 <script id="javascript-code" type="text/javascript">
-    
-Roo.onReady(function() {
+tpl = new Roo.DomTemplate({
+   url : 'domtemplate_snippet.html'
+});
+Roo.onReady((function() {
     
     var html = Roo.get('body').dom.innerHTML;
     Roo.get('body').dom.innerHTML = '';
     Roo.debug = 1;
     
     // nice and global to test with..
-    tpl = new Roo.DomTemplate({
-       html : html
-    });
+   
     Roo.log(tpl);
     var data =   [ 
             {
@@ -40,13 +40,13 @@ Roo.onReady(function() {
         tpl.append(Roo.get('body'), r);
     });
     
-    Roo.get('template-show').update(Roo.util.Format.htmlEncode(html)); 
+    Roo.get('template-show').update(Roo.util.Format.htmlEncode(tpl.html)); 
     Roo.get('javascript-show').update(Roo.util.Format.htmlEncode(
         Roo.get('javascript-code').dom.innerHTML
     ));
     
     
-});
+}).defer(1000));
      
      
 </script>
@@ -57,126 +57,6 @@ Roo.onReady(function() {
     <div id="body">
                 
        
-            <li roo-if="ontable == 'mtrack_ticket'"  class="change-log-item">
-                <div class="timelineevent">  
-                    <div class="timelinetext">
-                        <div class="timelinereason" name="{changedate}">
-                            <span class="time">{changedate.format:('H:i:s')}</span>        
-                                     
-                    
-                            #<span class="mtrack-ticket-link">{object_id}</span> - <B>{object_summary}</B> <BR/> 
-                            
-                            <div class="bubble-wrap"> 
-                                {reason}    
-                            
-                                <p>Comment Added
-                                        <span class="time">{changedate.format:('H:i:s')}</span>
-                                        by
-                                        <span class="mtrack-person" personid="{person_id}"><B>{person_id_name}</B></span> 
-                                  
-                                </p>
-                            </div>
-                            
-                                                
-                            <div roo-for="audit">
-                              
-                               <div roo-if="action != 'changed'">
-                                   <div class="bubble-wrap">
-                            
-                                       {value_str}  
-                                    </div><p>  {field_str}  Changed
-                                        <span class="time">{parent.changedate.format:('H:i:s')}</span>
-                                           by
-                                           <span class="mtrack-person" personid="{parent.person_id}"><B>{parent.person_id_name}</B></span> 
-                                       </p>
-                                </div>
-                                    
-                            
-                            </div>         
-                                    
-                                     
-                                    
-                            
-                            <span class="mtrack-audits">
-                                <div roo-for="audit_ar,a">
-                                     <div roo-if="action == 'changed'">
-                                        <span class="mtrack-audit">{a.field_str} set to: <B>{a.value_str}</B></span>
-                                     </div>
-                                </div>
-                            </span>
-                            
-                            by
-                            <span class="mtrack-person" personid="{person_id}"><B>{person_id_name}</B></span>
-                                    
-                       </div>
-                    </div>
-                </div>
-            </li> 
-         
-        
-        
-                                   
-            <li roo-if="ontable == 'mtrack_repos'" class="change-log-item">
-            
-                <span class="change" ><span class="time">{changedate.format:('H:i:s')}</span> - {reason:ellipsis(100)}</span> 
-                <span class="change-log-rev" ><a 
-                     class="changesetlink browse-link" 
-                     href="{baseURL}/Changeset/default/{object_shortname}/{rev}">{rev}</a>
-                         by
-                        <span class="mtrack-person" personid="{person_id}"><B>{person_id_name}</B></span>
-                           
-                </span>
-                <ul class="changed-files">
-                
-                    <div roo-for="audit">
-                      
-                       <li class="file-change">
-                            <B >{action.substring:(action.length-1)}</B> {value}
-                        
-                        </li>
-                    
-                    </div>         
-                </ul>    
-            
-            
-                
-                
-                <div style="display:none;white-space: pre-wrap;">{reason}</div>             
-            </li>
-         
-        
-        
-                       
-            <li  roo-name="somename" class="change-log-item">
-            
-                <span class="change" ><span class="time">{changedate.format:('H:i:s')}</span> - {reason:ellipsis(100)}</span> 
-                <span class="change-log-rev" ><a 
-                     class="changesetlink browse-link" 
-                     href="{baseURL}/Changeset/default/{object_shortname}/{rev}">{rev}</a>
-                         by
-                        <span class="mtrack-person" personid="{person_id}"><B>{person_id_name}</B></span>
-                           
-                </span>
-                <ul class="changed-files">
-                
-                    <div roo-for="audit">
-                      
-                       <li class="file-change">
-                            <B >{action.substring:(action.length-1)}</B> {value}
-                        
-                        </li>
-                    
-                    </div>         
-                </ul>    
-            
-            
-                
-                
-                <div style="display:none;white-space: pre-wrap;">{reason}</div>             
-            </li>
-          
-        
-        
     </div>
     
     
index cf80a77..286dc74 100644 (file)
@@ -223,8 +223,8 @@ A=Roo.getDom(A);this.transaction=Roo.Ajax.request({form:A,url:B,success:this.suc
 this.update(this.defaultUrl,null,A,true);},startAutoRefresh:function(A,B,C,D,E){if(E){this.update(B||this.defaultUrl,C,D,true);}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);}
 this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[B||this.defaultUrl,C,D,true]),A*1000);},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId;}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false;},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText);}},prepareUrl:function(A){if(this.disableCaching){var B="_dc="+(new Date().getTime());if(A.indexOf("?")!==-1){A+="&"+B;}else {A+="?"+B;}}return A;},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset){try{A.argument.form.reset();}catch(e){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]));}else {this.renderer.render(this.el,A,this);this.updateComplete(A);}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback(this.el,true,A);}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback(this.el,false,A);}},setRenderer:function(A){this.renderer=A;},getRenderer:function(){return this.renderer;},setDefaultUrl:function(A){this.defaultUrl=A;},abort:function(){if(this.transaction){Roo.Ajax.abort(this.transaction);}},isUpdating:function(){if(this.transaction){return Roo.Ajax.isLoading(this.transaction);}return false;}});Roo.UpdateManager.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Roo.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>'};Roo.UpdateManager.updateElement=function(el,A,B,C){var um=Roo.get(el,true).getUpdateManager();Roo.apply(um,C);um.update(A,B,C?C.callback:null);};Roo.UpdateManager.update=Roo.UpdateManager.updateElement;Roo.UpdateManager.BasicRenderer=function(){};Roo.UpdateManager.BasicRenderer.prototype={render:function(el,A,B,C){el.update(A.responseText,B.loadScripts,C);}};
 //Roo/DomTemplate.js
-Roo.DomTemplate=function(){Roo.DomTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.DomTemplate,Roo.Template,{id:0,inPre:false,tpls:false,re:/(\{|%7B])([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|%7D)/g,iterChild:function(A,B){var C=this.inPre;if(A.tagName=='PRE'){this.inPre=true;}for(var i=0;i<A.childNodes.length;i++){B.call(this,A.childNodes[i]);}
-this.inPre=C;},compile:function(){var s=this.html;var A=document.createElement('div');A.innerHTML=this.html;this.tpls=[];var _t=this;this.iterChild(A,function(n){_t.compileNode(n,true);});var B=this.tpls;Roo.log(A.innerHTML);var C={uid:'master',id:this.id++,attr:false,value:false,body:A.innerHTML,forCall:false,execCall:false,dom:A,isTop:true};B.unshift(C);this.tpls=[];Roo.each(B,function(tp){this.compileTpl(tp);this.tpls[tp.id]=tp;},this);this.master=B[0];return this;},compileNode:function(A,B){if(A.nodeType!=1){if(A.nodeType==3&&!this.inPre){A.nodeValue=A.nodeValue.replace(/\s+/g,' ');}return;}var C={uid:false,id:false,attr:false,value:false,body:'',forCall:false,execCall:false,dom:false,isTop:B};switch(true){case (A.hasAttribute('roo-for')):C.attr='for';break;case (A.hasAttribute('roo-if')):C.attr='if';break;case (A.hasAttribute('roo-name')):C.attr='name';break;case (A.hasAttribute('roo-exec')):C.attr='exec';break;}if(!C.attr){this.iterChild(A,this.compileNode);return;}
+Roo.DomTemplate=function(){Roo.DomTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.DomTemplate,Roo.Template,{id:0,inPre:false,tpls:false,re:/(\{|\%7B)([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|\%7D)/g,iterChild:function(A,B){var C=this.inPre;if(A.tagName=='PRE'){this.inPre=true;}for(var i=0;i<A.childNodes.length;i++){B.call(this,A.childNodes[i]);}
+this.inPre=C;},compile:function(){var s=this.html;var A=document.createElement('div');A.innerHTML=this.html;this.tpls=[];var _t=this;this.iterChild(A,function(n){_t.compileNode(n,true);});var B=this.tpls;var C={uid:'master',id:this.id++,attr:false,value:false,body:A.innerHTML,forCall:false,execCall:false,dom:A,isTop:true};B.unshift(C);this.tpls=[];Roo.each(B,function(tp){this.compileTpl(tp);this.tpls[tp.id]=tp;},this);this.master=B[0];return this;},compileNode:function(A,B){if(A.nodeType!=1){if(A.nodeType==3&&!this.inPre){A.nodeValue=A.nodeValue.replace(/\s+/g,' ');}return;}var C={uid:false,id:false,attr:false,value:false,body:'',forCall:false,execCall:false,dom:false,isTop:B};switch(true){case (A.hasAttribute('roo-for')):C.attr='for';break;case (A.hasAttribute('roo-if')):C.attr='if';break;case (A.hasAttribute('roo-name')):C.attr='name';break;case (A.hasAttribute('roo-exec')):C.attr='exec';break;}if(!C.attr){this.iterChild(A,this.compileNode);return;}
 C.uid=this.id++;C.value=A.getAttribute('roo-'+C.attr);A.removeAttribute('roo-'+C.attr);if(C.attr!='name'){var D=document.createTextNode('{domtpl'+C.uid+'}');A.parentNode.replaceChild(D,A);}else {var D=document.createElement('span');D.className='roo-tpl-'+C.value;A.parentNode.replaceChild(D,A);}
 this.iterChild(A,this.compileNode);var E=document.createElement('div');E.appendChild(A);C.dom=A;C.body=E.innerHTML;C.id=C.uid;switch(C.attr){case 'for':switch(C.value){case '.':C.forCall=new Function('values','parent','with(values){ return values; }');break;case '..':C.forCall=new Function('values','parent','with(values){ return parent; }');break;default:C.forCall=new Function('values','parent','with(values){ return '+C.value+'; }');}break;case 'exec':C.execCall=new Function('values','parent','with(values){ '+(Roo.util.Format.htmlDecode(C.value))+'; }');break;case 'if':C.ifCall=new Function('values','parent','with(values){ return '+(Roo.util.Format.htmlDecode(C.value))+'; }');break;case 'name':C.id=C.value;break;}
 this.tpls.push(C);},compileTpl:function(tpl){var fm=Roo.util.Format;var useF=this.disableFormats!==true;var A=Roo.isGecko?"+\n":",\n";var undef=function(C){Roo.log("Property not found :"+C);return '';};var fn=function(m,C,D,E,F){F=F?F.replace(/\\'/g,"'"):F;if(typeof(E)=='undefined'){E='htmlEncode';}if(E=='raw'){E=false;}if(D.substr(0,6)=='domtpl'){return "'"+A+'this.applySubTemplate('+D.substr(6)+', values, parent)'+A+"'";}var G=[];var H='';Roo.each(D.split('.'),function(st){H+=(H.length?'.':'')+st;G.push("(typeof("+H+") == 'undefined')");});var I='(('+G.join(" || ")+") ? undef('"+D+"') : ";if(E&&useF){F=F?','+F:"";if(E.substr(0,5)!="this."){E="fm."+E+'(';}else {E='this.call("'+E.substr(5)+'", ';F=", values";}return "'"+A+I+E+D+F+"))"+A+"'";}if(F.length){return "'"+A+I+D+'('+F+"))"+A+"'";}return "'"+A+I+D+")"+A+"'";};var B;if(Roo.isGecko){B="tpl.compiled = function(values, parent){  with(values) { return '"+tpl.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};};";}else {B=["tpl.compiled = function(values, parent){  with (values) { return ['"];B.push(tpl.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));B.push("'].join('');};};");B=B.join('');}
index 529d4f0..6cbcc91 100644 (file)
@@ -12221,7 +12221,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
      *  x.t:(test,tesT) 
      * 
      */
-    re : /(\{|%7B])([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|%7D)/g,
+    re : /(\{|\%7B)([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|\%7D)/g,
     //re : /\{([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
     
     iterChild : function (node, method) {
@@ -12261,7 +12261,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
         
         // create a top level template from the snippet..
         
-        Roo.log(div.innerHTML);
+        //Roo.log(div.innerHTML);
         
         var tpl = {
             uid : 'master',
@@ -12419,6 +12419,9 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
             return '';
         };
           
+        //Roo.log(tpl.body);
+        
+        
         
         var fn = function(m, lbrace, name, format, args)
         {
index ec39cc6..09be445 100644 (file)
@@ -223,8 +223,8 @@ A=Roo.getDom(A);this.transaction=Roo.Ajax.request({form:A,url:B,success:this.suc
 this.update(this.defaultUrl,null,A,true);},startAutoRefresh:function(A,B,C,D,E){if(E){this.update(B||this.defaultUrl,C,D,true);}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);}
 this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[B||this.defaultUrl,C,D,true]),A*1000);},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId;}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false;},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText);}},prepareUrl:function(A){if(this.disableCaching){var B="_dc="+(new Date().getTime());if(A.indexOf("?")!==-1){A+="&"+B;}else {A+="?"+B;}}return A;},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset){try{A.argument.form.reset();}catch(e){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]));}else {this.renderer.render(this.el,A,this);this.updateComplete(A);}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback(this.el,true,A);}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback(this.el,false,A);}},setRenderer:function(A){this.renderer=A;},getRenderer:function(){return this.renderer;},setDefaultUrl:function(A){this.defaultUrl=A;},abort:function(){if(this.transaction){Roo.Ajax.abort(this.transaction);}},isUpdating:function(){if(this.transaction){return Roo.Ajax.isLoading(this.transaction);}return false;}});Roo.UpdateManager.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Roo.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>'};Roo.UpdateManager.updateElement=function(el,A,B,C){var um=Roo.get(el,true).getUpdateManager();Roo.apply(um,C);um.update(A,B,C?C.callback:null);};Roo.UpdateManager.update=Roo.UpdateManager.updateElement;Roo.UpdateManager.BasicRenderer=function(){};Roo.UpdateManager.BasicRenderer.prototype={render:function(el,A,B,C){el.update(A.responseText,B.loadScripts,C);}};
 //Roo/DomTemplate.js
-Roo.DomTemplate=function(){Roo.DomTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.DomTemplate,Roo.Template,{id:0,inPre:false,tpls:false,re:/(\{|%7B])([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|%7D)/g,iterChild:function(A,B){var C=this.inPre;if(A.tagName=='PRE'){this.inPre=true;}for(var i=0;i<A.childNodes.length;i++){B.call(this,A.childNodes[i]);}
-this.inPre=C;},compile:function(){var s=this.html;var A=document.createElement('div');A.innerHTML=this.html;this.tpls=[];var _t=this;this.iterChild(A,function(n){_t.compileNode(n,true);});var B=this.tpls;Roo.log(A.innerHTML);var C={uid:'master',id:this.id++,attr:false,value:false,body:A.innerHTML,forCall:false,execCall:false,dom:A,isTop:true};B.unshift(C);this.tpls=[];Roo.each(B,function(tp){this.compileTpl(tp);this.tpls[tp.id]=tp;},this);this.master=B[0];return this;},compileNode:function(A,B){if(A.nodeType!=1){if(A.nodeType==3&&!this.inPre){A.nodeValue=A.nodeValue.replace(/\s+/g,' ');}return;}var C={uid:false,id:false,attr:false,value:false,body:'',forCall:false,execCall:false,dom:false,isTop:B};switch(true){case (A.hasAttribute('roo-for')):C.attr='for';break;case (A.hasAttribute('roo-if')):C.attr='if';break;case (A.hasAttribute('roo-name')):C.attr='name';break;case (A.hasAttribute('roo-exec')):C.attr='exec';break;}if(!C.attr){this.iterChild(A,this.compileNode);return;}
+Roo.DomTemplate=function(){Roo.DomTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.DomTemplate,Roo.Template,{id:0,inPre:false,tpls:false,re:/(\{|\%7B)([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|\%7D)/g,iterChild:function(A,B){var C=this.inPre;if(A.tagName=='PRE'){this.inPre=true;}for(var i=0;i<A.childNodes.length;i++){B.call(this,A.childNodes[i]);}
+this.inPre=C;},compile:function(){var s=this.html;var A=document.createElement('div');A.innerHTML=this.html;this.tpls=[];var _t=this;this.iterChild(A,function(n){_t.compileNode(n,true);});var B=this.tpls;var C={uid:'master',id:this.id++,attr:false,value:false,body:A.innerHTML,forCall:false,execCall:false,dom:A,isTop:true};B.unshift(C);this.tpls=[];Roo.each(B,function(tp){this.compileTpl(tp);this.tpls[tp.id]=tp;},this);this.master=B[0];return this;},compileNode:function(A,B){if(A.nodeType!=1){if(A.nodeType==3&&!this.inPre){A.nodeValue=A.nodeValue.replace(/\s+/g,' ');}return;}var C={uid:false,id:false,attr:false,value:false,body:'',forCall:false,execCall:false,dom:false,isTop:B};switch(true){case (A.hasAttribute('roo-for')):C.attr='for';break;case (A.hasAttribute('roo-if')):C.attr='if';break;case (A.hasAttribute('roo-name')):C.attr='name';break;case (A.hasAttribute('roo-exec')):C.attr='exec';break;}if(!C.attr){this.iterChild(A,this.compileNode);return;}
 C.uid=this.id++;C.value=A.getAttribute('roo-'+C.attr);A.removeAttribute('roo-'+C.attr);if(C.attr!='name'){var D=document.createTextNode('{domtpl'+C.uid+'}');A.parentNode.replaceChild(D,A);}else {var D=document.createElement('span');D.className='roo-tpl-'+C.value;A.parentNode.replaceChild(D,A);}
 this.iterChild(A,this.compileNode);var E=document.createElement('div');E.appendChild(A);C.dom=A;C.body=E.innerHTML;C.id=C.uid;switch(C.attr){case 'for':switch(C.value){case '.':C.forCall=new Function('values','parent','with(values){ return values; }');break;case '..':C.forCall=new Function('values','parent','with(values){ return parent; }');break;default:C.forCall=new Function('values','parent','with(values){ return '+C.value+'; }');}break;case 'exec':C.execCall=new Function('values','parent','with(values){ '+(Roo.util.Format.htmlDecode(C.value))+'; }');break;case 'if':C.ifCall=new Function('values','parent','with(values){ return '+(Roo.util.Format.htmlDecode(C.value))+'; }');break;case 'name':C.id=C.value;break;}
 this.tpls.push(C);},compileTpl:function(tpl){var fm=Roo.util.Format;var useF=this.disableFormats!==true;var A=Roo.isGecko?"+\n":",\n";var undef=function(C){Roo.log("Property not found :"+C);return '';};var fn=function(m,C,D,E,F){F=F?F.replace(/\\'/g,"'"):F;if(typeof(E)=='undefined'){E='htmlEncode';}if(E=='raw'){E=false;}if(D.substr(0,6)=='domtpl'){return "'"+A+'this.applySubTemplate('+D.substr(6)+', values, parent)'+A+"'";}var G=[];var H='';Roo.each(D.split('.'),function(st){H+=(H.length?'.':'')+st;G.push("(typeof("+H+") == 'undefined')");});var I='(('+G.join(" || ")+") ? undef('"+D+"') : ";if(E&&useF){F=F?','+F:"";if(E.substr(0,5)!="this."){E="fm."+E+'(';}else {E='this.call("'+E.substr(5)+'", ';F=", values";}return "'"+A+I+E+D+F+"))"+A+"'";}if(F.length){return "'"+A+I+D+'('+F+"))"+A+"'";}return "'"+A+I+D+")"+A+"'";};var B;if(Roo.isGecko){B="tpl.compiled = function(values, parent){  with(values) { return '"+tpl.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};};";}else {B=["tpl.compiled = function(values, parent){  with (values) { return ['"];B.push(tpl.body.replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));B.push("'].join('');};};");B=B.join('');}
index d0f3049..63dbced 100644 (file)
@@ -12221,7 +12221,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
      *  x.t:(test,tesT) 
      * 
      */
-    re : /(\{|%7B])([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|%7D)/g,
+    re : /(\{|\%7B)([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\}|\%7D)/g,
     //re : /\{([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
     
     iterChild : function (node, method) {
@@ -12261,7 +12261,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
         
         // create a top level template from the snippet..
         
-        Roo.log(div.innerHTML);
+        //Roo.log(div.innerHTML);
         
         var tpl = {
             uid : 'master',
@@ -12419,6 +12419,9 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
             return '';
         };
           
+        //Roo.log(tpl.body);
+        
+        
         
         var fn = function(m, lbrace, name, format, args)
         {