[TASK] Optimize FormEngineValidation, Part I
The implementation of FormEngineValidation has been improved at some parts: - The parsed integer value in FormEngineValidation.formatValue is now stored in a variable to prevent parsing the same value multiple times. - The `nospace` evaluation has been improved: Instead of checking each character, a regex is applied. - The `ltrim` and `btrim` implementations are now regex based. There are already native JavaScript implementations, but not supported by every browser. - parseInt does now really a parseInt() call and checks for NaN. - The dirty state of the form is now stored in a variable after changing a field, the DOM is not traversed after clicking "Close" anymore. Resolves: #72485 Releases: master Change-Id: I3f166e65a949138595c9828684ea6c15a0deefc7 Reviewed-on: https://review.typo3.org/45348 Reviewed-by:Morton Jonuschat <m.jonuschat@mojocode.de> Tested-by:
Morton Jonuschat <m.jonuschat@mojocode.de> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl>
Showing
- typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js 7 additions, 1 deletion.../sysext/backend/Resources/Public/JavaScript/FormEngine.js
- typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js 22 additions, 41 deletions...ckend/Resources/Public/JavaScript/FormEngineValidation.js
Please register or sign in to comment