[pve-devel] [PATCH manager] gui: enhance user experience in disk size field
Oguz Bektas
o.bektas at proxmox.com
Wed Nov 27 14:57:20 CET 2019
From: Stefan Reiter <s.reiter at proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
www/manager6/form/DiskStorageSelector.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/www/manager6/form/DiskStorageSelector.js b/www/manager6/form/DiskStorageSelector.js
index 445e3ac0..8f576bef 100644
--- a/www/manager6/form/DiskStorageSelector.js
+++ b/www/manager6/form/DiskStorageSelector.js
@@ -145,7 +145,16 @@ Ext.define('PVE.form.DiskStorageSelector', {
maxValue: 128*1024,
decimalPrecision: 3,
value: me.defaultSize,
- allowBlank: false
+ allowBlank: false,
+ listeners: {
+ change: function (view, newval, oldval) {
+ // for better user experience when accidentally scrolled
+ // all the way to the minimum value
+ if (oldval === 0.001 && newval == 1.001) {
+ view.setValue(1);
+ }
+ }
+ }
},
{
xtype: 'pveDiskFormatSelector',
--
2.20.1
More information about the pve-devel
mailing list