tvheadend/vendor/ext-3.4.1/docs/source/Column2.html
Adam Sutton bafcfff42d webui: restructure webui/extjs source files
I want to keep the 3rd-party packages away from the main source
where possible.
2013-06-03 17:11:01 +01:00

171 lines
7.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<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>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-list-Column'>/**
</span> * @class Ext.list.Column
* &lt;p&gt;This class encapsulates column configuration data to be used in the initialization of a
* {@link Ext.list.ListView ListView}.&lt;/p&gt;
* &lt;p&gt;While subclasses are provided to render data in different ways, this class renders a passed
* data field unchanged and is usually used for textual columns.&lt;/p&gt;
*/
Ext.list.Column = Ext.extend(Object, {
<span id='Ext-list-Column-cfg-isColumn'> /**
</span> * @private
* @cfg {Boolean} isColumn
* Used by ListView constructor method to avoid reprocessing a Column
* if &lt;code&gt;isColumn&lt;/code&gt; is not set ListView will recreate a new Ext.list.Column
* Defaults to true.
*/
isColumn: true,
<span id='Ext-list-Column-cfg-align'> /**
</span> * @cfg {String} align
* Set the CSS text-align property of the column. Defaults to &lt;tt&gt;'left'&lt;/tt&gt;.
*/
align: 'left',
<span id='Ext-list-Column-cfg-header'> /**
</span> * @cfg {String} header Optional. The header text to be used as innerHTML
* (html tags are accepted) to display in the ListView. &lt;b&gt;Note&lt;/b&gt;: to
* have a clickable header with no text displayed use &lt;tt&gt;'&amp;#160;'&lt;/tt&gt;.
*/
header: '',
<span id='Ext-list-Column-cfg-width'> /**
</span> * @cfg {Number} width Optional. Percentage of the container width
* this column should be allocated. Columns that have no width specified will be
* allocated with an equal percentage to fill 100% of the container width. To easily take
* advantage of the full container width, leave the width of at least one column undefined.
* Note that if you do not want to take up the full width of the container, the width of
* every column needs to be explicitly defined.
*/
width: null,
<span id='Ext-list-Column-cfg-cls'> /**
</span> * @cfg {String} cls Optional. This option can be used to add a CSS class to the cell of each
* row for this column.
*/
cls: '',
<span id='Ext-list-Column-cfg-tpl'> /**
</span> * @cfg {String} tpl Optional. Specify a string to pass as the
* configuration string for {@link Ext.XTemplate}. By default an {@link Ext.XTemplate}
* will be implicitly created using the &lt;tt&gt;dataIndex&lt;/tt&gt;.
*/
<span id='Ext-list-Column-cfg-dataIndex'> /**
</span> * @cfg {String} dataIndex &lt;p&gt;&lt;b&gt;Required&lt;/b&gt;. The name of the field in the
* ListViews's {@link Ext.data.Store}'s {@link Ext.data.Record} definition from
* which to draw the column's value.&lt;/p&gt;
*/
constructor : function(c){
if(!c.tpl){
c.tpl = new Ext.XTemplate('{' + c.dataIndex + '}');
}
else if(Ext.isString(c.tpl)){
c.tpl = new Ext.XTemplate(c.tpl);
}
Ext.apply(this, c);
}
});
Ext.reg('lvcolumn', Ext.list.Column);
<span id='Ext-list-NumberColumn'>/**
</span> * @class Ext.list.NumberColumn
* @extends Ext.list.Column
* &lt;p&gt;A Column definition class which renders a numeric data field according to a {@link #format} string. See the
* {@link Ext.list.Column#xtype xtype} config option of {@link Ext.list.Column} for more details.&lt;/p&gt;
*/
Ext.list.NumberColumn = Ext.extend(Ext.list.Column, {
<span id='Ext-list-NumberColumn-cfg-format'> /**
</span> * @cfg {String} format
* A formatting string as used by {@link Ext.util.Format#number} to format a numeric value for this Column
* (defaults to &lt;tt&gt;'0,000.00'&lt;/tt&gt;).
*/
format: '0,000.00',
<span id='Ext-list-NumberColumn-method-constructor'> constructor : function(c) {
</span> c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':number(&quot;' + (c.format || this.format) + '&quot;)}');
Ext.list.NumberColumn.superclass.constructor.call(this, c);
}
});
Ext.reg('lvnumbercolumn', Ext.list.NumberColumn);
<span id='Ext-list-DateColumn'>/**
</span> * @class Ext.list.DateColumn
* @extends Ext.list.Column
* &lt;p&gt;A Column definition class which renders a passed date according to the default locale, or a configured
* {@link #format}. See the {@link Ext.list.Column#xtype xtype} config option of {@link Ext.list.Column}
* for more details.&lt;/p&gt;
*/
Ext.list.DateColumn = Ext.extend(Ext.list.Column, {
<span id='Ext-list-DateColumn-property-format'> format: 'm/d/Y',
</span><span id='Ext-list-DateColumn-method-constructor'> constructor : function(c) {
</span> c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':date(&quot;' + (c.format || this.format) + '&quot;)}');
Ext.list.DateColumn.superclass.constructor.call(this, c);
}
});
Ext.reg('lvdatecolumn', Ext.list.DateColumn);
<span id='Ext-list-BooleanColumn'>/**
</span> * @class Ext.list.BooleanColumn
* @extends Ext.list.Column
* &lt;p&gt;A Column definition class which renders boolean data fields. See the {@link Ext.list.Column#xtype xtype}
* config option of {@link Ext.list.Column} for more details.&lt;/p&gt;
*/
Ext.list.BooleanColumn = Ext.extend(Ext.list.Column, {
<span id='Ext-list-BooleanColumn-cfg-trueText'> /**
</span> * @cfg {String} trueText
* The string returned by the renderer when the column value is not falsey (defaults to &lt;tt&gt;'true'&lt;/tt&gt;).
*/
trueText: 'true',
<span id='Ext-list-BooleanColumn-cfg-falseText'> /**
</span> * @cfg {String} falseText
* The string returned by the renderer when the column value is falsey (but not undefined) (defaults to
* &lt;tt&gt;'false'&lt;/tt&gt;).
*/
falseText: 'false',
<span id='Ext-list-BooleanColumn-cfg-undefinedText'> /**
</span> * @cfg {String} undefinedText
* The string returned by the renderer when the column value is undefined (defaults to &lt;tt&gt;'&amp;#160;'&lt;/tt&gt;).
*/
undefinedText: '&amp;#160;',
<span id='Ext-list-BooleanColumn-method-constructor'> constructor : function(c) {
</span> c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}');
var t = this.trueText, f = this.falseText, u = this.undefinedText;
c.tpl.format = function(v){
if(v === undefined){
return u;
}
if(!v || v === 'false'){
return f;
}
return t;
};
Ext.list.DateColumn.superclass.constructor.call(this, c);
}
});
Ext.reg('lvbooleancolumn', Ext.list.BooleanColumn);</pre>
</body>
</html>