From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id E9AA31FF168 for ; Tue, 26 Nov 2024 17:23:50 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 863187519; Tue, 26 Nov 2024 17:23:51 +0100 (CET) Message-ID: Date: Tue, 26 Nov 2024 17:23:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Thomas Lamprecht , Proxmox Backup Server development discussion References: <20241126151300.71000-1-f.ebner@proxmox.com> <20241126151300.71000-2-f.ebner@proxmox.com> <0d6fba4f-8f22-4813-9657-8148cdfb125d@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <0d6fba4f-8f22-4813-9657-8148cdfb125d@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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: Re: [pbs-devel] [PATCH widget-toolkit 1/1] form: display-edit: support emptyText X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Am 26.11.24 um 16:28 schrieb Thomas Lamprecht: > Am 26.11.24 um 16:12 schrieb Fiona Ebner: >> @@ -41,6 +42,19 @@ Ext.define('Proxmox.form.field.DisplayEdit', { >> vm.get('value'); >> }, >> >> + setEmptyText: function(emptyText) { >> + let me = this; >> + let vm = me.getViewModel(); >> + >> + me.emptyText = emptyText; >> + vm.set('emptyText', emptyText); > > did you try to skip this and just directly call the setEmptyText from the > edit field? > >> + }, >> + getEmptyText: function() { >> + let me = this; >> + let vm = me.getViewModel(); >> + return vm.get('emptyText'); > > same here but with getEmptyText from the underlying editField? > > I mean, it can be fine as is, but if we can skip tracking this twice (here and > on editField level) it would IMO be a bit more robust. As also quickly discussed off-list, the slightly hairy bit is getting to the edit item. I opted for tracking the xtype of the field in v2: https://lore.proxmox.com/pbs-devel/20241126162005.85583-1-f.ebner@proxmox.com/T/ _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel