a75146434aec8c161482cc237cda0d7aa49b377b
[roojs1] / examples / view / xtemplate.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4     <link rel="stylesheet" type="text/css" href="../../cssX/roojs-all.css"/>
5     <link rel="stylesheet" type="text/css" href="../../cssX/xtheme-slate.css"/>
6
7     <script type="text/javascript" src="../../roojs-all.js"></script>   
8     <script type="text/javascript" src="../../Roo/XTemplate.js"></script>   
9   
10
11 <script type="text/javascript">
12     
13 Roo.onReady(function() {
14     
15     var tpl = new Roo.XTemplate({
16        html : '<tpl for="parray">' + 
17                 '<li>{pa.format:("Y-m-d")}</li>' +
18                 
19                 '<tpl if="first_of_day * 1">'    
20                     '<li  class="change-log-day"><a
21                         name="changedate-{changedate.format:('Y-m-d')}">{changedate.format:('d / M / Y')}</a></li>' +
22                 '</tpl>' 
23                 '</tpl>';
24            
25      
26     });
27     
28     tpl.append(Roo.get('body'),{ 
29         parray : [ 
30             {
31                 pa : new Date() 
32             },
33             {
34                 pa : new Date() 
35             }
36         ]
37     });
38      
39 });
40      
41      
42 </script>
43
44 </head>
45 <body>
46     <div id="body"></div> 
47 </body>
48 </html>