X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/examples/ux/PreviewPlugin.js diff --git a/examples/ux/PreviewPlugin.js b/examples/ux/PreviewPlugin.js index 4ff4491a..a40e7b9c 100644 --- a/examples/ux/PreviewPlugin.js +++ b/examples/ux/PreviewPlugin.js @@ -34,22 +34,26 @@ Ext.define('Ext.ux.PreviewPlugin', { this.callParent(arguments); var bodyField = this.bodyField, hideBodyCls = this.hideBodyCls, - section = this.getCmp(); + section = this.getCmp(), + features = [{ + ftype: 'rowbody', + getAdditionalData: function(data, idx, record, orig, view) { + var o = Ext.grid.feature.RowBody.prototype.getAdditionalData.apply(this, arguments); + Ext.apply(o, { + rowBody: data[bodyField], + rowBodyCls: section.previewExpanded ? '' : hideBodyCls + }); + return o; + } + },{ + ftype: 'rowwrap' + }]; section.previewExpanded = this.previewExpanded; - section.features = [{ - ftype: 'rowbody', - getAdditionalData: function(data, idx, record, orig, view) { - var o = Ext.grid.feature.RowBody.prototype.getAdditionalData.apply(this, arguments); - Ext.apply(o, { - rowBody: data[bodyField], - rowBodyCls: section.previewExpanded ? '' : hideBodyCls - }); - return o; - } - },{ - ftype: 'rowwrap' - }]; + if (!section.features) { + section.features = []; + } + section.features = features.concat(section.features); }, /**