]> git.proxmox.com Git - extjs.git/blob - extjs/templates/admin-dashboard/modern/src/view/tablet/email/Inbox.js
add extjs 6.0.1 sources
[extjs.git] / extjs / templates / admin-dashboard / modern / src / view / tablet / email / Inbox.js
1 Ext.define('Admin.view.tablet.email.Inbox', {
2 extend: 'Ext.grid.Grid',
3 // xtype is assigned by the tablet profile
4
5 requires: [
6 'Ext.grid.plugin.MultiSelection'
7 ],
8
9 itemConfig: {
10 viewModel: true,
11 bind: {
12 userCls: 'inbox-{record.read:pick("unread","read")}'
13 }
14 },
15
16 plugins: {
17 type: 'gridmultiselection',
18
19 selectionColumn: {
20 hidden: false,
21 width: 40 // Change column width from the default of 60px
22 }
23 },
24
25 rowLines: false,
26
27 columns: [
28 {
29 text: '<span class="x-fa fa-heart"></span>',
30 menuDisabled: true,
31 width: 36,
32 dataIndex: 'favorite',
33 userCls: 'inbox-favorite-icon',
34 align: 'center',
35 cell: {
36 align: 'center',
37 bind: {
38 innerCls: 'x-fa {record.favorite:pick("fa-heart-o", "fa-heart inbox-favorite-icon")}'
39 }
40 },
41 renderer: function(){
42 // Return nothing so the boolean value is not published
43 // The column remains sortable, while still displaying the image
44 return '';
45 }
46 },
47 {
48 text: 'From',
49 dataIndex: 'from',
50 width: 150,
51 cell: {
52 innerCls: 'inbox-from'
53 }
54 },
55 {
56 text: 'Title',
57 dataIndex: 'title',
58 flex: 1,
59 cell: {
60 innerCls: 'inbox-title'
61 }
62 },
63 {
64 text: '<span class="x-fa fa-paperclip"></span>',
65 width: 40,
66 align: 'center',
67 dataIndex: 'has_attachments',
68 cell: {
69 align: 'center',
70 bind: {
71 innerCls: 'x-fa {record.has_attachments:pick("", "fa-paperclip")}'
72 }
73 },
74 renderer: function(){
75 // Return nothing so the boolean value is not published
76 // The column remains sortable, while still displaying the image
77 return '';
78 }
79 },
80 {
81 text: 'Received',
82 xtype: 'datecolumn',
83 format:'Y-m-d',
84 dataIndex: 'received_on',
85 width: 90
86 }
87 ]
88 });