add virusfilter

we now also disable the edit button if the objectgroup editor has an
'uneditable' flag set, we need this, because the virusfilter has nothing
which we could edit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-10-12 11:42:37 +02:00 committed by Dietmar Maurer
parent b79fbba8e4
commit 8ddd9c44f5
3 changed files with 18 additions and 2 deletions

View File

@ -138,7 +138,7 @@ Ext.define('PMG.ObjectGroup', {
}
var editor = PMG.Utils.object_editors[rec.data.otype];
if (!editor) {
if (!editor || editor.uneditable) {
return;
}
@ -195,6 +195,10 @@ Ext.define('PMG.ObjectGroup', {
text: gettext('Edit'),
disabled: true,
selModel: me.selModel,
enableFn: function(rec) {
var editor = PMG.Utils.object_editors[rec.data.otype];
return (editor && !editor.uneditable);
},
handler: run_editor
},
remove_btn

View File

@ -91,6 +91,6 @@ Ext.define('PMG.WhatConfiguration', {
xtype: 'pmgWhatConfiguration',
ogclass: 'what',
otype_list: [3000, 3002, 3003, 3004, 3005]
otype_list: [3000, 3001, 3002, 3003, 3004, 3005]
});

View File

@ -286,6 +286,18 @@ Ext.define('PMG.Utils', {
}
]
},
3001: {
xtype: 'proxmoxWindowEdit',
subdir: 'virusfilter',
subject: gettext('Virus Filter'),
uneditable: true,
// there are no parameters to give, so we simply submit it
listeners: {
show: function(win) {
win.submit();
}
}
},
3002: {
xtype: 'proxmoxWindowEdit',
subdir: 'matchfield',