public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix #5879: ui: add tooltip to security group comments
@ 2024-11-18 11:44 Timothy Nicholson
  2024-11-18 21:26 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Timothy Nicholson @ 2024-11-18 11:44 UTC (permalink / raw)
  To: pve-devel

This patch adds a tooltip in the security group selector for group
comments that are too long to fit within the column width.

Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
---
 www/manager6/form/SecurityGroupSelector.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/manager6/form/SecurityGroupSelector.js b/www/manager6/form/SecurityGroupSelector.js
index 64db7542..8b1b4b1e 100644
--- a/www/manager6/form/SecurityGroupSelector.js
+++ b/www/manager6/form/SecurityGroupSelector.js
@@ -34,7 +34,13 @@ Ext.define('PVE.form.SecurityGroupsSelector', {
 		    {
 			header: gettext('Comment'),
 			dataIndex: 'comment',
-			renderer: Ext.String.htmlEncode,
+			renderer: function(value, metaData) {
+			    let comment = Ext.String.htmlEncode(value) || '';
+			    if (comment.length * 12 > metaData.column.cellWidth) {
+				comment = `<span data-qtip="${comment}">${comment}</span>`;
+			    }
+			    return comment;
+			},
 			flex: 1,
 		    },
 		],
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH manager] fix #5879: ui: add tooltip to security group comments
  2024-11-18 11:44 [pve-devel] [PATCH manager] fix #5879: ui: add tooltip to security group comments Timothy Nicholson
@ 2024-11-18 21:26 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-11-18 21:26 UTC (permalink / raw)
  To: Proxmox VE development discussion, Timothy Nicholson

Am 18.11.24 um 12:44 schrieb Timothy Nicholson:
> This patch adds a tooltip in the security group selector for group
> comments that are too long to fit within the column width.
> 
> Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
> ---
>  www/manager6/form/SecurityGroupSelector.js | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-18 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-18 11:44 [pve-devel] [PATCH manager] fix #5879: ui: add tooltip to security group comments Timothy Nicholson
2024-11-18 21:26 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal