* [pbs-devel] [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog @ 2024-11-26 16:29 Fiona Ebner 2024-11-26 16:29 ` [pbs-devel] [PATCH v3 widget-toolkit] form: display-edit: support emptyText Fiona Ebner ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Fiona Ebner @ 2024-11-26 16:29 UTC (permalink / raw) To: pbs-devel Changes in v3: * fix typo in variable name Changes in v2: * avoid tracking emptyText state twice proxmox-widget-toolkit: Fiona Ebner (1): form: display-edit: support emptyText src/form/DisplayEdit.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) proxmox-backup: Fiona Ebner (1): ui: datastore edit: fix emptytext for path field www/window/DataStoreEdit.js | 2 ++ 1 file changed, 2 insertions(+) -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] [PATCH v3 widget-toolkit] form: display-edit: support emptyText 2024-11-26 16:29 [pbs-devel] [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog Fiona Ebner @ 2024-11-26 16:29 ` Fiona Ebner 2024-11-26 16:29 ` [pbs-devel] [PATCH v3 proxmox-backup 2/2] ui: datastore edit: fix emptytext for path field Fiona Ebner 2024-11-27 11:34 ` [pbs-devel] applied: [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog Thomas Lamprecht 2 siblings, 0 replies; 4+ messages in thread From: Fiona Ebner @ 2024-11-26 16:29 UTC (permalink / raw) To: pbs-devel To access the edit field, its xtype is now tracked. First user is intended to be the path field for datastores where the emptyText should dynamically be for a relative or absolute path. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> --- Changes in v3: * fix typo in variable name Changes in v2: * avoid tracking emptyText state twice, pass directly to edit field. src/form/DisplayEdit.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/form/DisplayEdit.js b/src/form/DisplayEdit.js index fe1b83b..01d6a05 100644 --- a/src/form/DisplayEdit.js +++ b/src/form/DisplayEdit.js @@ -12,6 +12,9 @@ Ext.define('Proxmox.form.field.DisplayEdit', { displayType: 'displayfield', + // internal only, use editConfig to set the xtype + _editType: 'textfield', + editConfig: {}, editable: false, setEditable: function(editable) { @@ -41,6 +44,15 @@ Ext.define('Proxmox.form.field.DisplayEdit', { vm.get('value'); }, + setEmptyText: function(emptyText) { + let me = this; + me.down(me._editType).setEmptyText(emptyText); + }, + getEmptyText: function() { + let me = this; + return me.down(me._editType).getEmptyText(); + }, + layout: 'fit', defaults: { hideLabel: true, @@ -64,6 +76,8 @@ Ext.define('Proxmox.form.field.DisplayEdit', { }); Ext.applyIf(editConfig, displayConfig); + me._editType = editConfig.xtype; + if (me.initialConfig && me.initialConfig.displayConfig) { Ext.applyIf(displayConfig, me.initialConfig.displayConfig); delete displayConfig.displayConfig; -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] [PATCH v3 proxmox-backup 2/2] ui: datastore edit: fix emptytext for path field 2024-11-26 16:29 [pbs-devel] [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog Fiona Ebner 2024-11-26 16:29 ` [pbs-devel] [PATCH v3 widget-toolkit] form: display-edit: support emptyText Fiona Ebner @ 2024-11-26 16:29 ` Fiona Ebner 2024-11-27 11:34 ` [pbs-devel] applied: [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog Thomas Lamprecht 2 siblings, 0 replies; 4+ messages in thread From: Fiona Ebner @ 2024-11-26 16:29 UTC (permalink / raw) To: pbs-devel It is a relative path for removable datastores. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> --- No changes in v3. No changes in v2. www/window/DataStoreEdit.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/window/DataStoreEdit.js b/www/window/DataStoreEdit.js index 40ccd20a..4a0b8d81 100644 --- a/www/window/DataStoreEdit.js +++ b/www/window/DataStoreEdit.js @@ -114,8 +114,10 @@ Ext.define('PBS.DataStoreEdit', { uuidEditField.setValue(''); if (isRemovable) { pathField.setFieldLabel(gettext('Path on Device')); + pathField.setEmptyText(gettext('A relative path')); } else { pathField.setFieldLabel(gettext('Backing Path')); + pathField.setEmptyText(gettext('An absolute path')); } }, }, -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] applied: [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog 2024-11-26 16:29 [pbs-devel] [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog Fiona Ebner 2024-11-26 16:29 ` [pbs-devel] [PATCH v3 widget-toolkit] form: display-edit: support emptyText Fiona Ebner 2024-11-26 16:29 ` [pbs-devel] [PATCH v3 proxmox-backup 2/2] ui: datastore edit: fix emptytext for path field Fiona Ebner @ 2024-11-27 11:34 ` Thomas Lamprecht 2 siblings, 0 replies; 4+ messages in thread From: Thomas Lamprecht @ 2024-11-27 11:34 UTC (permalink / raw) To: Proxmox Backup Server development discussion, Fiona Ebner Am 26.11.24 um 17:29 schrieb Fiona Ebner: > Changes in v3: > * fix typo in variable name > > Changes in v2: > * avoid tracking emptyText state twice > > proxmox-widget-toolkit: > > Fiona Ebner (1): > form: display-edit: support emptyText > > src/form/DisplayEdit.js | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > proxmox-backup: > > Fiona Ebner (1): > ui: datastore edit: fix emptytext for path field > > www/window/DataStoreEdit.js | 2 ++ > 1 file changed, 2 insertions(+) > applied series, with the widget-toolkit side moved over to save a reference on the edit- and display-fields on initialization, thanks! _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-27 11:34 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-11-26 16:29 [pbs-devel] [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog Fiona Ebner 2024-11-26 16:29 ` [pbs-devel] [PATCH v3 widget-toolkit] form: display-edit: support emptyText Fiona Ebner 2024-11-26 16:29 ` [pbs-devel] [PATCH v3 proxmox-backup 2/2] ui: datastore edit: fix emptytext for path field Fiona Ebner 2024-11-27 11:34 ` [pbs-devel] applied: [PATCH v3 proxmox-widget-toolkit/proxmox-backup 0/2] ui: slightly improve removable datastore dialog Thomas Lamprecht
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox