gui: qemu/HardwareView: prepare Hardwareview for font-awesome icons

we want to be able to use fontawesome icons directly instead of having
to use extracted png in css classes

this patch makes it possible to use 'iconCls' with the font-awesome icon name

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-03-28 16:25:04 +01:00 committed by Thomas Lamprecht
parent 71798b4b02
commit 6a040799f4
2 changed files with 15 additions and 1 deletions

View File

@ -250,6 +250,14 @@
padding-left: 20px;
}
.pve-itype-fa > .x-grid-cell-inner{
padding-left: 3px;
}
.pve-grid-fa {
margin-right: 10px;
}
.pve-itype-icon-qemu,
.x-tree-node-computer,
.x-grid-tree-node-expanded .x-tree-node-computer

View File

@ -8,6 +8,9 @@ Ext.define('PVE.qemu.HardwareView', {
var me = this;
var rows = me.rows;
var rowdef = rows[key] || {};
var iconCls = rowdef.iconCls;
var icon = '';
var txt = (rowdef.header || key);
metaData.tdAttr = "valign=middle";
@ -26,8 +29,11 @@ Ext.define('PVE.qemu.HardwareView', {
return rowdef.cdheader;
}
}
} else if (iconCls) {
icon = "<i class='pve-grid-fa fa fa-fw fa-" + iconCls + "'></i>";
metaData.tdCls += " pve-itype-fa";
}
return rowdef.header || key;
return icon + txt;
},
initComponent : function() {