X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/src/util/XTemplate.js diff --git a/src/util/XTemplate.js b/src/util/XTemplate.js index e8e78156..e1588d66 100644 --- a/src/util/XTemplate.js +++ b/src/util/XTemplate.js @@ -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 @@ -7,12 +7,38 @@ /** * @class Ext.XTemplate * @extends Ext.Template - *

A template class that supports advanced functionality like autofilling arrays, conditional processing with - * basic comparison operators, sub-templates, basic math function support, special built-in template variables, - * inline code execution and more. XTemplate also provides the templating mechanism built into {@link Ext.DataView}.

- *

XTemplate supports many special tags and built-in operators that aren't defined as part of the API, but are - * supported in the templates that can be created. The following examples demonstrate all of the supported features. - * This is the data object used for reference in each code example:

+ *

A template class that supports advanced functionality like:

+ *

XTemplate provides the templating mechanism built into:

+ * + *

For example usage {@link #XTemplate see the constructor}.

+ * + * @constructor + * The {@link Ext.Template#Template Ext.Template constructor} describes + * the acceptable parameters to pass to the constructor. The following + * examples demonstrate all of the supported features.

+ * + *
+ * + * @param {Mixed} config */ Ext.XTemplate = function(){ Ext.XTemplate.superclass.constructor.apply(this, arguments); @@ -310,7 +408,8 @@ Ext.extend(Ext.XTemplate, Ext.Template, { } function codeFn(m, code){ - return "'"+ sep +'('+code+')'+sep+"'"; + // Single quotes get escaped when the template is compiled, however we want to undo this when running code. + return "'" + sep + '(' + code.replace(/\\'/g, "'") + ')' + sep + "'"; } // branched to use + in gecko and [].join() in others