From d88b93c919b6bf7db1853ec91a68996e07a75ba4 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Thu, 10 Oct 2019 11:26:15 +0200 Subject: Add LoadSidebar event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/js/filelist.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/files/js') 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('//', '/') }, -- cgit v1.2.3