From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 64E5A1FF16F for ; Thu, 13 Feb 2025 11:37:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DCDA8E1; Thu, 13 Feb 2025 11:37:35 +0100 (CET) Date: Thu, 13 Feb 2025 11:37:02 +0100 From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Message-ID: <20250213113702.53d26dbb@rosa.proxmox.com> In-Reply-To: <20250212151241.91077-4-s.ivanov@proxmox.com> References: <20250212151241.91077-1-s.ivanov@proxmox.com> <20250212151241.91077-4-s.ivanov@proxmox.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.069 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: Re: [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" On Wed, 12 Feb 2025 16:12:40 +0100 Stoiko Ivanov wrote: > 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") after talking with Dominik off-list went and checked again: the issue surfaced due to a (much more recent) commit in proxmox-widet-toolkit: 7bb124c ("button: htmlEncode the name/id for the confirm message") I think we can drop the icon for the remove-message, but if someone feels that it makes for a worse UX I can see if this can be sensibly added back. > > 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'; _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel