Skip to content
  • Benni Mack's avatar
    [TASK] Unify clearable input fields · 7cab5d2d
    Benni Mack authored
    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>
    7cab5d2d