Roo/DomTemplate.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 10 Apr 2012 10:51:54 +0000 (18:51 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 10 Apr 2012 10:51:54 +0000 (18:51 +0800)
Roo/DomTemplate.js

index 100c3d0..cab2dfe 100644 (file)
@@ -146,6 +146,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
         Roo.log("TEMPLATE : " + tpl.uid);        
         Roo.log(html);
         
+        tpl.id = tpl.uid;
         switch(tpl.attr) {
             case 'for' :
                 switch (attr.value) {
@@ -159,10 +160,14 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
                 tpl.execCall = new Function('values', 'parent', 'with(values){ '+(Roo.util.Format.htmlDecode(attr.value))+'; }');
                 break;
             
-            case 'if': 
-                
+            case 'if':     
                 tpl.ifCall = new Function('values', 'parent', 'with(values){ return '+(Roo.util.Format.htmlDecode(attr.value))+'; }');
-                }
+                break;
+            
+            case 'name':
+                tpl.id  = value; // replace non characters???
+                break;
+            
         }