summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
Commit message (Collapse)AuthorAgeFilesLines
* Fix empty details view after renaming a fileDaniel Calviño Sánchez2018-01-111-1/+1
| | | | | | | | | | | "FileList._updateDetailsView" expects either a file name (as a string) or a file model (as an "OCA.File.FileInfoModel"), but when called through "updateInList" an "OC.Files.FileInfo" object was given instead. As the given attribute was not a model "_updateDetailsView" treated it as a file name and tried to get the model for that file, which failed and caused the details view to be emptied. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fixed quota update on upload and on deleteJohn Molakvoæ (skjnldsv)2018-01-031-1/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix unwanted varJohn Molakvoæ (skjnldsv)2018-01-031-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update quotas on each uploadJohn Molakvoæ (skjnldsv)2018-01-031-0/+6
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #7624 from ↵Morris Jobke2018-01-021-0/+3
|\ | | | | | | | | nextcloud/fix-fileActions-currentFile-not-set-before-using-it Fix "fileActions.currentFile" not set before using it
| * Fix "fileActions.currentFile" not set before using itDaniel Calviño Sánchez2017-12-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | When an empty area of a file row was clicked and the "Details" action was executed "fileActions.currentFile" was not guaranteed to be set to the appropriate object (it depended on the previous actions of the user), so when it was used by "getCurrentMimeType()" and other FileActions functions they may not work as expected. Now it is explicitly set to the appropriate value before its use. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Merge pull request #7592 from nextcloud/update-quota-on-files-uploadRoeland Jago Douma2017-12-281-1/+0
|\ \ | |/ |/| Update quota on files upload
| * Fixed testsJohn Molakvoæ (skjnldsv)2017-12-261-2/+0
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Update quota on file upload and deletionJohn Molakvoæ (skjnldsv)2017-12-211-0/+1
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Trigger the "Details" action when clicking on an empty file row spaceDaniel Calviño Sánchez2017-12-211-1/+18
|/ | | | | | | | | | | | | Clicking on an empty space in a file row causes the details view to be shown. As it is a user initiated action on the file list now it is done by triggering the Details action instead of directly calling "_updateDetailsView"; the result is the same in both cases, but using the action is more consistent (clicking on the file name triggers the default action, and clicking on the inline actions triggers those actions) and also makes possible to use the "beforeTriggerAction" and "afterTriggerAction" listeners. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #6670 from nextcloud/handle-encryption-state-in-web-interfaceTobias Kaminsky2017-12-061-4/+11
|\ | | | | Handle encryption state in web interface
| * show e2e folder icon on encrypted foldersBjoern Schiessle2017-11-201-1/+4
| | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
| * Add data attribute to file list rows telling if the file is encryptedDaniel Calviño Sánchez2017-11-201-2/+4
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * adjust permissions in web view for encrypted foldersBjoern Schiessle2017-11-201-1/+3
| | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | recycle SharedFileInfo values in fileInfoArthur Schiwon2017-11-231-4/+1
|/ | | | | | | | | 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>
* Merge pull request #7047 from ↵Björn Schießle2017-11-201-2/+7
|\ | | | | | | | | nextcloud/add-support-for-files-with-no-permissions Add support for files with no permissions
| * Remove requeriment for read permission on some actionsDaniel Calviño Sánchez2017-11-021-1/+1
| | | | | | | | | | | | | | The Details and the Favorite actions do not require any permission on the files to be performed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add proper handling of files without permissionsDaniel Calviño Sánchez2017-11-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | Now a file gets its directory permissions only if it contained no permissions (they were undefined or null), but not if its permissions were set to "NONE". Besides that, now file actions that do not require any permission on the file to be performed can be used on files that have no permissions. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix tooltip placement in Shared files listJan-Christoph Borchardt2017-11-141-1/+1
| | | | | | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* | Merge pull request #7051 from nextcloud/breadcrumbs-refactorMorris Jobke2017-11-131-20/+21
|\ \ | | | | | | Breadcrumbs refactor
| * | Improve drag & drop and fix some background issue if d&d on narrow windowsJohn Molakvoæ (skjnldsv)2017-11-081-3/+2
| | | | | | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * | Fixed click in menuJohn Molakvoæ (skjnldsv)2017-11-081-2/+2
| | | | | | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * | Fixed breadcrumb action feedback and optimisationJohn Molakvoæ (skjnldsv)2017-11-081-0/+2
| | | | | | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * | Fixed computation and removed unwanted scriptsJohn Molakvoæ (skjnldsv)2017-11-081-17/+17
| |/ | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge pull request #7056 from ↵blizzz2017-11-101-1/+2
|\ \ | | | | | | | | | | | | nextcloud/oc-28415-enable-chunking-in-authenticated-web-upload [oc] Enable chunking for bigger files in authenticated web upload
| * | Enable chunking for bigger files in authenticated web uploadVincent Petry2017-11-031-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds chunked uploads in the Web UI (for authenticated users, but not for public uploads). To do that the server endpoint used by the uploader is changed from WebDAV v1 to WebDAV v2. The chunking itself is done automatically by the jQuery-File-Upload plugin when the "maxChunkSize" parameter is set; in "fileuploadchunksend" the request is adjusted to adapt the behaviour of the plugin to the one expected by "uploads/" in WebDAV v2. The chunk size to be used by the Web UI can be set in the "max_chunk_size" parameter of the Files app configuration. By default it is set to 10MiB. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Merge pull request #7046 from ↵Morris Jobke2017-11-091-0/+20
|\ \ | | | | | | | | | | | | nextcloud/hide-summary-file-actions-when-selected-file-does-not-match Hide summary file actions when a selected file does not match
| * | Hide summary file actions when a selected file does not matchDaniel Calviño Sánchez2017-11-021-0/+20
| |/ | | | | | | | | | | | | | | | | | | When several files are selected and one of them can not be deleted the "Delete" file action is not shown in the summary. This commit extends that behaviour too to the other file actions in the summary ("Move or copy" and "Download"), so now an action is shown in the summary only if it can be executed on all the currently selected files. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | never show '/' as path for conflicting file namesRobin Appelman2017-11-071-1/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | still trigger conflict resolution for existing entries when the current ↵Robin Appelman2017-11-071-15/+16
|/ | | | | | entry doesn't need it Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #6869 from burned42/6307-fix_page_title_not_changedDaniel Calviño Sánchez2017-10-271-0/+1
|\ | | | | #6307 fix page title not changed
| * bugfix: set/change page title when switching to filelistBernd Stellwag2017-10-271-0/+1
| | | | | | | | Signed-off-by: Bernd Stellwag <burned@zerties.org>
* | Move checkboxes to their own columnDaniel Calviño Sánchez2017-10-191-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The selection column is not only a visual column, but also a real column of the file list table. Unlike other columns whose width is reduced in space constrained screens the selection column must stay the same so the tapping area is large enough to be easily usable The selection column does not appear in the search results table, so its contents have to be explicitly aligned with those of the main table based on whether the main table has a selection column or not (using the "has-selection" CSS class in the same way as the "has-favorite" CSS class was being used when there was a column for favorite actions). In the tests the ":visible" selector can no longer be used. That selector matches elements with a width or height that is greater than zero, but the dimensions calculated in the unit tests are not reliable; the width of the link was zero before these changes, and now moving the checkbox to its own column causes the height of the link to become zero too, so it no longer matches the ":visible" selector even if it is not hidden. As hidding and showing the link is based on its "display" CSS property its value is the one checked now. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Move favorite mark to the top right corner of the thumbnailDaniel Calviño Sánchez2017-10-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The favorite icon was shown on its own "column" (not a real column in the table, but a visual column achieved through margins and left positions). Now the icon was moved to the top right corner of the file thumbnail, and the thumbnail and file name were moved to the left to fill the space left by the "column". To keep the markup in line with its visual representation (and to ease the placing through CSS), the favorite mark is no longer prepended to the row, but appended to the thumbnail instead. In the same way, the thumbnail is no longer appended to the checkbox label, but to the link with the name of the file instead (although the checkbox is still shown at the bottom right corner of the thumbnail, and clicking on the thumbnail still selects the file). In order to show the "busy" state on a file the "icon-loading-small" CSS class is set to the parent element of the thumbnail, so the thumbnail is also wrapped now by another div with the same size and position as the label. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Set background size for thumbnail in CSS instead of JavaScriptDaniel Calviño Sánchez2017-10-191-2/+2
|/ | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* navigate to the root directory when showing the main filelistRobin Appelman2017-09-281-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix busy state loading animation in filesJohn Molakvoæ (skjnldsv)2017-09-231-4/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #6014 from nextcloud/add-copy-actionMorris Jobke2017-09-181-7/+117
|\ | | | | Allows files/folders to be copied.
| * Don't show success notifications for failed copy actions and update folder sizesThomas Citharel2017-09-151-33/+59
| | | | | | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
| * [WIP] Added copy and move buttonsThomas Citharel2017-09-151-10/+10
| | | | | | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
| * Allow files to be copied through action menu & multiple files actionsThomas Citharel2017-09-151-1/+85
| | | | | | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | Force refresh file list when clicking on breadcrumb even if target directory ↵Chon Kou2017-09-161-1/+1
|/ | | | | | equals current directory. Signed-off-by: Chon Kou <k.kou@alumni.ubc.ca>
* Move multiple filesThomas Citharel2017-08-271-2/+36
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Don't try the actual file upload if the checks already error outRoeland Jago Douma2017-08-261-0/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Don't fetch the translation from core but from filesRoeland Jago Douma2017-08-241-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* properly block file upload to non-active filelistRobin Appelman2017-07-101-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix sorting of favorite filesDaniel Calviño Sánchez2017-07-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sort comparator checks the "isFavorite" property of the FileInfo objects to compare. That property is set when the file list is loaded and the response from the server is parsed, and thus a freshly loaded file list has the proper sorting for favorite files. However, the property is not set in other cases, like when the FileInfo objects are derived from FileInfoModels due to a file being marked as a favorite or a text editor being closed, which causes the file to be sorted in the wrong position. There is no need to add the property in those situations, though; in all cases the TagsPlugin adds a "tags" array property that contains an OC.TAG_FAVORITE tag, so that tag can be checked instead of "isFavorite". Moreover, although "isFavorite" was added by the main "_parseFileInfo" function it did not really belong there but to the "FileInfoParser" from the TagsPlugin; however, as that property now is not used anywhere it was removed altogether. A cleaner solution would have been to make the sort comparator extensible by plugins like other behaviours of the file list and then add the sorting logic related to favorite files to the TagsPlugin. However, right now only the TagsPlugin would need to alter the main sorting logic, and it seems like a corner case anyway. Even if it is implemented as a plugin, favorite files is a core feature, so for the time being it will be taken into account directly in the main sorting logic; making the sort comparator extensible by plugins is defered until there are other use cases for that. Fixes #5410 Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Make possible to know the registered detail views in a details viewDaniel Calviño Sánchez2017-06-091-0/+15
| | | | | | | | In some cases, an app may need to act on a detail view registered by another app or the core, for example, to add extra elements to the element of the detail view. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Make rename file tooltip error text changePhil Davis2017-05-211-0/+2
| | | | Signed-off-by: Phil Davis <phil@jankaritech.com>
* Do not reload the filelist on first openRoeland Jago Douma2017-05-041-1/+10
| | | | | | | | | | | | | | | | Fixes: #4644 Without this patch the filelist would always reload. However since not all the correct data was set yet it would often: 1. fireoff a propfind to ../webdav/ 2. fireoff a propfind to ../webdav/<PATH> When just opening the file list those are the same so the result is just fine. However if opening a direct link it means that there is a race condition on which finishes first. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>