mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-03 23:50:27 +00:00
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:
parent
b79fbba8e4
commit
8ddd9c44f5
@ -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
|
||||
|
@ -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]
|
||||
});
|
||||
|
||||
|
12
js/Utils.js
12
js/Utils.js
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user