summaryrefslogtreecommitdiffstats
path: root/apps/files/js
Commit message (Collapse)AuthorAgeFilesLines
* Use proper whitespaceMorris Jobke2017-11-061-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Reverse favorite icon coloring in files action menuJan-Christoph Borchardt2017-10-301-2/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Show favourite action as the first one in the file actions menuDaniel Calviño Sánchez2017-10-301-1/+1
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* 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>
* | Merge pull request #6940 from nextcloud/master-6935-ellipsisJoas Schilling2017-10-251-2/+2
|\ \ | | | | | | Add space between ellipsis and word
| * | Add space between ellipsis and wordMorris Jobke2017-10-251-2/+2
| | | | | | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | | Merge pull request #6709 from ↵Morris Jobke2017-10-254-44/+98
|\ \ \ | |/ / |/| | | | | | | | nextcloud/show-checkbox-where-the-favourite-icon-is-now Show checkbox where the favourite icon is now
| * | 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>
| * | Remove "has-favorites" class from file list tableDaniel Calviño Sánchez2017-10-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The "has-favorites" CSS class is no longer used after moving the favorite mark to the top right corner of the thumbnail, so there is no need to add it to the table. 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-192-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Replace inline favorite action with just a favorite iconDaniel Calviño Sánchez2017-10-191-77/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparatory step for a following commit in which the position of the favorite icon and the checkbox will be swapped; in that new design the favorite icon is no longer expected to be an action but just a simple mark on whether the file is favorited or not (the action is expected to be triggered then only from the file actions menu). The favorite icon is now fully shown or completely hidden depending on whether the file is favorited or not. As the icon is just informative but no longer an action now it does not change when hovered or focus. In the same way, the alternative text when the file is not favorited now it is not "Favorite" (an action) but "Not favorited" instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Add "Favorite" action to the file actions menuDaniel Calviño Sánchez2017-10-191-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new FileAction for the menu is essentially the same as the old inline FileAction, except for the rendering; in this case the FileAction is shown in the menu in a standard way, so there is no need to provide a custom renderer (although the menu entry text and icon change depending on whether the file is currently a favorite or not, but that can be done just with displayName and iconClass functions). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Add support to FileActionsMenu for icon class functionsDaniel Calviño Sánchez2017-10-192-1/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | Icon class function properties make possible to render a different icon class depending on the context of the file action. Inline file actions had support for them already and called them passing the file name and context of the file action as parameters. Due to this the FileActionsMenu passes those parameters too to icon class functions instead of just the context like done for display name functions. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* / Update file-upload.jsrakekniven2017-10-071-2/+2
|/ | | Fixed tiny translation issues. Removed space before ellipsis.
* Add proper labels to various form elements and buttonsJan-Christoph Borchardt2017-09-291-1/+1
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* 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-182-12/+127
|\ | | | | 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>
| * Change move copy order and debug leftoverThomas Citharel2017-09-151-2/+2
| | | | | | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
| * [WIP] Added copy and move buttonsThomas Citharel2017-09-152-29/+20
| | | | | | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
| * Allow files to be copied through action menu & multiple files actionsThomas Citharel2017-09-152-1/+99
| | | | | | | | 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-262-0/+4
| | | | 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>
* Replace ... with …Morris Jobke2017-08-231-3/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Show "Uploading..." in web UI for long uploadsMorris Jobke2017-08-231-0/+4
| | | | | | | | If the estimated upload time is bigger than 4 hours it shows the text "Uploading..." because the time then doesn't give any good hint to the user anyways. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Do not fetch the whole text file for the sidebar previewRoeland Jago Douma2017-08-031-1/+6
| | | | | | | | Just fetch the first 10kb. This should be more than enough in 99% of the cases. And avoid downloading a 10mb text file just to display a tiny portion. 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>
* Merge pull request #5177 from Bekcpear/masterRobin Appelman2017-06-161-13/+15
|\ | | | | Fix upload remaining time
| * Fix uploadrate value of 'original-title' attributeBekcpear2017-06-161-1/+1
| | | | | | | | | | | | | | The unit of `data.bitrate` is bit, but the argument unit of `humanFileSize` function is byte, so it should be divided by 8. Signed-off-by: Yaojin Qian <i@ume.ink>
| * Fix upload remaining timeBekcpear2017-06-161-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | The upload remaining time is always 'a few second' whatever a big or a small file uploading. This commit fixes it. The `new Date().getMilliseconds()` only return a three digits number. When time arrived the next second, the millisecond start from ZERO again. So `new Date().getTime()` is the righe choice. And remaining time variables shoule be initialized when the file starts uploading, otherwise the remaining time of a new upload will always be 'Infinity years' until you refresh the page. Signed-off-by: Yaojin Qian <i@ume.ink>
* | Merge pull request #5378 from patschi/fix-5349Morris Jobke2017-06-131-1/+1
|\ \ | | | | | | Fix #5349, no themed icon when dragging folder
| * | Fix #5349, no themed icon when dragging folderPatrik Kernstock2017-06-131-1/+1
| | | | | | | | | | | | Signed-off-by: Patrik Kernstock <info@pkern.at>
* | | Put the quota bar to the bottomMorris Jobke2017-06-131-1/+1
| | | | | | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | | Only set the active item when there is one (not the case for quota)Joas Schilling2017-06-131-1/+3
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Add quota to the files viewJoas Schilling2017-06-131-0/+4
|/ / | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Trigger pre and post render events in MainFileInfoDetailsViewDaniel Calviño Sánchez2017-06-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The post-render event makes possible to modify the MainFileInfoDetailsView element once it has been rendered, which is needed by OCA.SystemTags.FilesPlugin to add the "Tags" label to the file details, while the pre-render event makes possible to detach added elements if needed before the MainFileInfoDetailsView is rendered again, as that removes the events from the child DOM elements even if they belong to other views. 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-092-0/+25
| | | | | | | | | | | | | | | | 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>
* | Copy permalink directly on clickRoeland Jago Douma2017-05-231-9/+30
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make new file file tooltip error text changePhil Davis2017-05-211-0/+1
| | | | Signed-off-by: Phil Davis <phil@jankaritech.com>
* Make rename file tooltip error text changePhil Davis2017-05-211-0/+2
| | | | Signed-off-by: Phil Davis <phil@jankaritech.com>
* Merge pull request #4922 from nextcloud/verbose-uploadmenu-textMorris Jobke2017-05-171-2/+2
|\ | | | | Use more verbose text for upload menu
| * Use more verbose text for upload menuJan-Christoph Borchardt2017-05-161-2/+2
| | | | | | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* | Use proper mime icons for search resultsJulius Härtl2017-05-161-26/+4
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* 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>