-<html>
-<head>
- <title>The source code</title>
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.grid.Column"></div>/**\r
+<html>\r
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js"><div id="cls-Ext.grid.Column"></div>/**\r
* @class Ext.grid.Column\r
* <p>This class encapsulates column configuration data to be used in the initialization of a\r
* {@link Ext.grid.ColumnModel ColumnModel}.</p>\r
* <p>While subclasses are provided to render data in different ways, this class renders a passed\r
* data field unchanged and is usually used for textual columns.</p>\r
*/\r
-Ext.grid.Column = function(config){\r
- Ext.apply(this, config);\r
-\r
- if(Ext.isString(this.renderer)){\r
- this.renderer = Ext.util.Format[this.renderer];\r
- } else if(Ext.isObject(this.renderer)){\r
- this.scope = this.renderer.scope;\r
- this.renderer = this.renderer.fn;\r
- }\r
- this.renderer = this.renderer.createDelegate(this.scope || config);\r
-\r
- if(this.editor){\r
- this.editor = Ext.create(this.editor, 'textfield');\r
- }\r
-};\r
-\r
-Ext.grid.Column.prototype = {\r
+Ext.grid.Column = Ext.extend(Object, {\r
<div id="cfg-Ext.grid.Column-editable"></div>/**\r
* @cfg {Boolean} editable Optional. Defaults to <tt>true</tt>, enabling the configured\r
* <tt>{@link #editor}</tt>. Set to <tt>false</tt> to initially disable editing on this column.\r
* Defaults to true.\r
*/\r
isColumn : true,\r
+ \r
+ constructor : function(config){\r
+ Ext.apply(this, config);\r
+\r
+ if(Ext.isString(this.renderer)){\r
+ this.renderer = Ext.util.Format[this.renderer];\r
+ }else if(Ext.isObject(this.renderer)){\r
+ this.scope = this.renderer.scope;\r
+ this.renderer = this.renderer.fn;\r
+ }\r
+ if(!this.scope){\r
+ this.scope = this;\r
+ }\r
+\r
+ if(this.editor){\r
+ this.editor = Ext.create(this.editor, 'textfield');\r
+ }\r
+ },\r
\r
<div id="prop-Ext.grid.Column-renderer"></div>/**\r
* Optional. A function which returns displayable data when passed the following parameters:\r
}\r
return null;\r
}\r
-};\r
+});\r
\r
<div id="cls-Ext.grid.BooleanColumn"></div>/**\r
* @class Ext.grid.BooleanColumn\r
*/\r
constructor: function(cfg){\r
Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg);\r
- var tpl = Ext.isObject(this.tpl) ? this.tpl : new Ext.XTemplate(this.tpl);\r
+ var tpl = (!Ext.isPrimitive(this.tpl) && this.tpl.compile) ? this.tpl : new Ext.XTemplate(this.tpl);\r
this.renderer = function(value, p, r){\r
return tpl.apply(r.data);\r
};\r
numbercolumn: Ext.grid.NumberColumn,\r
datecolumn: Ext.grid.DateColumn,\r
templatecolumn: Ext.grid.TemplateColumn\r
-};</pre>
-</body>
+};</pre> \r
+</body>\r
</html>
\ No newline at end of file