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