[pve-devel] [PATCH manager 1/2] remove displayfield height hack

Dominik Csapak d.csapak at proxmox.com
Wed Apr 6 11:44:03 CEST 2016


this did not work anymore,
instead overwrite css for displayfields to have correct
min-height

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/css/ext6-pve.css                    | 5 +++++
 www/manager6/dc/AuthEdit.js             | 1 -
 www/manager6/dc/UserEdit.js             | 1 -
 www/manager6/form/Checkbox.js           | 2 --
 www/manager6/form/ControllerSelector.js | 1 -
 www/manager6/grid/FirewallRules.js      | 4 ----
 www/manager6/ha/GroupEdit.js            | 1 -
 www/manager6/lxc/Network.js             | 3 ---
 www/manager6/node/NetworkEdit.js        | 3 ---
 www/manager6/panel/IPSet.js             | 2 --
 www/manager6/qemu/NetworkEdit.js        | 3 ---
 www/manager6/storage/DirEdit.js         | 2 --
 www/manager6/storage/GlusterFsEdit.js   | 4 ----
 www/manager6/storage/IScsiEdit.js       | 2 --
 www/manager6/storage/LVMEdit.js         | 2 --
 www/manager6/storage/LvmThinEdit.js     | 3 ---
 www/manager6/storage/NFSEdit.js         | 3 ---
 www/manager6/storage/RBDEdit.js         | 4 ----
 www/manager6/storage/SheepdogEdit.js    | 2 --
 www/manager6/storage/ZFSEdit.js         | 8 --------
 www/manager6/storage/ZFSPoolEdit.js     | 2 --
 21 files changed, 5 insertions(+), 53 deletions(-)

diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css
index aaf0692..d1f1f12 100644
--- a/www/css/ext6-pve.css
+++ b/www/css/ext6-pve.css
@@ -220,3 +220,8 @@
     background-image:url(../images/virt-viewer.png);
 }
 
+
+/* displayfield minheight is wrong */
+.x-form-display-field-default {
+    min-height: 20px;
+}
diff --git a/www/manager6/dc/AuthEdit.js b/www/manager6/dc/AuthEdit.js
index 2985550..d6ad1b6 100644
--- a/www/manager6/dc/AuthEdit.js
+++ b/www/manager6/dc/AuthEdit.js
@@ -24,7 +24,6 @@ Ext.define('PVE.dc.AuthEdit', {
         var column1 = [
             {
                 xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
                 name: 'realm',
                 fieldLabel: gettext('Realm'),
                 value: me.realm,
diff --git a/www/manager6/dc/UserEdit.js b/www/manager6/dc/UserEdit.js
index 2ef8bce..ee4d298 100644
--- a/www/manager6/dc/UserEdit.js
+++ b/www/manager6/dc/UserEdit.js
@@ -69,7 +69,6 @@ Ext.define('PVE.dc.UserEdit', {
         var column1 = [
             {
                 xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
                 name: 'userid',
                 fieldLabel: gettext('User name'),
                 value: me.userid,
diff --git a/www/manager6/form/Checkbox.js b/www/manager6/form/Checkbox.js
index 3ce41b6..dc26c05 100644
--- a/www/manager6/form/Checkbox.js
+++ b/www/manager6/form/Checkbox.js
@@ -9,8 +9,6 @@ Ext.define('PVE.form.Checkbox', {
  
     inputValue: '1',
 
-    height: 22, // hack: set same height as text fields
-
     getSubmitData: function() {
         var me = this,
             data = null,
diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index dfff96b..72c4767 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -59,7 +59,6 @@ Ext.define('PVE.form.ControllerSelector', {
 	Ext.apply(me, {
 	    fieldLabel: gettext('Bus/Device'),
 	    layout: 'hbox',
-	    height: 22, // hack: set to same height as other fields
 	    defaults: {
                 flex: 1,
                 hideLabel: true
diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
index f03ceb9..12ac98e 100644
--- a/www/manager6/grid/FirewallRules.js
+++ b/www/manager6/grid/FirewallRules.js
@@ -115,7 +115,6 @@ Ext.define('PVE.FirewallRulePanel', {
 	    me.column1.push({
 		xtype: 'displayfield',
 		fieldLabel: '',
-		height: 22, // hack: set same height as text fields
 		value: ''
 	    });
 	}
@@ -154,7 +153,6 @@ Ext.define('PVE.FirewallRulePanel', {
 		xtype: 'pvecheckbox',
 		name: 'enable',
 		checked: false,
-		height: 22, // hack: set same height as text fields
 		uncheckedValue: 0,
 		fieldLabel: gettext('Enable')
 	    },
@@ -204,7 +202,6 @@ Ext.define('PVE.FirewallRulePanel', {
 	    {
 		xtype: 'textfield',
 		name: 'dport',
-		height: 22, // hack: set same height as text fields
 		value: '',
 		fieldLabel: gettext('Dest. port')
 	    }
@@ -340,7 +337,6 @@ Ext.define('PVE.FirewallGroupRuleEdit', {
 		    xtype: 'pvecheckbox',
 		    name: 'enable',
 		    checked: false,
-		    height: 22, // hack: set same height as text fields
 		    uncheckedValue: 0,
 		    fieldLabel: gettext('Enable')
 		}
diff --git a/www/manager6/ha/GroupEdit.js b/www/manager6/ha/GroupEdit.js
index c899759..a72b2ec 100644
--- a/www/manager6/ha/GroupEdit.js
+++ b/www/manager6/ha/GroupEdit.js
@@ -20,7 +20,6 @@ Ext.define('PVE.ha.GroupInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'group',
-		height: 22, // hack: set same height as text fields
 		value: me.groupId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index 8e3129f..56bdbf8 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -101,7 +101,6 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
 	    {
 		xtype: 'textfield',
 		name: 'name',
-		height: 22, // hack: set same height as text fields
 		fieldLabel: gettext('Name') + ' (i.e. eth0)',
 		allowBlank: false,
 		value: cdata.name,
@@ -171,7 +170,6 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
 		},
 		border: false,
 		margin: '0 0 5 0',
-		height: 22, // hack: set same height as text fields
 		items: [
 		    {
 			xtype: 'label',
@@ -230,7 +228,6 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
 		},
 		border: false,
 		margin: '0 0 5 0',
-		height: 22, // hack: set same height as text fields
 		items: [
 		    {
 			xtype: 'label',
diff --git a/www/manager6/node/NetworkEdit.js b/www/manager6/node/NetworkEdit.js
index 7b063ba..52af359 100644
--- a/www/manager6/node/NetworkEdit.js
+++ b/www/manager6/node/NetworkEdit.js
@@ -80,7 +80,6 @@ Ext.define('PVE.node.NetworkEdit', {
 	} else if (me.iftype === 'OVSPort' || me.iftype === 'OVSIntPort') {
 	    column2.push({
 		xtype: me.create ? 'PVE.form.BridgeSelector' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		fieldLabel: PVE.Utils.render_network_iface_type('OVSBridge'),
 		allowBlank: false,
 		nodename: nodename,
@@ -136,7 +135,6 @@ Ext.define('PVE.node.NetworkEdit', {
 	} else if (me.iftype === 'OVSBond') {
 	    column2.push({
 		xtype: me.create ? 'PVE.form.BridgeSelector' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		fieldLabel: PVE.Utils.render_network_iface_type('OVSBridge'),
 		allowBlank: false,
 		nodename: nodename,
@@ -176,7 +174,6 @@ Ext.define('PVE.node.NetworkEdit', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		fieldLabel: gettext('Name'),
-		height: 22, // hack: set same height as text fields
 		name: 'iface',
 		value: me.iface,
 		vtype: iface_vtype,
diff --git a/www/manager6/panel/IPSet.js b/www/manager6/panel/IPSet.js
index 2b63f2e..842ec2c 100644
--- a/www/manager6/panel/IPSet.js
+++ b/www/manager6/panel/IPSet.js
@@ -210,7 +210,6 @@ Ext.define('PVE.IPSetCidrEdit', {
 	    column1.push({
 		xtype: 'displayfield',
 		name: 'cidr',
-		height: 22, // hack: set same height as text fields
 		value: '',
 		fieldLabel: gettext('IP/CIDR')
 	    });
@@ -224,7 +223,6 @@ Ext.define('PVE.IPSetCidrEdit', {
 		    xtype: 'pvecheckbox',
 		    name: 'nomatch',
 		    checked: false,
-		    height: 22, // hack: set same height as text fields
 		    uncheckedValue: 0,
 		    fieldLabel: 'nomatch'
 		}
diff --git a/www/manager6/qemu/NetworkEdit.js b/www/manager6/qemu/NetworkEdit.js
index fefa8ac..04ea4c7 100644
--- a/www/manager6/qemu/NetworkEdit.js
+++ b/www/manager6/qemu/NetworkEdit.js
@@ -75,7 +75,6 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
 	    {
 		xtype: 'radiofield',
 		name: 'networkmode',
-		height: 22, // hack: set same height as text fields
 		inputValue: 'bridge',
 		boxLabel: gettext('Bridged mode'),
 		checked: true,
@@ -108,7 +107,6 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
 	    {
 		xtype: 'radiofield',
 		name: 'networkmode',
-		height: 22, // hack: set same height as text fields
 		inputValue: 'nat',
 		boxLabel: gettext('NAT mode')
 	    }
@@ -118,7 +116,6 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
 	    me.column1.push({
 		xtype: 'radiofield',
 		name: 'networkmode',
-		height: 22, // hack: set same height as text fields
 		inputValue: 'none',
 		boxLabel: gettext('No network device')
 	    });
diff --git a/www/manager6/storage/DirEdit.js b/www/manager6/storage/DirEdit.js
index ec20c60..e38c231 100644
--- a/www/manager6/storage/DirEdit.js
+++ b/www/manager6/storage/DirEdit.js
@@ -24,7 +24,6 @@ Ext.define('PVE.storage.DirInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -32,7 +31,6 @@ Ext.define('PVE.storage.DirInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'path',
 		value: '',
 		fieldLabel: gettext('Directory'),
diff --git a/www/manager6/storage/GlusterFsEdit.js b/www/manager6/storage/GlusterFsEdit.js
index 7ebe97e..44aa982 100644
--- a/www/manager6/storage/GlusterFsEdit.js
+++ b/www/manager6/storage/GlusterFsEdit.js
@@ -81,7 +81,6 @@ Ext.define('PVE.storage.GlusterFsInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -89,7 +88,6 @@ Ext.define('PVE.storage.GlusterFsInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'server',
 		value: '',
 		fieldLabel: gettext('Server'),
@@ -106,7 +104,6 @@ Ext.define('PVE.storage.GlusterFsInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'pvetextfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'server2',
 		value: '',
 		fieldLabel: gettext('Second Server'),
@@ -114,7 +111,6 @@ Ext.define('PVE.storage.GlusterFsInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'pveGlusterFsScan' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'volume',
 		value: '',
 		fieldLabel: 'Volume name',
diff --git a/www/manager6/storage/IScsiEdit.js b/www/manager6/storage/IScsiEdit.js
index 4bef1c8..8bfb58f 100644
--- a/www/manager6/storage/IScsiEdit.js
+++ b/www/manager6/storage/IScsiEdit.js
@@ -83,7 +83,6 @@ Ext.define('PVE.storage.IScsiInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -91,7 +90,6 @@ Ext.define('PVE.storage.IScsiInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'portal',
 		value: '',
 		fieldLabel: 'Portal',
diff --git a/www/manager6/storage/LVMEdit.js b/www/manager6/storage/LVMEdit.js
index aa7db2d..365d5af 100644
--- a/www/manager6/storage/LVMEdit.js
+++ b/www/manager6/storage/LVMEdit.js
@@ -104,7 +104,6 @@ Ext.define('PVE.storage.LVMInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -114,7 +113,6 @@ Ext.define('PVE.storage.LVMInputPanel', {
 	];
 
 	var vgnameField = Ext.createWidget(me.create ? 'textfield' : 'displayfield', {
-	    height: 22, // hack: set same height as text fields
 	    name: 'vgname',
 	    hidden: !!me.create,
 	    disabled: !!me.create,
diff --git a/www/manager6/storage/LvmThinEdit.js b/www/manager6/storage/LvmThinEdit.js
index dc42ef6..13fbb90 100644
--- a/www/manager6/storage/LvmThinEdit.js
+++ b/www/manager6/storage/LvmThinEdit.js
@@ -114,7 +114,6 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -124,7 +123,6 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
 	];
 
 	var vgnameField = Ext.createWidget(me.create ? 'textfield' : 'displayfield', {
-	    height: 22, // hack: set same height as text fields
 	    name: 'vgname',
 	    hidden: !!me.create,
 	    disabled: !!me.create,
@@ -134,7 +132,6 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
 	});
 
 	var thinpoolField = Ext.createWidget(me.create ? 'textfield' : 'displayfield', {
-	    height: 22, // hack: set same height as text fields
 	    name: 'thinpool',
 	    hidden: !!me.create,
 	    disabled: !!me.create,
diff --git a/www/manager6/storage/NFSEdit.js b/www/manager6/storage/NFSEdit.js
index 77b4a34..e9f398f 100644
--- a/www/manager6/storage/NFSEdit.js
+++ b/www/manager6/storage/NFSEdit.js
@@ -84,7 +84,6 @@ Ext.define('PVE.storage.NFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -92,7 +91,6 @@ Ext.define('PVE.storage.NFSInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'server',
 		value: '',
 		fieldLabel: gettext('Server'),
@@ -109,7 +107,6 @@ Ext.define('PVE.storage.NFSInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'pveNFSScan' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'export',
 		value: '',
 		fieldLabel: 'Export',
diff --git a/www/manager6/storage/RBDEdit.js b/www/manager6/storage/RBDEdit.js
index 8930a02..c98a4c5 100644
--- a/www/manager6/storage/RBDEdit.js
+++ b/www/manager6/storage/RBDEdit.js
@@ -24,7 +24,6 @@ Ext.define('PVE.storage.RBDInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -32,7 +31,6 @@ Ext.define('PVE.storage.RBDInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'pool',
 		value: 'rbd',
 		fieldLabel: gettext('Pool'),
@@ -40,7 +38,6 @@ Ext.define('PVE.storage.RBDInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'monhost',
 		value: '',
 		fieldLabel: gettext('Monitor Host'),
@@ -48,7 +45,6 @@ Ext.define('PVE.storage.RBDInputPanel', {
 	    },
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
-		height: 22, // hack: set same height as text fields
 		name: 'username',
 		value: 'admin',
 		fieldLabel: gettext('User name'),
diff --git a/www/manager6/storage/SheepdogEdit.js b/www/manager6/storage/SheepdogEdit.js
index 086a570..5d7c736 100644
--- a/www/manager6/storage/SheepdogEdit.js
+++ b/www/manager6/storage/SheepdogEdit.js
@@ -26,7 +26,6 @@ Ext.define('PVE.storage.SheepdogInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -35,7 +34,6 @@ Ext.define('PVE.storage.SheepdogInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'portal',
-		height: 22, // hack: set same height as text fields
 		value: '127.0.0.1:7000',
 		fieldLabel: gettext('Gateway'),
 		allowBlank: false
diff --git a/www/manager6/storage/ZFSEdit.js b/www/manager6/storage/ZFSEdit.js
index ea390b5..12d6af1 100644
--- a/www/manager6/storage/ZFSEdit.js
+++ b/www/manager6/storage/ZFSEdit.js
@@ -24,7 +24,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -33,7 +32,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'portal',
-		height: 22, // hack: set same height as text fields
 		value: '',
 		fieldLabel: gettext('Portal'),
 		allowBlank: false
@@ -41,7 +39,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'pool',
-		height: 22, // hack: set same height as text fields
 		value: '',
 		fieldLabel: gettext('Pool'),
 		allowBlank: false
@@ -49,7 +46,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'blocksize',
-		height: 22, // hack: set same height as text fields
 		value: '4k',
 		fieldLabel: gettext('Block Size'),
 		allowBlank: false
@@ -57,7 +53,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'target',
-		height: 22, // hack: set same height as text fields
 		value: '',
 		fieldLabel: gettext('Target'),
 		allowBlank: false
@@ -65,7 +60,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'comstar_tg',
-		height: 22, // hack: set same height as text fields
 		value: '',
 		fieldLabel: gettext('Target group'),
 		allowBlank: true
@@ -83,7 +77,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'pveiScsiProviderSelector' : 'displayfield',
 		name: 'iscsiprovider',
-		height: 22, // hack: set same height as text fields
 		value: 'comstar',
 		fieldLabel: gettext('iSCSI Provider'),
 		allowBlank: false
@@ -105,7 +98,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'comstar_hg',
-		height: 22, // hack: set same height as text fields
 		value: '',
 		fieldLabel: gettext('Host group'),
 		allowBlank: true
diff --git a/www/manager6/storage/ZFSPoolEdit.js b/www/manager6/storage/ZFSPoolEdit.js
index 7d955f9..e227b2e 100644
--- a/www/manager6/storage/ZFSPoolEdit.js
+++ b/www/manager6/storage/ZFSPoolEdit.js
@@ -57,7 +57,6 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', {
 	    {
 		xtype: me.create ? 'textfield' : 'displayfield',
 		name: 'storage',
-		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
 		fieldLabel: 'ID',
 		vtype: 'StorageId',
@@ -73,7 +72,6 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', {
 	    }));
 	} else {
 	    me.column1.push(Ext.createWidget('displayfield', {
-		height: 22, // hack: set same height as text fields
 		name: 'pool',
 		value: '',
 		fieldLabel: gettext('ZFS Pool'),
-- 
2.1.4




More information about the pve-devel mailing list