"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>
Implemented visuals for enabling/disabling user from admin user list.
Added the controller functions for enabling/disabling a user.
Added the route for changing user status (enabled/disabled) and added an additional route handler in the user controller.
Finished the visuals to reflect current user status and changed user status respectively.
Changed the single icon for enabling/disabling a user into a menu where deletion and state toggling of a user is selectable.
Added displaying of disabled user count.
Improved style of user action menu.
Added proper counting of disabled users.
Removed visual indicator for disabled users.
Moved pseudo-group detection for disabled users from frontend to the controller.
Changed units for newly introduced css values from em to px.
Removed unnecessary png and optimized svg with scour.
Changed the userlist template to display the user action menu with correct width.
Style fixes for better readability and coding style conformity.
Changed the icons for enabling, disabling and deleting a user in the action menu.
this fixes#3634
1. fixed computerFileSize to be more picky about incorrect values
2. more tests for computerFileSize
3. use computerFileSize to validate user quota
Signed-off-by: Artur Neumann <info@individual-it.net>
Otherwise when adding a user as subadmin this would throw the following JS error:
```
users.js?v=bc2aae7…:500 Uncaught TypeError: Cannot read property 'message' of undefined(…)(anonymous function) @ users.js?v=bc2aae7…:500j @ jquery.js:3099fireWith @ jquery.js:3211x @ jquery.js:8264(anonymous function) @ jquery.js:8605
```
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
The call to UserList.add() was wrong and was passing "user.lastLogin"
as the sort argument which would cause the list to be resorted over and
over again for every added item after loading the next page of users.
Instead of pre-rendering all multiselects with lots of group entries,
the current groups are now displayed as simple labels.
Behind the labels there is a pencil icon like for other fields.
When clicking the pencil icon, the dropdown will be spawned and will
open itself.
Upon closing of the dropdown, the label comes back with the updated
selection and the dropdown is destroyed.
* Password Update Notification
Added an IF ELSE statement to ensure that feedback is provided to the
user on successfully updating a user password in settings.
* Password Update Success Message
Updated the password update success message