[pve-devel] applied: [PATCH manager] Harmonize reset buttons in "My Settings"
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Oct 4 14:44:02 CEST 2019
On 10/3/19 11:58 AM, Dominic Jäger wrote:
> - Rename both buttons to a single word as it is clear where they belong
> to. Use "Reset" instead of "Clear" as you can rather "Reset a saved
> user name" than "Clear a layout".
> - Use container instead of panels as they are simpler (e.g. no "border:
> false" necessary) and sufficient.
> - Align the buttons at the right for visual appeal.
> - Use title case for the user name label for consistency.
>
> Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
> ---
> www/manager6/window/Settings.js | 48 ++++++++++++++++-----------------
> 1 file changed, 24 insertions(+), 24 deletions(-)
>
applied, thanks, did one fixup (see below) and one followup for the
xterm.js save/reset button margin.
> diff --git a/www/manager6/window/Settings.js b/www/manager6/window/Settings.js
> index 6cef4c38..61eabde3 100644
> --- a/www/manager6/window/Settings.js
> +++ b/www/manager6/window/Settings.js
> @@ -219,45 +219,45 @@ Ext.define('PVE.window.Settings', {
> autoEl: { tag: 'hr'}
> },
> {
> - xtype: 'displayfield',
> - fieldLabel: gettext('Saved User name'),
> - labelAlign: 'left',
> - labelWidth: '50%',
> - stateId: 'login-username',
> - reference: 'savedUserName',
> - value: ''
> - },
> - {
> - xtype: 'button',
> - cls: 'x-btn-default-toolbar-small proxmox-inline-button',
> - text: gettext('Clear User name'),
> - width: 'auto',
> - name: 'clear-username'
> + xtype: 'container',
> + layout: 'hbox',
> + items: [
> + {
> + xtype: 'displayfield',
> + fieldLabel: gettext('Saved User Name:'),
> + labelWidth: 'auto',
this is wrong, albeit an mistake a lot here made with ExtJS.
Most widths in extjs get the "px" unit added as suffix unconditional,
so Extjs set the style for above to "width: autopx;" sometimes the
browsers fallback behavior results then even in the wanted layout but
it's still not correct, changed to '150' which is long enough and easiest
"fix".
> + stateId: 'login-username',
> + reference: 'savedUserName',
> + flex: 1,
> + value: ''
> + },
> + {
> + xtype: 'button',
> + cls: 'x-btn-default-toolbar-small proxmox-inline-button',
> + text: gettext('Reset'),
> + name: 'clear-username',
> + },
> + ]
> },
> {
> xtype: 'box',
> autoEl: { tag: 'hr'}
> },
> {
> - xtype: 'panel',
> - border: false,
> - layout: {
> - type: 'hbox',
> - align: 'stretch'
> - },
> + xtype: 'container',
> + layout: 'hbox',
> items: [
> {
> xtype: 'displayfield',
> - fieldLabel: gettext('Layout'),
> - flex: 2,
> + fieldLabel: gettext('Layout:'),
> + flex: 1,
> },
> {
> xtype: 'button',
> cls: 'x-btn-default-toolbar-small proxmox-inline-button',
> - text: gettext('Reset Layout'),
> + text: gettext('Reset'),
> tooltip: gettext('Reset all layout changes (for example, column widths)'),
> name: 'reset',
> - flex: 1,
> },
> ]
> },
>
More information about the pve-devel
mailing list