To show the password in plain text "showPassword" adds a text input
after the password input and swaps their visibility depending on whether
the password has to be shown in plain text or not. In a similar way,
"strengthify" by default adds the strength bar after the input element
it was called on. Due to this, if "showPassword" is called before
"strengthify" on the same password input then the strength bar ends
between the password input and the text input, and when the text input
is shown it appears below the strength bar.
To fix this now the strength bar is added after the text input in those
places in which "strengthify" was called after "showPassword" on the
same element.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"click" events are handled by several elements in user settings, and
some of them (like the edit icon in the user name) stop the propagation
of the event. Due to this the event never reaches the document and thus
the menu was not closed in those cases. "click" events are always
preceded by "mouseup" events (as "click" events are generated when
"mousedown" and "mouseup" events occur in the same element), so now the
menu is closed when a "mouseup" is received in the document.
The described problem would happen too if an element stopped the
propagation of the "mouseup" event; currently no element does that in
the user settings, so now the menu is always closed as expected.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
A popover menu is displayed when its element has the "open" CSS class.
That class is added when clicking on the menu toggle, but it was removed
only when clicking again on the toggle, so the popover menu in user
settings could be closed only by clicking again on the menu toggle. Now
the "open" CSS class is removed too when clicking on the body, either
directly or through event propagation.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* l10n in Nextcloud works by extracting the values only passed on their location and not based on the first parameter
* we need to change the translation pool from `core` to `settings` then
* fixes#7345
Signed-off-by: Morris Jobke <hey@morrisjobke.de>