Remove more unused legacy ids from early ownCloud times.
This reduces the number of duplicate ids in the DOM.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Removed legacy "#dir" input element in the DOM.
Apps should use OCA.Files.App.currentFileList or
OCA.Sharing.PublicApp.fileList and call getCurrentDirectory() to
retrieve the current directory and changeDirectory() to change it.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
When system default color theme is selected for theming, the `enabledThemes` array
is empty or just contains on entry `'default'`, in this case the color theme has
to be retrieved from the browser to ensure text like the modified date is readable.
This fixes#33298
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Note that the quota may change too when files are moved if the file is
moved, for example, to or from a folder shared by other user.
Besides the quota the storage statistics are also updated, similar to
what is done when a file is deleted.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"t()" escapes and sanitizes the returned text by default, so strings
like "<" are converted to "<". However, the "jQuery.text()" parameter
does not need to be escaped, as "<" is shown literally as "<"
rather than "<". Now "jQuery.html()" is used instead, which "unescapes"
the given text and sets it as a new text node (as the text in the
parameter does not contain markup for elements, only text).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Probably here for legacy reasons, but it is a bit weird to call an .php
endpoint that doesn't correspond to a .php file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
When an upload fails a toast is shown with either a specific message or
just the textual part of the HTTP error code (which comes from the
upload failure handler and set by "jQuery.ajax()". However, if there
is neither a message nor an error then the toast will show the default
message from the Toastify-js library, which is an undescriptive "Hi
there!".
When HTTP/2 is used Chromium does not provide the textual part of the
HTTP error code, so when an upload fails the toast can receive an empty
message and thus just show "Hi there!". Now an explicit message is
provided as a fallback to prevent that.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
- Add visible-focus effect on each header entry
- Show focus outline when using focus-visible (keyboard navigation)
- Add polyfy for focus-visible since it's only very recently available
on webkit
- Change text for link to home button to describe the destination and
not the current page
- Improve focus effect in app sidebar navigation
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Previously, clicking on an menu item in the breadcrumb menu removed the
parent entries of the path, i.e.:
Clicking on the "to" entry in "/path/to/some/folder" changed the
breadcrumb menu to show only the "/path/to" entries.
With this change the breadcrumb menu changes this behaviour as the full
path is still visible (and usable) but with the "to" entry beeing
highlighted.
Signed-off-by: Christian Paier <hallo+git@cpaier.com>
Whenever an error occurs, also hide the progress bar.
The logic was also adjusted to properly detect uploads that are pending
deletion, in which case the progress bar can already be hidden.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Add a new approach for flagging an upload as aborted because we can't
rely on the browser fully cancelling the request as we now seem to
receive an error response from the server instead of a jQuery "abort"
message.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
When using the browser back button or clicking on sections on the left
sidebar (like favorites), the "changeDirectory" jQuery event did not get
called, so apps like recommendations would not notice the directory
change.
This fixes the issue by also setting changeUrl to true when the file
list's directory got changed as a result from a URL change.
Added optional changedThroughUrl argument to make sure the event
recipient knows if the change was done through a URL change and make it
possible prevent a loop in the onDirectoryChange handler that actually
changes the URL when the origin was already from a URL change.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
When reaching the root dir, instead of reloading the file list we reload
the page completely. This trigger a redirection to the login page automatically
with the correct ?redirect_url= in thr url.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>