summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-01-08 09:09:31 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-01-15 11:00:07 +0100
commitf7b267a61b355ed7276f664051373da357aa4713 (patch)
treeb6d8608a0c34cb80ad39eac42e7d483a6b0eeda0
parent0f238623f6fcbc6605580d79f9705eab9bfcdf5a (diff)
downloadnextcloud-server-f7b267a61b355ed7276f664051373da357aa4713.tar.gz
nextcloud-server-f7b267a61b355ed7276f664051373da357aa4713.zip
Properly set current file info when switching the details view
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--apps/files/js/filelist.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index fd7624e452a..108e10f4df6 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -650,6 +650,14 @@
var model = this.getModelForFile(tr)
var path = model.attributes.path + '/' + model.attributes.name
+ // make sure the file list has the correct context available
+ if (this._currentFileModel) {
+ this._currentFileModel.off();
+ }
+ this.$fileList.children().removeClass('highlighted');
+ tr.addClass('highlighted');
+ this._currentFileModel = model;
+
// open sidebar and set file
OCA.Files.Sidebar.open(path.replace('//', '/'))
},