- Also fixes a few JSHint warnings in files app
- Added "global" comment on top of files app to suppress warning and
also inform devs about what globals are use
- Refactored download URL building to make it overridable
- Added download URL override in public page
- Added JS unit tests for download URL
- Added OC.redirect() method to facilitate unit testing
When a dir has no delete permission, the draggable isn't initialized on
files. This fix makes sure we don't try to destroy a draggable when it
wasn't inited in the first place.
Fixes#6254
- Refactored file tr lookup into FileList.findFileEl that uses
filterAttr to avoid escaping issues in jQuery selectors
- Fixed versions and sharing app to properly escape file names in
attributes
Whenever a file is renamed, if the extension changes, the mime type and
preview might change. This fix passes the updated info to the client
that updates it.
To prevent having to send the list of all files for deletion, only set a
flag "allfiles". This should make it a bit smoother when deleting 5000+
files.
Also fixes some "empty trash" message issues.
Previously, the storage statistics were always for the root dir.
This means that the upload button would always show the limit for the
root dir, even when uploading to a shared dir or external storage.
This fix adds a "dir" argument to getstoragestats.php.
- show tooltip when violating naming constraints while typing
- when target filename exists on server fallback to dialog to interrupt the users flow because something unexpected went wrong
- fixes#5062
- also fixes some whitespace and codestyle issues in files js
- uses css selector over filterAttr in touched js files
Some files app embed themselves under the controls (like the text
editor). The new method FileList.setViewerMode() makes it possible to
properly show/hide the control buttons using the correct permissions.
Apps using this approach must call setViewerMode(true) when starting and
setViewerMode(false) upon closing to restore the controls.
This is needed for #5284
Creating new files, folders or uploading files now have their sharing
icon updated accordingly.
For this, the global share status list that is cached in
OC.Share.statuses is reused for new files.
Performance should improve as the sharing list is now only loaded once
per navigation session.
In OC.Share, split loadIcons into loadIcons + updateIcons.
Fixes#4977
Ajax loading is not supported yet for public files view.
This fix disabled the history API, ajax loading and ajax directory
switch in public mode until it is implemented properly.
Some apps create URLs to the files app and encode the spaces of a
directory using plus signs.
This fix ensures that plus signs are properly converted back to spaces
when parsing the URL on the JS side.