X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/docs/source/Template-more.html?ds=sidebyside diff --git a/docs/source/Template-more.html b/docs/source/Template-more.html index 3349efc9..fa5a58ca 100644 --- a/docs/source/Template-more.html +++ b/docs/source/Template-more.html @@ -1,5 +1,6 @@ + The source code @@ -9,6 +10,39 @@ * @class Ext.Template */ Ext.apply(Ext.Template.prototype, { +
/** + * @cfg {Boolean} disableFormats Specify true to disable format + * functions in the template. If the template does not contain + * {@link Ext.util.Format format functions}, setting disableFormats + * to true will reduce {@link #apply} time. Defaults to false. + *

+var t = new Ext.Template(
+    '<div name="{id}">',
+        '<span class="{cls}">{name} {value}</span>',
+    '</div>',
+    {
+        compiled: true,      // {@link #compile} immediately
+        disableFormats: true // reduce {@link #apply} time since no formatting
+    }    
+);
+     * 
+ * For a list of available format functions, see {@link Ext.util.Format}. + */ + disableFormats : false, +
/** + * See {@link #disableFormats}. + * @type Boolean + * @property disableFormats + */ + +
/** + * The regular expression used to match template variables + * @type RegExp + * @property + * @hide repeat doc + */ + re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, +
/** * Returns an HTML fragment of this template with the specified values applied. * @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'}) @@ -51,21 +85,6 @@ Ext.apply(Ext.Template.prototype, { return me.html.replace(me.re, fn); }, -
/** - * true to disable format functions (defaults to false) - * @type Boolean - * @property - */ - disableFormats : false, - -
/** - * The regular expression used to match template variables - * @type RegExp - * @property - * @hide repeat doc - */ - re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, -
/** * Compiles the template into an internal function, eliminating the RegEx overhead. * @return {Ext.Template} this