From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8D60A956A9 for ; Wed, 18 Jan 2023 14:13:38 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 558AE20295 for ; Wed, 18 Jan 2023 14:13:08 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 18 Jan 2023 14:13:04 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9D21F45108 for ; Wed, 18 Jan 2023 14:13:04 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Wed, 18 Jan 2023 14:12:56 +0100 Message-Id: <20230118131303.2892050-2-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230118131303.2892050-1-d.csapak@proxmox.com> References: <20230118131303.2892050-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.064 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH widget-toolkit 1/2] ComboGrid: use the grids view for the error message X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2023 13:13:38 -0000 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 --- src/form/ComboGrid.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js index 4cb79d0..e903223 100644 --- a/src/form/ComboGrid.js +++ b/src/form/ComboGrid.js @@ -306,7 +306,7 @@ Ext.define('Proxmox.form.ComboGrid', { picker.setMinHeight(100); } if (me.loadError) { - Proxmox.Utils.setErrorMask(picker, me.loadError); + Proxmox.Utils.setErrorMask(picker.getView(), me.loadError); delete me.loadError; 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 (me.picker) { me.picker.setMinHeight(me.savedMinHeight || 0); - Proxmox.Utils.setErrorMask(me.picker); + Proxmox.Utils.setErrorMask(me.picker.getView()); delete me.savedMinHeight; // we have to update the layout, otherwise the height gets not recalculated me.picker.updateLayout(); @@ -463,7 +463,7 @@ Ext.define('Proxmox.form.ComboGrid', { } else { let msg = Proxmox.Utils.getResponseErrorMessage(o.getError()); if (me.picker) { - Proxmox.Utils.setErrorMask(me.picker, msg); + Proxmox.Utils.setErrorMask(me.picker.getView(), msg); } me.loadError = msg; } -- 2.30.2