[BUGFIX] Form NumberFields ignore typed values in wizard 11/42911/2
authorSebastian Wagner <sebastian.wagner@tritum.de>
Thu, 27 Aug 2015 19:37:29 +0000 (21:37 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 28 Aug 2015 15:35:11 +0000 (17:35 +0200)
"Spinner fields" in EXT:form are an old remake of the HTML5
number in ExtJS. Directly typing a value into that spinner
field is not stored - only by clicking the accordant buttons
to "spinup" or "spindown" the value.

A listener for the blur event handles this task and now allows
to store typed numbers as well. The event handler utilizes the
blur event to update the value - thus, the disabled onBlur
handling has to be disabled as well.
Using the change event did not work out due to ExtJS constraints.

Resolves: #69024
Releases: master, 6.2
Change-Id: I13264019c3edbfb8aa7051a4ae2e3ce91dd5c7f6
Reviewed-on: http://review.typo3.org/42895
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-on: http://review.typo3.org/42911

typo3/sysext/form/Resources/Public/JavaScript/Wizard/Ux/Ext.ux.form.spinnerfield.js
typo3/sysext/form/Resources/Public/JavaScript/Wizard/Viewport/Left/Options/Forms/Attributes.js
typo3/sysext/form/Resources/Public/JavaScript/Wizard/Viewport/Left/Options/Forms/Validation/Rule.js

index 28f5b97..92765c6 100644 (file)
@@ -16,7 +16,8 @@ Ext.ux.form.SpinnerField = Ext.extend(Ext.form.NumberField, {
        actionMode: 'wrap',
        deferHeight: true,
        autoSize: Ext.emptyFn,
-       onBlur: Ext.emptyFn,
+       // onBlur function shall use the inherited handler function
+       // onBlur: Ext.emptyFn,
        adjustSize: Ext.BoxComponent.prototype.adjustSize,
 
        constructor: function(config) {
index 3a32499..160b22b 100644 (file)
@@ -157,6 +157,10 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Attributes = Ext.extend(Ext.FormPa
                                                        'spin': {
                                                                scope: this,
                                                                fn: this.storeValue
+                                                       },
+                                                       'blur': {
+                                                               scope: this,
+                                                               fn: this.storeValue
                                                        }
                                                }
                                        });
@@ -275,6 +279,10 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Attributes = Ext.extend(Ext.FormPa
                                                        'spin': {
                                                                scope: this,
                                                                fn: this.storeValue
+                                                       },
+                                                       'blur': {
+                                                               scope: this,
+                                                               fn: this.storeValue
                                                        }
                                                }
                                        });
@@ -357,6 +365,10 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Attributes = Ext.extend(Ext.FormPa
                                                        'spin': {
                                                                scope: this,
                                                                fn: this.storeValue
+                                                       },
+                                                       'blur': {
+                                                               scope: this,
+                                                               fn: this.storeValue
                                                        }
                                                }
                                        });
@@ -384,6 +396,10 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Attributes = Ext.extend(Ext.FormPa
                                                        'spin': {
                                                                scope: this,
                                                                fn: this.storeValue
+                                                       },
+                                                       'blur': {
+                                                               scope: this,
+                                                               fn: this.storeValue
                                                        }
                                                }
                                        });
@@ -421,6 +437,10 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Attributes = Ext.extend(Ext.FormPa
                                                        'spin': {
                                                                scope: this,
                                                                fn: this.storeValue
+                                                       },
+                                                       'blur': {
+                                                               scope: this,
+                                                               fn: this.storeValue
                                                        }
                                                }
                                        });
index a029059..b470ae6 100644 (file)
@@ -144,6 +144,10 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Validation.Rule = Ext.extend(Ext.F
                                                        'spin': {
                                                                scope: this,
                                                                fn: this.storeValue
+                                                       },
+                                                       'blur': {
+                                                               scope: this,
+                                                               fn: this.storeValue
                                                        }
                                                }
                                        });
@@ -159,6 +163,10 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Validation.Rule = Ext.extend(Ext.F
                                                        'spin': {
                                                                scope: this,
                                                                fn: this.storeValue
+                                                       },
+                                                       'blur': {
+                                                               scope: this,
+                                                               fn: this.storeValue
                                                        }
                                                }
                                        });