The custom handler for "URL changed" events were added to reload the
file list whenever the sections for favorites and shares were opened;
this was used to fix the problem of not reloading the file lists when
opening them for a second time. However, besides that the handlers were
not really necessary, and as the root of the bug was fixed in the
previous commit those handlers are now removed.
The file list for tags uses the handler for a different purpose, though,
so that one was kept.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This fixes errors from LGTM like the following one:
Variable i is used like a local variable,
but is missing a declaration.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes some recommendations from LGTM:
Avoid automated semicolon insertion (90% of all statements
in the enclosing function have an explicit semicolon).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
OCA.Sharing.SharedFileInfo was never defined and that stopped execution.
Interestingly, FF never showed me an error.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
fileInfo is composed of data from sharing, however additional data is
pulled when sidebar opens, e.g. the size. Then, existing data is
overwritten by data from the other source (files). The data points that
would be lost are not dirty however and still used, so we keep them.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Fixes#4248
The magic introduced in #3686 caused the shared views not to be updated
properly. Thus we just overwrite the _onUrlChange method in the
sharedfilelist.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
All reloadCallback must return either true for success or false in case
of failure / non-existing folder.
Some file lists only have a root folder (favorite, shares), so restrict
the path to that to avoid having a wrong path in the breadcrumbs.
Whenever a file is shared with others or with link, a delete button used
to be visible that triggered a direct deletion.
This button has been removed to avoid accidental deletion from people
who might believe it was an unshare button. Unsharing is still possible
inside the share dropdown.
Added mountType attribute for files/folder to indicated whether they are
regular, external or shared.
The client side then adapts the "Delete" action hint text based on this
information.
Only the mount roots must have the delete icon hint adapted.
To make this detectable on the client side, the mountType can now
be null, "shared", "shared-root", "external" or "external-root".
This also gives room to icon customization on the client side.