diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-07-15 17:35:35 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-08-07 01:22:43 +0200 |
commit | ad90ba27cdcdcd60e04ee0b781c6698124e900fa (patch) | |
tree | 05962caad5926625c3d096c4c2503484d6ebef42 /apps/files/js | |
parent | ff614a7dbde66a9cd795a674d0e0635b6f32e3a5 (diff) | |
download | nextcloud-server-ad90ba27cdcdcd60e04ee0b781c6698124e900fa.tar.gz nextcloud-server-ad90ba27cdcdcd60e04ee0b781c6698124e900fa.zip |
Styling fixes + hightlight in files sidebar
Sidebar scrolls with contents
Highlight currently show file
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/detailsview.js | 1 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js index d69d8c09c16..feced7e34dd 100644 --- a/apps/files/js/detailsview.js +++ b/apps/files/js/detailsview.js @@ -153,6 +153,7 @@ setFileInfo: function(fileInfo) { this._fileInfo = fileInfo; + // FIXME: this will render panels twice this.render(); // notify all panels diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 9f0d48ff011..5c7fcb6b998 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -286,12 +286,19 @@ */ _updateDetailsView: function(fileInfo) { var self = this; + var oldFileInfo = this._detailsView.getFileInfo(); + if (oldFileInfo) { + // TODO: use more efficient way, maybe track the highlight + this.$fileList.children().filterAttr('data-id', '' + oldFileInfo.id).removeClass('highlighted'); + } + if (!fileInfo) { this._detailsView.$el.addClass('disappear'); this._detailsView.setFileInfo(null); return; } + this.$fileList.children().filterAttr('data-id', '' + fileInfo.id).addClass('highlighted'); this._detailsView.setFileInfo(_.extend({ path: this.getCurrentDirectory() }, fileInfo)); |