4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-grid-feature-RowWrap'>/**
19 </span> * @class Ext.grid.feature.RowWrap
20 * @extends Ext.grid.feature.Feature
23 Ext.define('Ext.grid.feature.RowWrap', {
24 extend: 'Ext.grid.feature.Feature',
25 alias: 'feature.rowwrap',
27 // turn off feature events.
28 hasFeatureEvent: false,
30 mutateMetaRowTpl: function(metaRowTpl) {
31 // Remove "x-grid-row" from the first row, note this could be wrong
32 // if some other feature unshifted things in front.
33 metaRowTpl[0] = metaRowTpl[0].replace(Ext.baseCSSPrefix + 'grid-row', '');
34 metaRowTpl[0] = metaRowTpl[0].replace("{[this.embedRowCls()]}", "");
36 metaRowTpl.unshift('<table class="' + Ext.baseCSSPrefix + 'grid-table ' + Ext.baseCSSPrefix + 'grid-table-resizer" style="width: {[this.embedFullWidth()]}px;">');
38 metaRowTpl.unshift('<tr class="' + Ext.baseCSSPrefix + 'grid-row {[this.embedRowCls()]}"><td colspan="{[this.embedColSpan()]}"><div class="' + Ext.baseCSSPrefix + 'grid-rowwrap-div">');
41 metaRowTpl.push('</table>');
43 metaRowTpl.push('</div></td></tr>');
46 embedColSpan: function() {
50 embedFullWidth: function() {
54 getAdditionalData: function(data, idx, record, orig) {
55 var headerCt = this.view.headerCt,
56 colspan = headerCt.getColumnCount(),
57 fullWidth = headerCt.getFullWidth(),
58 items = headerCt.query('gridcolumn'),
59 itemsLn = items.length,
69 for (; i < itemsLn; i++) {
71 tdClsKey = id + '-tdCls';
72 colResizerCls = Ext.baseCSSPrefix + 'grid-col-resizer-'+id;
73 // give the inner td's the resizer class
74 // while maintaining anything a user may have injected via a custom
76 o[tdClsKey] = colResizerCls + " " + (orig[tdClsKey] ? orig[tdClsKey] : '');
77 // TODO: Unhackify the initial rendering width's
78 o[id+'-tdAttr'] = " style=\"width: " + (items[i].hidden ? 0 : items[i].getDesiredWidth()) + "px;\" "/* + (i === 0 ? " rowspan=\"2\"" : "")*/;
79 if (orig[id+'-tdAttr']) {
80 o[id+'-tdAttr'] += orig[id+'-tdAttr'];
88 getMetaRowTplFragments: function() {
90 embedFullWidth: this.embedFullWidth,
91 embedColSpan: this.embedColSpan