]> source.dussan.org Git - nextcloud-server.git/commit
Fix toggle element being removed when MainFileInfoView is rendered again
authorDaniel Calviño Sánchez <danxuliu@gmail.com>
Fri, 9 Jun 2017 06:57:34 +0000 (08:57 +0200)
committerDaniel Calviño Sánchez <danxuliu@gmail.com>
Tue, 13 Jun 2017 14:41:21 +0000 (16:41 +0200)
commit365d7918b2df671180ab6d61b5a044754d24eb66
tree754cdeb643f58da594fd0d34b76854796f6ba2a5
parent2384703cf64f804c0cd0bc5444b5247447e1c003
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>
apps/systemtags/js/filesplugin.js
apps/systemtags/js/systemtagsinfoview.js