summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-08-03 11:47:53 +0200
committerJulius Härtl <jus@bitgrid.net>2018-08-03 11:47:53 +0200
commit16f6c071735577453ab8c4fb24451de28828195e (patch)
tree9eb614029eba23ac3e14fe6c4abed5fb5c10dda7
parentbcdbc4e19e9b92c2e5ae32454558ebfbfb806159 (diff)
downloadnextcloud-server-16f6c071735577453ab8c4fb24451de28828195e.tar.gz
nextcloud-server-16f6c071735577453ab8c4fb24451de28828195e.zip
Always call render to replace the app-sidebar if the detail view is updated
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--apps/files/js/detailsview.js7
-rw-r--r--apps/files/js/filelist.js2
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js
index ac10b8380ef..aed1736693a 100644
--- a/apps/files/js/detailsview.js
+++ b/apps/files/js/detailsview.js
@@ -118,10 +118,13 @@
*/
render: function() {
// remove old instances
- if ($('#app-sidebar').length === 0) {
+ var $appSidebar = $('#app-sidebar');
+ if ($appSidebar.length === 0) {
this.$el.insertAfter($('#app-content'));
} else {
- $('#app-sidebar').replaceWith(this.$el)
+ if ($appSidebar[0] !== this.el) {
+ $appSidebar.replaceWith(this.$el)
+ }
}
var templateVars = {
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 373aa389511..8e7c60551a1 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -564,7 +564,7 @@
}
this._currentFileModel = model;
-
+ this._detailsView.render();
this._detailsView.setFileInfo(model);
this._detailsView.$el.scrollTop(0);
},