implement multiField renderer for infopanels

we can use this for fields which use more than one value of the
guest status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2018-04-30 11:00:33 +02:00 committed by Thomas Lamprecht
parent 08e0aba828
commit aec9d2ece3

View File

@ -61,8 +61,10 @@ Ext.define('PVE.panel.StatusView', {
if (Ext.isFunction(field.renderer)) {
renderer = field.renderer;
}
if (field.textField !== undefined) {
field.updateValue(renderer(me.getRecordValue(field.textField)));
if (field.multiField === true) {
field.updateValue(renderer.call(field, me.getStore().getRecord()));
} else if (field.textField !== undefined) {
field.updateValue(renderer.call(field, me.getRecordValue(field.textField)));
} else if(field.valueField !== undefined) {
var used = me.getRecordValue(field.valueField);
/*jslint confusion: true*/