]>
Commit | Line | Data |
---|---|---|
063e0b21 DM |
1 | Ext.define('PMG.VirusQuarantineOptions', { |
2 | extend: 'Proxmox.grid.ObjectGrid', | |
3 | alias: ['widget.pmgVirusQuarantineOptions'], | |
4 | ||
5e453db7 DM |
5 | monStoreErrors: true, |
6 | ||
063e0b21 DM |
7 | initComponent : function() { |
8 | var me = this; | |
9 | ||
10 | me.add_integer_row('lifetime', gettext('Lifetime (days)'), | |
11 | { minValue: 1, defaultValue: 7, | |
12 | deleteEmpty: true }); | |
13 | ||
14 | me.add_boolean_row('viewimages', gettext('View images'), | |
15 | { defaultValue: 1}); | |
16 | ||
17 | me.add_boolean_row('allowhrefs', gettext('Allow HREFs'), | |
18 | {defaultValue: 1 }); | |
19 | ||
20 | var baseurl = '/config/virusquar'; | |
21 | ||
22 | me.selModel = Ext.create('Ext.selection.RowModel', {}); | |
23 | ||
24 | Ext.apply(me, { | |
25 | tbar: [{ | |
26 | text: gettext('Edit'), | |
27 | xtype: 'proxmoxButton', | |
28 | disabled: true, | |
131ba4f6 | 29 | handler: function() { me.run_editor(); }, |
063e0b21 DM |
30 | selModel: me.selModel |
31 | }], | |
32 | url: '/api2/json' + baseurl, | |
33 | editorConfig: { | |
771bd0b9 | 34 | url: '/api2/extjs' + baseurl |
063e0b21 DM |
35 | }, |
36 | interval: 5000, | |
37 | cwidth1: 200, | |
38 | listeners: { | |
39 | itemdblclick: me.run_editor | |
40 | } | |
41 | }); | |
42 | ||
43 | me.callParent(); | |
44 | ||
45 | me.on('activate', me.rstore.startUpdate); | |
46 | me.on('destroy', me.rstore.stopUpdate); | |
00564597 | 47 | me.on('deactivate', me.rstore.stopUpdate); |
063e0b21 DM |
48 | } |
49 | }); |