]> git.proxmox.com Git - extjs.git/blame - extjs/templates/executive-dashboard/app/ux/plugin/RowExpander.js
add extjs 6.0.1 sources
[extjs.git] / extjs / templates / executive-dashboard / app / ux / plugin / RowExpander.js
CommitLineData
6527f429
DM
1/**\r
2 * A simple custom row expander that does not add a "+" / "-" column.\r
3 */\r
4Ext.define('ExecDashboard.ux.plugin.RowExpander', {\r
5 extend: 'Ext.grid.plugin.RowExpander',\r
6\r
7 alias: 'plugin.ux-rowexpander',\r
8\r
9 rowBodyTpl: [\r
10 '<div class="text-wrapper">',\r
11 '<div class="news-data">',\r
12 '<div class="news-paragraph">{paragraph}</div>',\r
13 '<div class="news-toggle collapse"><span>COLLAPSE</span><img src="resources/icons/collapse-news.png"></div>',\r
14 '</div>',\r
15 '</div>'\r
16 ],\r
17\r
18 // don't add the expander +/- because we will use a custom one instead\r
19 addExpander: Ext.emptyFn,\r
20\r
21 addCollapsedCls: {\r
22 fn: function(out, values, parent) {\r
23 var me = this.rowExpander;\r
24\r
25 if (!me.recordsExpanded[values.record.internalId]) {\r
26 values.itemClasses.push(me.rowCollapsedCls);\r
27 } else {\r
28 values.itemClasses.push('x-grid-row-expanded');\r
29 }\r
30 this.nextTpl.applyOut(values, out, parent);\r
31 },\r
32\r
33 syncRowHeights: function(lockedItem, normalItem) {\r
34 this.rowExpander.syncRowHeights(lockedItem, normalItem);\r
35 },\r
36\r
37 // We need a high priority to get in ahead of the outerRowTpl\r
38 // so we can setup row data\r
39 priority: 20000\r
40 }\r
41});\r