From bc1cb8a6d09d97df93b7914e020759eb7df73df1 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 4 Oct 2016 19:08:08 +0200 Subject: let users share the curren folder Signed-off-by: Christoph Wurst --- apps/files/js/filelist.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 8d0e492643f..5bdb1a8999d 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -518,13 +518,16 @@ OC.Apps.showAppSidebar(this._detailsView.$el); } - var $tr = this.findFileEl(fileName); - var model = this.getModelForFile($tr); + if (_.isObject(fileName)) { + var model = new OCA.Files.FileInfoModel(fileName); + } else { + var $tr = this.findFileEl(fileName); + var model = this.getModelForFile($tr); + $tr.addClass('highlighted'); + } this._currentFileModel = model; - $tr.addClass('highlighted'); - this._detailsView.setFileInfo(model); this._detailsView.$el.scrollTop(0); }, -- cgit v1.2.3