/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_Template({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.XTemplate"],"extends":null,"uses":[],"html":"
Subclasses
Files
Represents an HTML fragment template. Templates may be precompiled\nfor greater performance.
\n\n\nFor example usage see the constructor.
\n\nSpecify true to compile the template\nimmediately (see compile
).\nDefaults to false.
Specify true to disable format\nfunctions in the template. If the template does not contain\nformat functions, setting disableFormats
\nto true will reduce apply
time. Defaults to false.
var t = new Ext.Template(\n '<div name=\"{id}\">',\n '<span class=\"{cls}\">{name} {value}</span>',\n '</div>',\n {\n compiled: true, // compile immediately\n disableFormats: true // reduce apply
time since no formatting\n }\n);\n
\n\n\nFor a list of available format functions, see Ext.util.Format.
\nDefaults to: false
The regular expression used to match template variables.\nDefaults to:
\n\nre : /\\{([\\w\\-]+)\\}/g // for Ext Core\nre : /\\{([\\w\\-]+)(?:\\:([\\w\\.]*)(?:\\((.*?)?\\))?)?\\}/g // for Ext JS\n
\n\nDefaults to: /\\{([\\w\\-]+)\\}/g
An instance of this class may be created by passing to the constructor either\na single argument, or multiple arguments:
\n\nvar t = new Ext.Template(\"<div>Hello {0}.</div>\");\nt.append('some-element', ['foo']);\n
\njoin('')
.\nvar t = new Ext.Template([\n '<div name=\"{id}\">',\n '<span class=\"{cls}\">{name:trim} {value:ellipsis(10)}</span>',\n '</div>',\n]);\nt.compile();\nt.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});\n
\njoin('')
.\nvar t = new Ext.Template(\n '<div name=\"{id}\">',\n '<span class=\"{cls}\">{name} {value}</span>',\n '</div>',\n // a configuration object:\n {\n compiled: true, // compile immediately\n disableFormats: true // See Notes below.\n }\n);\n
\nNotes:
\ndisableFormats
are not applicable for Ext Core.disableFormats
reduces apply
time\nwhen no formatting is required.Applies the supplied values
to the template and appends\nthe new node(s) to the specified el
.
For example usage see the constructor.
\n\nThe context element
\nThe template values. Can be an array if the params are numeric (i.e. {0}
)\nor an object (i.e. {foo: 'bar'}
).
true to return an Ext.Element (defaults to undefined)
\nThe new node or Element
\nAlias for applyTemplate\nReturns an HTML fragment of this template with the specified values
applied.
The template values. Can be an array if the params are numeric (i.e. {0}
)\nor an object (i.e. {foo: 'bar'}
).
The HTML fragment
\nCompiles the template into an internal function, eliminating the RegEx overhead.
\nthis
\nApplies the supplied values to the template and inserts the new node(s) after el.
\nThe context element
\nThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
\ntrue to return a Ext.Element (defaults to undefined)
\nThe new node or Element
\nApplies the supplied values to the template and inserts the new node(s) before el.
\nThe context element
\nThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
\ntrue to return a Ext.Element (defaults to undefined)
\nThe new node or Element
\nApplies the supplied values to the template and inserts the new node(s) as the first child of el.
\nThe context element
\nThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
\ntrue to return a Ext.Element (defaults to undefined)
\nThe new node or Element
\nApplies the supplied values to the template and overwrites the content of el with the new node(s).
\nThe context element
\nThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
\ntrue to return a Ext.Element (defaults to undefined)
\nThe new node or Element
\nSets the HTML used as the template and optionally compiles it.
\nTrue to compile the template (defaults to undefined)
\nthis
\nCreates a template from the passed element's value (display:none textarea, preferred) or innerHTML.
\nA DOM element or its id
\nA configuration object
\nThe created template
\n