/*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
+ * Ext JS Library 3.1.1
+ * Copyright(c) 2006-2010 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
* @class Ext.Template\r
*/\r
Ext.apply(Ext.Template.prototype, {\r
+ /**\r
+ * @cfg {Boolean} disableFormats Specify <tt>true</tt> to disable format\r
+ * functions in the template. If the template does not contain\r
+ * {@link Ext.util.Format format functions}, setting <code>disableFormats</code>\r
+ * to true will reduce <code>{@link #apply}</code> time. Defaults to <tt>false</tt>.\r
+ * <pre><code>\r
+var t = new Ext.Template(\r
+ '<div name="{id}">',\r
+ '<span class="{cls}">{name} {value}</span>',\r
+ '</div>',\r
+ {\r
+ compiled: true, // {@link #compile} immediately\r
+ disableFormats: true // reduce <code>{@link #apply}</code> time since no formatting\r
+ } \r
+);\r
+ * </code></pre>\r
+ * For a list of available format functions, see {@link Ext.util.Format}.\r
+ */\r
+ disableFormats : false, \r
+ /**\r
+ * See <code>{@link #disableFormats}</code>.\r
+ * @type Boolean\r
+ * @property disableFormats\r
+ */\r
+\r
+ /**\r
+ * The regular expression used to match template variables\r
+ * @type RegExp\r
+ * @property\r
+ * @hide repeat doc\r
+ */\r
+ re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,\r
+\r
/**\r
* Returns an HTML fragment of this template with the specified values applied.\r
* @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})\r
return me.html.replace(me.re, fn);\r
},\r
\r
- /**\r
- * <tt>true</tt> to disable format functions (defaults to <tt>false</tt>)\r
- * @type Boolean\r
- * @property\r
- */\r
- disableFormats : false, \r
- \r
- /**\r
- * The regular expression used to match template variables\r
- * @type RegExp\r
- * @property\r
- * @hide repeat doc\r
- */\r
- re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,\r
- \r
/**\r
* Compiles the template into an internal function, eliminating the RegEx overhead.\r
* @return {Ext.Template} this\r