summaryrefslogtreecommitdiffstats
path: root/apps/files/js
Commit message (Collapse)AuthorAgeFilesLines
* Fix dropping a folder on a folder rowDaniel Calviño Sánchez2019-01-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the uploaded files have a relative path (that is, when a folder is uploaded) it is first ensured that all the parent folders exist, which is done by trying to create them. When a folder is created in the currently opened folder the file list is updated and a row for the new folder is added. However, this was done too when the folder already existed, which caused the previous row to be removed and a new one added to replace it. For security reasons, some special headers need to be set in requests; this is done automatically for jQuery by handling the "ajaxSend" event in the document. In the case of DAV requests, if the headers are not set the server rejects the request with "CSRF check not passed". When a file or folder is dropped on a folder row the jQuery upload events are chained from the initial drop event, which has the row as its target. In order to upload the file jQuery performs a request, which triggers the "ajaxSend" event in the row; this event then bubbles up to the document, which is then handled by adding the special headers to the request. However, when a folder was dropped on a folder row that folder row was removed when ensuring that the folder exists. The jQuery upload events were still triggered on the row, but as it had been removed it had no parent nodes, and thus the events did not bubble up. Due to this the "ajaxSend" event never reached the document when triggered on the removed row, the headers were not set, and the upload failed. All this is simply fixed by not removing the folder row when trying to create it if it existed already. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Replace ChildNode.before with custom before helperJulius Härtl2018-12-211-2/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #12598 from ↵Morris Jobke2018-11-232-11/+25
|\ | | | | | | | | nextcloud/stable14-12577-fix-rendering-of-the-sidebar-in-files-app [stable14] Fix rendering of the sidebar in Files app
| * Fix rendering of the sidebar in Files appDaniel Calviño Sánchez2018-11-222-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a view is rendered it should not be concerned with where it is going to be placed in the document; in general this should be a responsibility of the object using the view. Moreover, when the details view is rendered it should simply prepare a skeleton that includes the root elements provided by the plugins; those elements will be updated by the plugins as needed when a file or a tab is selected. Finally, the details view should not be explicitly rendered. The rendering removes the previous elements, but that is needed only when the details view is in a dirty state, that is, when new plugins were added since the last time that it was rendered. However, that dirty state is internally handled, and the view is automatically rendered again if needed when a file info is set. Due to all that the details view is no longer explicitly rendered when updating it with a different file. Also, as each file list has its own details view, and each details view has its own element, but there can be only one details view/sidebar element in the document, when the file list updates the details view it also replaces the current one in the document with its own details view if needed (that is, if it is not the current one already). Besides that, when the element of a details view is replaced with the element of a different details view the old one should be detached from the document, but never removed. Otherwise the event handlers would not work when that element is attached again later (when changing to a different section in the Files app and then going back to the previous one). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Do not switch to root folder if filelist is already shownJulius Härtl2018-11-222-3/+13
|/ | | | | | | Navigating to the root folder is already handled by OCA.Files.Navigation.setActiveItem in case the view doesn't change. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Set the filemodel before rending the detailsviewRoeland Jago Douma2018-11-061-1/+1
| | | | | | | | | | | fixes #10934 Else it triggers the rendering two times. Resulting is weird state in for example the comments. Because the comments for OLD_FILEID are retrieved but then the model is changed to NEW_FILEID. But the old comments still get in and get parsed. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove event handler no longer neededDaniel Calviño Sánchez2018-10-231-6/+0
| | | | | | | | | | | | | | The custom handler for "URL changed" events were added to reload the file list whenever the sections for favorites and shares were opened; this was used to fix the problem of not reloading the file lists when opening them for a second time. However, besides that the handlers were not really necessary, and as the root of the bug was fixed in the previous commit those handlers are now removed. The file list for tags uses the handler for a different purpose, though, so that one was kept. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix opening a section again in the Files appDaniel Calviño Sánchez2018-10-233-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a section is open in the Files app a "show" event is triggered. File list objects handle that event by reloading themselves, but only if the file list was shown at least once. However, the file list objects of plugins are created when the "show" event is triggered for the first time for their section; as the file list objects register their handler for the "show" event when they are created they never handle the first triggered "show" event, as the handler is set while that event is being already handled. Therefore, from the point of view of the handler, the second time that a "show" event was triggered it was seen as if the file list was shown for the first time, and thus it was not reloaded. Now the "shown" property is explicitly set for those file lists that are created while handling a "show" event, which causes them to be reloaded as expected when opening their section again. Note that it is not possible to just reload the file list whenever it is shown; the file list is reloaded also when the directory changes, and this can happen when the web page is initially loaded and the URL is parsed. In that case, if file lists were reloaded when shown for the first time then it could be reloaded twice, one with the default parameters due to the "show" event and another one with the proper parameters once the URL was parsed, and the files that appeard in the list would depend on which response from the server was received the last. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Do not hide the progress bar while the chunked upload is being assembledDaniel Calviño Sánchez2018-09-261-1/+48
| | | | | | | | | | | | | | | Large files are not uploaded in a single operation, but uploaded in several chunks; once all the chunks are uploaded then the server needs to assemble them to get the final file. Before, once the chunks were uploaded the progress bar was hidden. However, this was confusing for the users, as the file could still need some time to appear in the file list due to the assembling. Now once all the chunks are uploaded the text in the progress bar changes to inform the user that there are still some pending operations, and only when the file is finally assembled the progress bar is hidden. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Stores the sorting only if there is an userMichael Weimann2018-08-171-1/+1
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Object.values polyfillJohn Molakvoæ (skjnldsv)2018-08-161-0/+14
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Do not show action menu if no actions are availableJohn Molakvoæ (skjnldsv)2018-08-151-1/+7
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix quickaccess active indicator for folders with spacesJulius Härtl2018-08-091-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* js fixJohn Molakvoæ (skjnldsv)2018-08-081-3/+6
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Cleanup of leftover-sorting-code from quickaccess-feature #9714 #9720fnuesse2018-08-081-90/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Always call render to replace the app-sidebar if the detail view is updatedJulius Härtl2018-08-032-3/+6
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix return value of change directoryJulius Härtl2018-08-031-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #10310 from nextcloud/accessibility-headerMorris Jobke2018-07-252-2/+9
|\ | | | | Accessibility fixes for header and global elements
| * Trigger upload actions only for Enter & Space keysKevin Ndung'u2018-07-241-2/+4
| | | | | | | | Signed-off-by: Kevin Ndung'u <kevgathuku@gmail.com>
| * Trigger upload action also with keyboard navigation on enterJan-Christoph Borchardt2018-07-241-0/+5
| | | | | | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
| * Fix ability to open file or folder via keyboard, fix #10008Jan-Christoph Borchardt2018-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Before, the file or folder was opened when clicking on the name span, but not when clicking on the link that contains the name; clicking on the link highlighted the file and opened the sidebar, just like clicking on the file size or date. Now clicking on the link opens the file or folder, so the unit tests that tested clicks on the link were changed to test clicking on the file size instead. Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
| * Make Upload entry in +Menu focusableJan-Christoph Borchardt2018-07-201-1/+1
| | | | | | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* | Fixed scrolling containerJohn Molakvoæ (skjnldsv)2018-07-243-3/+0
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Jsunit fixesJohn Molakvoæ (skjnldsv)2018-07-201-1/+2
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Jsunit fixes 1John Molakvoæ (skjnldsv)2018-07-201-2/+5
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Sidebar fixJohn Molakvoæ (skjnldsv)2018-07-202-1/+4
| | | | | | | | | | | | | | Fix sidebar and scrollbar on content Sidebar fixes, and sidebar-width + header-height variables Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge pull request #10230 from nextcloud/feature/shareoverviewMorris Jobke2018-07-172-39/+20
|\ \ | |/ |/| Feature/shares overview
| * Fix fav quickaccess ressource additionJohn Molakvoæ (skjnldsv)2018-07-131-20/+13
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Upgraded navigation submenu management and api + created sharing submenuJohn Molakvoæ (skjnldsv)2018-07-131-19/+7
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge pull request #10110 from nextcloud/feature/100500/whats-new-info-usersMorris Jobke2018-07-131-0/+2
|\ \ | |/ |/| Display What's New info to users
| * Backend work to provide NC whats New info to usersArthur Schiwon2018-07-051-0/+2
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Fixed testsJohn Molakvoæ (skjnldsv)2018-07-123-72/+8
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Fixed favorite folder view displayJohn Molakvoæ (skjnldsv)2018-07-122-7/+14
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Added drop-animation to sortable-listfnuesse2018-07-122-36/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added icon-change on drag Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Navbar-closing in app when favorites-list is toggled on mobile Signed-off-by: fnuesse <felix.nuesse@t-online.de> Refactored Code Signed-off-by: fnuesse <felix.nuesse@t-online.de> Changed to alphabetical sorting Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed deletion of folder with identical names Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed ability to add files to the quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed wrong path-generation when added from favorites-star Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed Element from navbar when favorite-star in detailview is toggled off Signed-off-by: fnuesse <felix.nuesse@t-online.de> Changed Quota-Text to prevent boundarybreaks Reverted last commit
* | Fix collapsible-Button when list was emptied (or got first element)fnuesse2018-07-122-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Bad url-generation in javascript for new quickaccessitems Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed vertical scrolling in sortable-list which leads to "hidden" navbar Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed unnessessary console logs Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Bounds in custom sorting Signed-off-by: fnuesse <felix.nuesse@t-online.de> Reformatted code Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed horizontalscroll on sortable-list Fixed "stuck element" where you could not switch back to the original ordering in the sortable-list Signed-off-by: fnuesse <felix.nuesse@t-online.de>
* | Removed old codefnuesse2018-07-122-206/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed duplicate collapse-button and changed api-endpoints Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed app-navigation-caption from apps.scss Signed-off-by: fnuesse <felix.nuesse@t-online.de> Changed api-endpoints Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Codestyle (.js) Signed-off-by: fnuesse <felix.nuesse@t-online.de> Hid away extended Settings Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed reverse state Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Missing reverse after changing sort-strategy Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Copyright-Header Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed UI-Flickering Signed-off-by: fnuesse <felix.nuesse@t-online.de> hid dotmenu on toggle while favorites are empty Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added Draggable to listelements (WIP) Signed-off-by: fnuesse <felix.nuesse@t-online.de> Rebuild appnavigation.php with recursive function to allow easy implementation of sublists Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed draggable Sublist-Elements Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed draggable Sublist-Elements Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added date-modified sorting option to quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added custom order sorting option to quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added custom order sorting option to quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added fallback for custom ordering Signed-off-by: fnuesse <felix.nuesse@t-online.de>
* | Changed togglefnuesse2018-07-121-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Codestyle and changed linkgeneration Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Codestyle Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Codestyle (Renamed Variables) Signed-off-by: fnuesse <felix.nuesse@t-online.de>
* | Fixed css-flashingfnuesse2018-07-122-4/+24
| | | | | | | | | | | | | | | | Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed menu if initially empty Signed-off-by: fnuesse <felix.nuesse@t-online.de>
* | Added responsive folderaddingfnuesse2018-07-122-3/+78
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added collapsible to quickaccesslist Signed-off-by: fnuesse <felix.nuesse@t-online.de> Refactored Code Signed-off-by: fnuesse <felix.nuesse@t-online.de>
* | Added toggleable QuickAccessfnuesse2018-07-122-39/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: fnuesse <felix.nuesse@t-online.de> Deleted wrongly commited File Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added quickaccess-state persistence Signed-off-by: fnuesse <felix.nuesse@t-online.de> Started implementing sorting-algorithm for proper alphabetical display Signed-off-by: fnuesse <felix.nuesse@t-online.de> Finished Sorting of Quickaccess elements Signed-off-by: fnuesse <felix.nuesse@t-online.de> Implemented persistence for reverse-list and sorting-strategy Signed-off-by: fnuesse <felix.nuesse@t-online.de> Implemented initial sorting for reverse-list and sorting-strategy Signed-off-by: fnuesse <felix.nuesse@t-online.de> Refactored Code Signed-off-by: fnuesse <felix.nuesse@t-online.de> Refactored Code Signed-off-by: fnuesse <felix.nuesse@t-online.de> Refactored Code Signed-off-by: fnuesse <felix.nuesse@t-online.de>
* | Added FavoritesQuickaccess-Sidebarfnuesse2018-07-121-1/+39
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added FavoritesQuickaccess-Sidebar Added Files-FavoritesQuickaccess-Toggle Fixed CSS for SpacerElement Removed Unnessessary Alerts and added Translations Tried fixing initial Quick-Access Checkboxstate Signed-off-by: fnuesse <fnuesse@techfak.uni-bielefeld.de> Tried fixing initial Quick-Access Checkboxstate Changed double-Quotes to single-Quotes Revert webdavurl which was changed by mistake Revert quota-icon which was changed by mistake Changed the Folderhandling from custom-designed to nextcloud-NavigationManager-handling Signed-off-by: fnuesse <fnuesse@techfak.uni-bielefeld.de> Moved CSS-Spacerclass to apps.scss for global usage Signed-off-by: fnuesse <felix.nuesse@t-online.de> Renamed settings-caption in apps.scss to app-navigation-caption Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed old input-tag for showQuickAccess-state Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed old spacer element in files.scss Signed-off-by: fnuesse <felix.nuesse@t-online.de> Changed style of favorites-sublist and disabled the ability to disable files-quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de>
* Add focus indicator for file details view tabsKevin Ndung'u2018-06-251-4/+10
| | | | Signed-off-by: Kevin Ndung'u <kevgathuku@gmail.com>
* Remove debugJohn Molakvoæ (skjnldsv)2018-06-211-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix folder selectionJohn Molakvoæ (skjnldsv)2018-06-201-2/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Properly parse deselection and improved detectionJohn Molakvoæ (skjnldsv)2018-06-201-9/+28
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* IE11 compatibilityJohn Molakvoæ (skjnldsv)2018-06-201-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Select only searched filesJohn Molakvoæ (skjnldsv)2018-06-201-4/+13
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Added new search standardJohn Molakvoæ (skjnldsv)2018-06-191-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Adds a test case for the loading symbol in deleted files.Abijeet2018-06-181-2/+1
| | | | Signed-off-by: Abijeet <abijeetpatro@gmail.com>
* Fixes issue with action being displayed incorrectly.Abijeet2018-06-181-1/+1
| | | | | | Also fixes the issue with the loading icon on copy & move. Signed-off-by: Abijeet <abijeetpatro@gmail.com>