Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / src / core / Template-more.js
index d6a5f92..ef37a25 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.0.3
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -8,6 +8,39 @@
  * @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
+    '&lt;div name="{id}"&gt;',\r
+        '&lt;span class="{cls}"&gt;{name} {value}&lt;/span&gt;',\r
+    '&lt;/div&gt;',\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
@@ -50,21 +83,6 @@ Ext.apply(Ext.Template.prototype, {
         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