]> git.proxmox.com Git - pmg-gui.git/blame - js/MailStatGrid.js
fix #4137: display receiver in attachment/virus quarantine
[pmg-gui.git] / js / MailStatGrid.js
CommitLineData
8067704a
DM
1Ext.define('PMG.MailStatGrid', {
2 extend: 'Ext.grid.GridPanel',
3 xtype: 'pmgMailStatGrid',
c87d46fb 4
8067704a
DM
5 disableSelection: true,
6 hideHeaders: true,
7
8 store: {
c87d46fb 9 fields: ['name', 'value', 'percentage'],
8067704a
DM
10 },
11
12 columns: [
13 {
14 flex: 1,
c87d46fb 15 dataIndex: 'name',
8067704a
DM
16 },
17 {
18 width: 150,
c87d46fb 19 dataIndex: 'value',
8067704a
DM
20 },
21 {
22 width: 300,
c87d46fb 23
8067704a
DM
24 xtype: 'widgetcolumn',
25 dataIndex: 'percentage',
26 widget: {
27 xtype: 'progressbarwidget',
c87d46fb 28 textTpl: ['{percent:number("0")}%'],
8067704a
DM
29 },
30
c87d46fb 31 onWidgetAttach: function(column, widget, rec) {
8067704a
DM
32 if (rec.data.percentage === undefined) {
33 widget.setStyle("visibility: hidden");
34 } else {
35 widget.setStyle("visibility: visible");
36 }
c87d46fb
TL
37 },
38 },
39 ],
8067704a 40});