diff --git a/js/ObjectGroup.js b/js/ObjectGroup.js index f47c291..9db0191 100644 --- a/js/ObjectGroup.js +++ b/js/ObjectGroup.js @@ -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 diff --git a/js/ObjectGroupConfiguration.js b/js/ObjectGroupConfiguration.js index 03515fe..390dbbd 100644 --- a/js/ObjectGroupConfiguration.js +++ b/js/ObjectGroupConfiguration.js @@ -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] }); diff --git a/js/Utils.js b/js/Utils.js index e8d43d4..4becd56 100644 --- a/js/Utils.js +++ b/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',