[pve-devel] [PATCH manager] fix #1307: dont use language dependent separator in gui
Dietmar Maurer
dietmar at proxmox.com
Fri Mar 17 17:54:01 CET 2017
Maybe it is possible to use something like:
Ext.override('Ext.form.field.Number', { submitLocaleSeparator: false });
??
> On March 17, 2017 at 4:53 PM Dominik Csapak <d.csapak at proxmox.com> wrote:
>
>
> by default, extjs submits the language dependent decimal separator,
> e.g. ',' for german and '.' for english
>
> but we always want '.'
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> www/manager6/lxc/MPResize.js | 1 +
> www/manager6/lxc/Network.js | 1 +
> www/manager6/lxc/ResourceEdit.js | 2 ++
> www/manager6/qemu/CPUOptions.js | 1 +
> www/manager6/qemu/HDEdit.js | 1 +
> www/manager6/qemu/HDResize.js | 1 +
> www/manager6/qemu/HDThrottle.js | 2 ++
> www/manager6/qemu/NetworkEdit.js | 1 +
> 8 files changed, 10 insertions(+)
>
> diff --git a/www/manager6/lxc/MPResize.js b/www/manager6/lxc/MPResize.js
> index bcda4b6..d7b7c98 100644
> --- a/www/manager6/lxc/MPResize.js
> +++ b/www/manager6/lxc/MPResize.js
> @@ -48,6 +48,7 @@ Ext.define('PVE.window.MPResize', {
>
> me.hdsizesel = Ext.createWidget('numberfield', {
> name: 'size',
> + submitLocaleSeparator: false,
> minValue: 0,
> maxValue: 128*1024,
> decimalPrecision: 3,
> diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
> index 1620a7a..1244d49 100644
> --- a/www/manager6/lxc/Network.js
> +++ b/www/manager6/lxc/Network.js
> @@ -139,6 +139,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
> xtype: 'numberfield',
> name: 'rate',
> fieldLabel: gettext('Rate limit') + ' (MB/s)',
> + submitLocaleSeparator: false,
> minValue: 0,
> maxValue: 10*1024,
> value: cdata.rate,
> diff --git a/www/manager6/lxc/ResourceEdit.js
> b/www/manager6/lxc/ResourceEdit.js
> index 61a5539..c49c011 100644
> --- a/www/manager6/lxc/ResourceEdit.js
> +++ b/www/manager6/lxc/ResourceEdit.js
> @@ -137,6 +137,7 @@ Ext.define('PVE.lxc.CPUInputPanel', {
> minValue: 0,
> value: '',
> step: 1,
> + submitLocaleSeparator: false,
> fieldLabel: gettext('CPU limit'),
> labelWidth: labelWidth,
> allowBlank: true,
> @@ -456,6 +457,7 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
> });
> me.hdsizesel = Ext.createWidget('numberfield', {
> name: 'disksize',
> + submitLocaleSeparator: false,
> minValue: 0.1,
> maxValue: 128*1024,
> decimalPrecision: 3,
> diff --git a/www/manager6/qemu/CPUOptions.js b/www/manager6/qemu/CPUOptions.js
> index 3cadf22..be20023 100644
> --- a/www/manager6/qemu/CPUOptions.js
> +++ b/www/manager6/qemu/CPUOptions.js
> @@ -28,6 +28,7 @@ Ext.define('PVE.qemu.CPUOptionsInputPanel', {
> },
> {
> xtype: 'numberfield',
> + submitLocaleSeparator: false,
> name: 'cpulimit',
> minValue: 0,
> maxValue: me.maxvcpus,
> diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
> index 0060394..fe14884 100644
> --- a/www/manager6/qemu/HDEdit.js
> +++ b/www/manager6/qemu/HDEdit.js
> @@ -208,6 +208,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
>
> me.hdsizesel = Ext.createWidget('numberfield', {
> name: 'disksize',
> + submitLocaleSeparator: false,
> minValue: 0.001,
> maxValue: 128*1024,
> decimalPrecision: 3,
> diff --git a/www/manager6/qemu/HDResize.js b/www/manager6/qemu/HDResize.js
> index 0e50ff8..24ffca3 100644
> --- a/www/manager6/qemu/HDResize.js
> +++ b/www/manager6/qemu/HDResize.js
> @@ -45,6 +45,7 @@ Ext.define('PVE.window.HDResize', {
>
> me.hdsizesel = Ext.createWidget('numberfield', {
> name: 'size',
> + submitLocaleSeparator: false,
> minValue: 0,
> maxValue: 128*1024,
> decimalPrecision: 3,
> diff --git a/www/manager6/qemu/HDThrottle.js b/www/manager6/qemu/HDThrottle.js
> index 8d2af2a..412062c 100644
> --- a/www/manager6/qemu/HDThrottle.js
> +++ b/www/manager6/qemu/HDThrottle.js
> @@ -66,6 +66,7 @@ Ext.define('PVE.qemu.HDThrottleInputPanel', {
>
> me.mbps_rd = Ext.widget('numberfield', {
> name: 'mbps_rd',
> + submitLocaleSeparator: false,
> minValue: 1,
> step: 1,
> fieldLabel: gettext('Read limit') + ' (MB/s)',
> @@ -77,6 +78,7 @@ Ext.define('PVE.qemu.HDThrottleInputPanel', {
>
> me.mbps_rd_max = Ext.widget('numberfield', {
> name: 'mbps_rd_max',
> + submitLocaleSeparator: false,
> minValue: 1,
> step: 1,
> fieldLabel: gettext('Read max burst') + ' (MB)',
> diff --git a/www/manager6/qemu/NetworkEdit.js
> b/www/manager6/qemu/NetworkEdit.js
> index b63f5ff..b133bf1 100644
> --- a/www/manager6/qemu/NetworkEdit.js
> +++ b/www/manager6/qemu/NetworkEdit.js
> @@ -141,6 +141,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
> {
> xtype: 'numberfield',
> name: 'rate',
> + submitLocaleSeparator: false,
> fieldLabel: gettext('Rate limit') + ' (MB/s)',
> minValue: 0,
> maxValue: 10*1024,
> --
> 2.1.4
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list