From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 0B1E31FF165 for ; Wed, 12 Feb 2025 16:13:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6DB93192BA; Wed, 12 Feb 2025 16:13:36 +0100 (CET) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Wed, 12 Feb 2025 16:12:40 +0100 Message-Id: <20250212151241.91077-4-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250212151241.91077-1-s.ivanov@proxmox.com> References: <20250212151241.91077-1-s.ivanov@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pmg-devel] [PATCH pmg-gui 1/2] rules/object: remove icon from remove button X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" the icons were introduced to the listing, and it seems their rendering when removing was not noticed - w/o this the message is e.g.: "Are you sure you want to remove entry ' Content Type Filter: ..." Fixes: ea4f2a7 ("add icons to the object types") Signed-off-by: Stoiko Ivanov --- js/ObjectGroup.js | 3 +-- js/Utils.js | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/ObjectGroup.js b/js/ObjectGroup.js index 3c8de64..1807e97 100644 --- a/js/ObjectGroup.js +++ b/js/ObjectGroup.js @@ -125,8 +125,7 @@ Ext.define('PMG.ObjectGroup', { }, callback: reload, getRecordName: function(rec) { - return PMG.Utils.format_otype(rec.data.otype) + - ': ' + rec.data.descr; + return PMG.Utils.format_otype_subject(rec.data.otype) + ': ' + rec.data.descr; }, waitMsgTarget: me, }); diff --git a/js/Utils.js b/js/Utils.js index 9b5f054..94e3c95 100644 --- a/js/Utils.js +++ b/js/Utils.js @@ -128,6 +128,11 @@ Ext.define('PMG.Utils', { return icon + text; }, + format_otype_subject: function(otype) { + let editor = PMG.Utils.object_editors[otype]; + return editor.subject ?? 'unknown'; + }, + format_otype: function(otype) { let editor = PMG.Utils.object_editors[otype]; let iconCls = 'fa fa-question-circle'; -- 2.39.5 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel