The file selection is now based on the internal model array
FileList.files instead of the visible checkboxes.
This makes it possible to virtually select files that haven't been
rendered yet (select all, then deselect a visible one)
Added more unit tests for selection (with shift and ctrl as well)
Removed "insert" flag, inserting is by default for FileList.add().
Added "animate" flag to FileList.add().
Added logic to correctly detect when to insert/append elements whenever
the insertion point is visible or not.
Fixed "render next page" logic to work correctly when many pages of
files have been added.
The FileList.files model is now updated with file operations.
Adding files to the list will add to the model first, then to the DOM.
If the insertion point isn't visible yet, the file won't be added to the
DOM until the user scrolls down.
Updated unit tests to include checking for the correct insertion point.
- moved file selection code to FileList
- fix selection summary when all files are selected
- nextPage now auto-selects files if "select all" checkbox is checked
- fixed trashbin to use the same selection logic as FileList
- moved the summary code into a new class FileSummary
- FileSummary is calculated only once, then updated with add/remove
- added new OC.Util namespace for JS utility functions
Files app:
- removed file list template, now rendering list from JSON response
- FileList.addFile/addDir is now FileList.add() and takes a JS map with all required
arguments instead of having a long number of function arguments
- added unit tests for many FileList operations
- fixed newfile.php, newfolder.php and rename.php to return the file's
full JSON on success
- removed obsolete/unused undo code
- removed download_url / loading options, now using
Files.getDownloadUrl() for that
- server side now uses Helper::getFileInfo() to prepare file JSON response
- previews are now client-side only
Breadcrumbs are now JS only:
- Added BreadCrumb class to handle breadcrumb rendering and events
- Added unit test for BreadCrumb class
- Moved all relevant JS functions to the BreadCrumb class
Public page now uses ajax to load the file list:
- Added Helper class in sharing app to make it easier to authenticate
and retrieve the file's real path
- Added ajax/list.php to retrieve the file list
- Fixed FileActions and FileList to work with the ajax list
Core:
- Fixed file picker dialog to use the same list format as files app
- When all files are selected, do not send the whole file list
- Download will trigger download for the parent folder, also works
with root
- Delete will send "allfiles" to the server that will find the file
list or the passed directory by itself
- 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
- rename action is now checked inside of ".nametext" element
- added test to ensure that display() correctly resets all actions
including the rename one
Whent trying to upload/rename/create files in a folder that was removed
or rename, the correct error message is now shown.
In the case of upload of multiple files, the upload is cancelled.
This situation can happen if the target folder was renamed or removed
from another browser window or client.
- 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
- added karma utility to run jasmine unit tests
- added Sinon library (for stubs/mocks/fakeserver)
- added a few unit tests for core and files
- added autotest-js.sh script
When accessing a shared folder, the folder's owner appears as mountpoint
but wasn't wrapped by a quota storage wrapper.
This fix makes sure that all home storages are wrapped by a quota
storage wrapper, if applicable, to make sure quotas are respected when
uploading into shared folders.