[pve-devel] [PATCH manager 09/10] Make room in QemuWizard and Edit Window so that the larger combo boxes properly fit.
Dominik Csapak
d.csapak at proxmox.com
Mon Sep 11 13:56:21 CEST 2017
On 09/06/2017 10:15 AM, Emmanuel Kasper wrote:
> This will benefit the BusTypeSelector, the DiskFormatSelector, the CD FileSelector,
> and possibily other long fields like vm name, pool name.
> ---
> www/manager6/form/ControllerSelector.js | 4 ++--
> www/manager6/qemu/CDEdit.js | 3 +++
> www/manager6/qemu/CreateWizard.js | 1 +
> www/manager6/qemu/HDEdit.js | 3 +++
> www/manager6/window/Edit.js | 3 +++
> 5 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
> index d15fda84..ce6ac428 100644
> --- a/www/manager6/form/ControllerSelector.js
> +++ b/www/manager6/form/ControllerSelector.js
> @@ -103,9 +103,9 @@ Ext.define('PVE.form.ControllerSelector', {
> {
> xtype: 'pveBusSelector',
> name: 'controller',
> + flex: 7,
> value: PVE.qemu.OSDefaults.generic.busType,
> allowBlank: false,
> - flex: 2,
> listeners: {
> change: function(t, value) {
> if (!me.rendered || !value) {
> @@ -120,10 +120,10 @@ Ext.define('PVE.form.ControllerSelector', {
> {
> xtype: 'pveIntegerField',
> name: 'deviceid',
> + flex: 3,
we could also give the integerfield a fixed size and the rest
to the busselector instead of using a 7:3 ratio
(imho the numberfield cannot get bigger than what we define,
so it should always be readable even if we have a fixed width)
> minValue: 0,
> maxValue: PVE.form.ControllerSelector.maxIds.ide,
> value: '0',
> - flex: 1,
> validator: function(value) {
> /*jslint confusion: true */
> if (!me.rendered) {
> diff --git a/www/manager6/qemu/CDEdit.js b/www/manager6/qemu/CDEdit.js
> index 51921b8d..0c660a1d 100644
> --- a/www/manager6/qemu/CDEdit.js
> +++ b/www/manager6/qemu/CDEdit.js
> @@ -147,6 +147,9 @@ Ext.define('PVE.qemu.CDInputPanel', {
>
> Ext.define('PVE.qemu.CDEdit', {
> extend: 'PVE.window.Edit',
> + fieldDefaults: {
> + width: 140
> + },
>
> initComponent : function() {
> var me = this;
> diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
> index 944309a6..a01fc81b 100644
> --- a/www/manager6/qemu/CreateWizard.js
> +++ b/www/manager6/qemu/CreateWizard.js
> @@ -2,6 +2,7 @@ Ext.define('PVE.qemu.CreateWizard', {
> extend: 'PVE.window.Wizard',
> alias: 'widget.pveQemuCreateWizard',
> qemuScsiController: undefined,
> + width: 680,
>
> controller: {
>
> diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
> index 9fbbc763..5d4e7c89 100644
> --- a/www/manager6/qemu/HDEdit.js
> +++ b/www/manager6/qemu/HDEdit.js
> @@ -300,6 +300,9 @@ Ext.define('PVE.qemu.HDEdit', {
> extend: 'PVE.window.Edit',
>
> isAdd: true,
> + fieldDefaults: {
> + width: 140
> + },
>
> initComponent : function() {
> var me = this;
> diff --git a/www/manager6/window/Edit.js b/www/manager6/window/Edit.js
> index 9a026683..9941c5d1 100644
> --- a/www/manager6/window/Edit.js
> +++ b/www/manager6/window/Edit.js
> @@ -259,6 +259,9 @@ Ext.define('PVE.window.Edit', {
> colwidth += me.fieldDefaults.labelWidth - 100;
> }
>
> + if (me.fieldDefaults && me.fieldDefaults.width) {
> + colwidth += me.fieldDefaults.width - 100;
> + }
>
> var twoColumn = items[0].column1 || items[0].column2;
>
>
More information about the pve-devel
mailing list