aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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('//', '/'))
},