Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez 6bcace4609 Extract toggle visibility of a SystemTagsInfoView to its own view
The SystemTagsInfoViewToggleView is a basic view that renders a label
that, when clicked, toggles the visibility of an associated
SystemTagsInfoView.

In order to keep the view parent agnostic its attachment and detachment
to/from the MainfFileInfoView is done in the FilesPlugin.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-09 09:13:29 +02:00
Daniel Calviño Sánchez ccf4b9ec69 Add visibility related methods
SystemTagsInfoView now provides public methods related to its visibility
in preparation to be used by external objects.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-09 09:04:24 +02:00
Daniel Calviño Sánchez 9e767b46ec Fix toggle element being removed when MainFileInfoView is rendered again
The toggle element was added to the MainFileInfoView element when
SystemTagsInfoView was rendered. However, if the MainFileInfoView was
rendered again after that the toggle element was removed. Therefore,
instead of adding it when SystemTagsInfoView is rendered, the toggle
element has to be added when MainFileInfoView triggers its "post-render"
event.

Note, however, that when MainFileInfoView is rendered all the events are
removed from its child elements. As the toggle uses a "click" event
either the event has to be added back or the element has to be detached
before the MainFileInfoView is rendered.

Fixes #4944

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-09 09:02:14 +02:00
Joas Schilling a06398f804
Focus the input after clicking the "Tags" label
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-14 10:52:45 +01:00
Joas Schilling c5c403b574
Add a handle for the tags label 2016-09-20 18:07:06 +02:00
Joas Schilling d853899ab6
Hide the tags input field when it's empty 2016-09-20 17:19:11 +02:00
Vincent Petry 88740f035d
Act on effective system tag canAssign permission
Whenever the server returns true for the can-assign Webdav property of
a system tag, it means the current user is allowed to assign,
regardless of the value of user-assignable.

This commit brings the proper logic to the web UI to make it possible
for users to assign when they have the permission.
2016-05-20 17:56:02 +02:00
Joas Schilling 4471f359b1 Rename system tags app to collaborative tags 2016-02-26 09:14:28 +01:00
Vincent Petry 0a1350d5ac System tags sidebar selector now respects permissions
For admins: display the namespace behind the tag name.
For users: no namespace, don't display non-assignable tags in the
dropdown, display already assigned non-assignable tags with a different
style
2016-01-25 10:45:02 +01:00
Vincent Petry ffba6d0a7e Added system tags GUI in sidebar
Added files details sidebar panel to assign/unassign/rename/delete
system tags.
2016-01-19 16:24:26 +01:00