ComboGrid: use the grids view for the error message

for most of the combogrids, this does not make a difference, but we
want to have a node selection in some of their toolbars. There
having the error over the whole grid makes it impossible to select a
different node (which might be necessary to get rid of the error), so
we show the error on the view (which is the grids content body only).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2023-01-18 14:12:56 +01:00 committed by Thomas Lamprecht
parent 49dd139a34
commit aa157deb47

View File

@ -306,7 +306,7 @@ Ext.define('Proxmox.form.ComboGrid', {
picker.setMinHeight(100); picker.setMinHeight(100);
} }
if (me.loadError) { if (me.loadError) {
Proxmox.Utils.setErrorMask(picker, me.loadError); Proxmox.Utils.setErrorMask(picker.getView(), me.loadError);
delete me.loadError; delete me.loadError;
picker.updateLayout(); picker.updateLayout();
} }
@ -428,7 +428,7 @@ Ext.define('Proxmox.form.ComboGrid', {
// if the picker exists, we reset its minHeight to the previous saved one or 0 // if the picker exists, we reset its minHeight to the previous saved one or 0
if (me.picker) { if (me.picker) {
me.picker.setMinHeight(me.savedMinHeight || 0); me.picker.setMinHeight(me.savedMinHeight || 0);
Proxmox.Utils.setErrorMask(me.picker); Proxmox.Utils.setErrorMask(me.picker.getView());
delete me.savedMinHeight; delete me.savedMinHeight;
// we have to update the layout, otherwise the height gets not recalculated // we have to update the layout, otherwise the height gets not recalculated
me.picker.updateLayout(); me.picker.updateLayout();
@ -463,7 +463,7 @@ Ext.define('Proxmox.form.ComboGrid', {
} else { } else {
let msg = Proxmox.Utils.getResponseErrorMessage(o.getError()); let msg = Proxmox.Utils.getResponseErrorMessage(o.getError());
if (me.picker) { if (me.picker) {
Proxmox.Utils.setErrorMask(me.picker, msg); Proxmox.Utils.setErrorMask(me.picker.getView(), msg);
} }
me.loadError = msg; me.loadError = msg;
} }