summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/src
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2020-04-06 10:54:07 +0200
committerAzul <azul@riseup.net>2020-04-09 16:41:09 +0200
commit43f0d2a3b5bc76ed72693695451398b4b7b78411 (patch)
tree1c726eeaef75cd34e46aee64449737f826c4999d /apps/files_trashbin/src
parentd2728cbdc13e89f11dc2b8c48b6148d6e89d0c83 (diff)
downloadnextcloud-server-43f0d2a3b5bc76ed72693695451398b4b7b78411.tar.gz
nextcloud-server-43f0d2a3b5bc76ed72693695451398b4b7b78411.zip
Allow opening files for editing in new tabs
In a file list files with a default action have an href that will trigger the action. This way ctrl-click and middle button click open the default action in a new tab. In order to achieve this a new param `openfile` was introduced to the files app. It will make the files app trigger the default action for the file in question. This also allows linking to file content rather than just the details display. Introduce fileList.getDefaultActionUrl() to create a link with that param set. It's overwritten in the trashbin fileList so that anchors continue to have `#` as a href. Fix the link generation for subfolders of public shares: 58a87d0 was the last commit that touched the linkTo function in public.js. It included the params as arguments to the generateUrl function. Turns out this completely ignores the dir parameter now. The inclusion was reverted in other places so revert it here as well. Also change `dir` to `path` in the param as that is respected when following the link. Add Test for the new link url for files with default action. Remove test for multiple selects with ctrl-click as that is not what we are doing anymore. Signed-off-by: Azul <azul@riseup.net>
Diffstat (limited to 'apps/files_trashbin/src')
-rw-r--r--apps/files_trashbin/src/filelist.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_trashbin/src/filelist.js b/apps/files_trashbin/src/filelist.js
index d499c108711..8912789e752 100644
--- a/apps/files_trashbin/src/filelist.js
+++ b/apps/files_trashbin/src/filelist.js
@@ -241,6 +241,11 @@
return '#'
},
+ getDefaultActionUrl: function() {
+ // no default action
+ return '#'
+ },
+
updateStorageStatistics: function() {
// no op because the trashbin doesn't have
// storage info like free space / used space