[pve-devel] [PATCH manager v7 12/14] ui: form/Tag: add 'admin-tag' class to admin tags
Dominik Csapak
d.csapak at proxmox.com
Tue Jun 21 11:20:10 CEST 2022
so that they are emphasized there too
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/form/Tag.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/www/manager6/form/Tag.js b/www/manager6/form/Tag.js
index 0a754edb..91190051 100644
--- a/www/manager6/form/Tag.js
+++ b/www/manager6/form/Tag.js
@@ -141,6 +141,7 @@ Ext.define('Proxmox.Tag', {
setText: function(text) {
let me = this;
me.tagEl().innerHTML = text;
+ me.tagEl().classList = text[0] === '+' ? 'admin-tag' : '';
me.layoutCallback();
},
@@ -256,8 +257,9 @@ Ext.define('Proxmox.Tag', {
let iconStyle = me.mode !== 'editable' ? 'display: none' : 'padding-right: 6px;';
let iconCls = me.icons[me.addTag ? 'addTag' : me.mode];
+ let adminCls = me.tag[0] === '+' ? 'admin-tag' : '';
let icon = ` <i style="cursor: pointer; ${iconStyle}" class="fa fa-${iconCls}${me.faIconStyle}"></i>`;
- me.html = `<span style="padding-right: 1px">${me.tag}</span>${icon}`;
+ me.html = `<span style="padding-right: 1px" class="${adminCls}">${me.tag}</span>${icon}`;
me.callParent();
if (me.addTag) {
--
2.30.2
More information about the pve-devel
mailing list