From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>, Fiona Ebner <f.ebner@proxmox.com>
Subject: Re: [pbs-devel] [PATCH widget-toolkit 1/1] form: display-edit: support emptyText
Date: Tue, 26 Nov 2024 16:28:53 +0100 [thread overview]
Message-ID: <0d6fba4f-8f22-4813-9657-8148cdfb125d@proxmox.com> (raw)
In-Reply-To: <20241126151300.71000-2-f.ebner@proxmox.com>
Am 26.11.24 um 16:12 schrieb Fiona Ebner:
> First user is intended to be the path field for datastores in PBS
> where the emptyText should dynamically be for a relative or absolute
> path.
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> src/form/DisplayEdit.js | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/src/form/DisplayEdit.js b/src/form/DisplayEdit.js
> index fe1b83b..3f6a9bb 100644
> --- a/src/form/DisplayEdit.js
> +++ b/src/form/DisplayEdit.js
> @@ -7,6 +7,7 @@ Ext.define('Proxmox.form.field.DisplayEdit', {
> data: {
> editable: false,
> value: undefined,
> + emptyText: undefined,
> },
> },
>
> @@ -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.
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-11-26 15:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 15:12 [pbs-devel] [PATCH proxmox-widget-toolkit/proxmox-backup 0/3] ui: slightly improve removable datastore dialog Fiona Ebner
2024-11-26 15:12 ` [pbs-devel] [PATCH widget-toolkit 1/1] form: display-edit: support emptyText Fiona Ebner
2024-11-26 15:28 ` Thomas Lamprecht [this message]
2024-11-26 16:23 ` Fiona Ebner
2024-11-26 15:12 ` [pbs-devel] [PATCH proxmox-backup 2/3] ui: datastore edit: improve field label name Fiona Ebner
2024-11-26 15:44 ` [pbs-devel] applied: " Thomas Lamprecht
2024-11-26 15:13 ` [pbs-devel] [PATCH proxmox-backup 3/3] ui: datastore edit: fix emptytext for path field Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d6fba4f-8f22-4813-9657-8148cdfb125d@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox