aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-10-10 11:26:15 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-29 13:20:07 +0100
commitd88b93c919b6bf7db1853ec91a68996e07a75ba4 (patch)
tree7a772701db1d79858530dad5ff786baa780b5ce1 /apps/files/js
parent1c13c52acffeac59b0ef5d156a9a5bc36e611619 (diff)
downloadnextcloud-server-d88b93c919b6bf7db1853ec91a68996e07a75ba4.tar.gz
nextcloud-server-d88b93c919b6bf7db1853ec91a68996e07a75ba4.zip
Add LoadSidebar event
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 8cca43d5749..0424ba2006b 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -636,9 +636,14 @@
fileName = ''
}
+ // this is the old (terrible) way of getting the context.
+ // don't use it anywhere else. Just provide the full path
+ // of the file to the sidebar service
+ var tr = this.findFileEl(fileName)
+ var model = this.getModelForFile(tr)
+ var path = model.attributes.path + '/' + model.attributes.name
+
// open sidebar and set file
- const dir = `${this.dirInfo.path}/${this.dirInfo.name}`
- const path = `${dir}/${fileName}`
OCA.Files.Sidebar.file = path.replace('//', '/')
},