docs/src/Roo_bootstrap_Card.js.html
[roojs1] / docs / symbols / Roo.DomTemplate.json
1 {
2   "name" : "Roo.DomTemplate",
3   "augments" : [
4     "Roo.Template"
5   ],
6   "desc" : "An effort at a dom based template engine..\n\nSimilar to XTemplate, except it uses dom parsing to create the template..\n\nSupported features:\n\n Tags:\n\n<pre><code>\n      {a_variable} - output encoded.\n      {a_variable.format:(\"Y-m-d\")} - call a method on the variable\n      {a_variable:raw} - unencoded output\n      {a_variable:toFixed(1,2)} - Roo.util.Format.\"toFixed\"\n      {a_variable:this.method_on_template(...)} - call a method on the template object.\n \n</code></pre>\n The tpl tag:\n<pre><code>\n        &lt;div roo-for=\"a_variable or condition..\"&gt;&lt;/div&gt;\n        &lt;div roo-if=\"a_variable or condition\"&gt;&lt;/div&gt;\n        &lt;div roo-exec=\"some javascript\"&gt;&lt;/div&gt;\n        &lt;div roo-name=\"named_template\"&gt;&lt;/div&gt; \n  \n</code></pre>",
7   "isSingleton" : false,
8   "isStatic" : false,
9   "isBuiltin" : false,
10   "memberOf" : "DomTemplate",
11   "example" : "",
12   "deprecated" : "",
13   "since" : "",
14   "see" : "",
15   "params" : [
16   ],
17   "returns" : [
18   ],
19   "config" : [
20     {
21       "name" : "html",
22       "type" : "String",
23       "desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
24       "memberOf" : "Roo.Template",
25       "optvals" : [
26       ]
27     },
28     {
29       "name" : "url",
30       "type" : "String",
31       "desc" : "The Url to load the template from. beware if you are loading from a url, the data may not be ready if you use it instantly..\n                   it should be fixed so that template is observable...",
32       "memberOf" : "Roo.Template",
33       "optvals" : [
34       ]
35     }
36   ],
37   "methods" : [
38     {
39       "name" : "applySubTemplate",
40       "desc" : "same as applyTemplate, except it's done to one of the subTemplates\nwhen using named templates, you can do:\n\nvar str = pl.applySubTemplate('your-name', values);",
41       "isStatic" : false,
42       "isConstructor" : false,
43       "isPrivate" : false,
44       "memberOf" : "Roo.DomTemplate",
45       "example" : "",
46       "deprecated" : "",
47       "since" : "",
48       "see" : "",
49       "params" : [
50         {
51           "name" : "id",
52           "type" : "Number",
53           "desc" : "of the template",
54           "isOptional" : false
55         },
56         {
57           "name" : "values",
58           "type" : "Object",
59           "desc" : "to apply to template",
60           "isOptional" : false
61         },
62         {
63           "name" : "parent",
64           "type" : "Object",
65           "desc" : "(normaly the instance of this object)",
66           "isOptional" : false
67         }
68       ],
69       "returns" : [
70       ]
71     },
72     {
73       "name" : "compile",
74       "desc" : "compile the template\n\nThis is not recursive, so I'm not sure how nested templates are really going to be handled..",
75       "isStatic" : false,
76       "isConstructor" : false,
77       "isPrivate" : false,
78       "memberOf" : "Roo.DomTemplate",
79       "example" : "",
80       "deprecated" : "",
81       "since" : "",
82       "see" : "",
83       "params" : [
84       ],
85       "returns" : [
86       ]
87     },
88     {
89       "name" : "compileTpl",
90       "desc" : "Compile a segment of the template into a 'sub-template'",
91       "isStatic" : false,
92       "isConstructor" : false,
93       "isPrivate" : false,
94       "memberOf" : "Roo.DomTemplate",
95       "example" : "",
96       "deprecated" : "",
97       "since" : "",
98       "see" : "",
99       "params" : [
100       ],
101       "returns" : [
102       ]
103     },
104     {
105       "name" : "insertFirst",
106       "desc" : "Applies the supplied values to the template and inserts the new node(s) as the first child of el.",
107       "isStatic" : false,
108       "isConstructor" : false,
109       "isPrivate" : false,
110       "memberOf" : "Roo.Template",
111       "example" : "",
112       "deprecated" : "",
113       "since" : "",
114       "see" : "",
115       "params" : [
116         {
117           "name" : "el",
118           "type" : "String/HTMLElement/Roo.Element",
119           "desc" : "The context element",
120           "isOptional" : false
121         },
122         {
123           "name" : "values",
124           "type" : "Object",
125           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
126           "isOptional" : false
127         },
128         {
129           "name" : "returnElement",
130           "type" : "Boolean",
131           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
132           "isOptional" : false
133         }
134       ],
135       "returns" : [
136         {
137           "name" : "",
138           "type" : "HTMLElement/Roo.Element",
139           "desc" : "The new node or Element"
140         }
141       ]
142     },
143     {
144       "name" : "overwrite",
145       "desc" : "Applies the supplied values to the template and overwrites the content of el with the new node(s).",
146       "isStatic" : false,
147       "isConstructor" : false,
148       "isPrivate" : false,
149       "memberOf" : "Roo.Template",
150       "example" : "",
151       "deprecated" : "",
152       "since" : "",
153       "see" : "",
154       "params" : [
155         {
156           "name" : "el",
157           "type" : "String/HTMLElement/Roo.Element",
158           "desc" : "The context element",
159           "isOptional" : false
160         },
161         {
162           "name" : "values",
163           "type" : "Object",
164           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
165           "isOptional" : false
166         },
167         {
168           "name" : "returnElement",
169           "type" : "Boolean",
170           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
171           "isOptional" : false
172         }
173       ],
174       "returns" : [
175         {
176           "name" : "",
177           "type" : "HTMLElement/Roo.Element",
178           "desc" : "The new node or Element"
179         }
180       ]
181     },
182     {
183       "name" : "insertBefore",
184       "desc" : "Applies the supplied values to the template and inserts the new node(s) before el.",
185       "isStatic" : false,
186       "isConstructor" : false,
187       "isPrivate" : false,
188       "memberOf" : "Roo.Template",
189       "example" : "",
190       "deprecated" : "",
191       "since" : "",
192       "see" : "",
193       "params" : [
194         {
195           "name" : "el",
196           "type" : "String/HTMLElement/Roo.Element",
197           "desc" : "The context element",
198           "isOptional" : false
199         },
200         {
201           "name" : "values",
202           "type" : "Object",
203           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
204           "isOptional" : false
205         },
206         {
207           "name" : "returnElement",
208           "type" : "Boolean",
209           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
210           "isOptional" : false
211         }
212       ],
213       "returns" : [
214         {
215           "name" : "",
216           "type" : "HTMLElement/Roo.Element",
217           "desc" : "The new node or Element"
218         }
219       ]
220     },
221     {
222       "name" : "applyTemplate",
223       "desc" : "Returns an HTML fragment of this template with the specified values applied.",
224       "isStatic" : false,
225       "isConstructor" : false,
226       "isPrivate" : false,
227       "memberOf" : "Roo.Template",
228       "example" : "",
229       "deprecated" : "",
230       "since" : "",
231       "see" : "",
232       "params" : [
233         {
234           "name" : "values",
235           "type" : "Object",
236           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
237           "isOptional" : false
238         }
239       ],
240       "returns" : [
241         {
242           "name" : "",
243           "type" : "String",
244           "desc" : "The HTML fragment"
245         }
246       ]
247     },
248     {
249       "name" : "set",
250       "desc" : "Sets the HTML used as the template and optionally compiles it.",
251       "isStatic" : false,
252       "isConstructor" : false,
253       "isPrivate" : false,
254       "memberOf" : "Roo.Template",
255       "example" : "",
256       "deprecated" : "",
257       "since" : "",
258       "see" : "",
259       "params" : [
260         {
261           "name" : "html",
262           "type" : "String",
263           "desc" : "",
264           "isOptional" : false
265         },
266         {
267           "name" : "compile",
268           "type" : "Boolean",
269           "desc" : "(optional) True to compile the template (defaults to undefined)",
270           "isOptional" : false
271         }
272       ],
273       "returns" : [
274         {
275           "name" : "",
276           "type" : "Roo.Template",
277           "desc" : "this"
278         }
279       ]
280     },
281     {
282       "name" : "from",
283       "desc" : "Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.",
284       "isStatic" : true,
285       "isConstructor" : false,
286       "isPrivate" : false,
287       "memberOf" : "Roo.Template",
288       "example" : "",
289       "deprecated" : "",
290       "since" : "",
291       "see" : "",
292       "params" : [
293         {
294           "name" : "el",
295           "type" : "String/HTMLElement",
296           "desc" : "A DOM element or its id",
297           "isOptional" : false
298         }
299       ],
300       "returns" : [
301       ]
302     },
303     {
304       "name" : "insertAfter",
305       "desc" : "Applies the supplied values to the template and inserts the new node(s) after el.",
306       "isStatic" : false,
307       "isConstructor" : false,
308       "isPrivate" : false,
309       "memberOf" : "Roo.Template",
310       "example" : "",
311       "deprecated" : "",
312       "since" : "",
313       "see" : "",
314       "params" : [
315         {
316           "name" : "el",
317           "type" : "String/HTMLElement/Roo.Element",
318           "desc" : "The context element",
319           "isOptional" : false
320         },
321         {
322           "name" : "values",
323           "type" : "Object",
324           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
325           "isOptional" : false
326         },
327         {
328           "name" : "returnElement",
329           "type" : "Boolean",
330           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
331           "isOptional" : false
332         }
333       ],
334       "returns" : [
335         {
336           "name" : "",
337           "type" : "HTMLElement/Roo.Element",
338           "desc" : "The new node or Element"
339         }
340       ]
341     },
342     {
343       "name" : "append",
344       "desc" : "Applies the supplied values to the template and appends the new node(s) to el.",
345       "isStatic" : false,
346       "isConstructor" : false,
347       "isPrivate" : false,
348       "memberOf" : "Roo.Template",
349       "example" : "",
350       "deprecated" : "",
351       "since" : "",
352       "see" : "",
353       "params" : [
354         {
355           "name" : "el",
356           "type" : "String/HTMLElement/Roo.Element",
357           "desc" : "The context element",
358           "isOptional" : false
359         },
360         {
361           "name" : "values",
362           "type" : "Object",
363           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
364           "isOptional" : false
365         },
366         {
367           "name" : "returnElement",
368           "type" : "Boolean",
369           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
370           "isOptional" : false
371         }
372       ],
373       "returns" : [
374         {
375           "name" : "",
376           "type" : "HTMLElement/Roo.Element",
377           "desc" : "The new node or Element"
378         }
379       ]
380     },
381     {
382       "name" : "apply",
383       "desc" : "Alias for {@link #applyTemplate}",
384       "isStatic" : false,
385       "isConstructor" : false,
386       "isPrivate" : false,
387       "memberOf" : "Roo.Template",
388       "example" : "",
389       "deprecated" : "",
390       "since" : "",
391       "see" : "",
392       "params" : [
393       ],
394       "returns" : [
395       ]
396     }
397   ],
398   "events" : [
399   ]
400 }