Skip to content
Snippets Groups Projects
Commit 7cab5d2d authored by Benjamin Mack's avatar Benjamin Mack
Browse files

[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: default avatarFrank Nägler <typo3@naegler.net>
Tested-by: default avatarFrank Nägler <typo3@naegler.net>
Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
parent fe83f51c
Branches
Showing
with 123 additions and 176 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment