[TASK] Unify clearable input fields
There are three places in the core where clearables (cleaning the content of a input field with an X at the end) are used. - FormEngine - Documentation - Extension Manager For EXT:documentation a hand-written jQuery plugin was added called "jquery.clearable". This was also used in Extension Manager. For FormEngine there was a inline JS code changing CSS classes on hover. In recent changes the clearable logic for FormEngine broke. The proposed change now unifies the code. 1. The clearable plugin was solved so it is not called multiple times on the same input field, and also takes into account if the input field is used like in FormEngine where "hidden" fields are used. 2. The FormEngine RequireJS module is now cleaned so it has a method "TYPO3.FormEngine.reinitialize" which can be used from outside the module for AJAX requests like IRRE. 3. The FormEngine now uses the clearable plugin initialized via the new function instead of its own inlineJS logic, and removes the old broken logic. 4. The corresponding CSS is now included in the LESS file instead of a separate file with a few lines. Resolves: #63432 Releases: master Change-Id: I0f7d4acb9b31ae32ae766c1f56dbdeb0ea3f24e6 Reviewed-on: http://review.typo3.org/34782 Reviewed-by:Frank Nägler <typo3@naegler.net> Tested-by:
Frank Nägler <typo3@naegler.net> Reviewed-by:
Mathias Schreiber <mathias.schreiber@wmdb.de> Tested-by:
Mathias Schreiber <mathias.schreiber@wmdb.de>
Showing
- typo3/contrib/jquery/jquery.clearable.css 0 additions, 18 deletionstypo3/contrib/jquery/jquery.clearable.css
- typo3/contrib/jquery/jquery.clearable.js 58 additions, 61 deletionstypo3/contrib/jquery/jquery.clearable.js
- typo3/sysext/backend/Classes/Form/Element/InputElement.php 3 additions, 6 deletionstypo3/sysext/backend/Classes/Form/Element/InputElement.php
- typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js 23 additions, 0 deletions.../sysext/backend/Resources/Public/JavaScript/FormEngine.js
- typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js 1 addition, 1 deletion...sext/backend/Resources/Public/JavaScript/jsfunc.inline.js
- typo3/sysext/documentation/Resources/Private/Layouts/Default.html 1 addition, 2 deletions...sext/documentation/Resources/Private/Layouts/Default.html
- typo3/sysext/extensionmanager/Resources/Private/Layouts/Main.html 1 addition, 2 deletions...sext/extensionmanager/Resources/Private/Layouts/Main.html
- typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_tceforms.less 1 addition, 45 deletions...kin/Resources/Private/Styles/TYPO3/_element_tceforms.less
- typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_main_form.less 19 additions, 0 deletions...ext/t3skin/Resources/Private/Styles/TYPO3/_main_form.less
- typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css 16 additions, 41 deletionstypo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css
Please register or sign in to comment