summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-08-03 15:10:53 +0200
committerGitHub <noreply@github.com>2018-08-03 15:10:53 +0200
commitc62334502747672f276651c97f5c272ff91223b8 (patch)
tree5b711f113e3853d14d13dd38c2f134980f827829 /apps
parent755f13ee9f8543654a7e2a65b0d7f38378406c4a (diff)
parent1b4d502bfdd3234a698533d482c8c80e1305aa82 (diff)
downloadnextcloud-server-c62334502747672f276651c97f5c272ff91223b8.tar.gz
nextcloud-server-c62334502747672f276651c97f5c272ff91223b8.zip
Merge pull request #10509 from nextcloud/bugfix/10398/acceptance-files-changedir
Always replace the app sidebar view when switching from a different file list
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/detailsview.js7
-rw-r--r--apps/files/js/filelist.js4
2 files changed, 7 insertions, 4 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 f44a36435a1..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);
},
@@ -1623,7 +1623,7 @@
// discard finished uploads list, we'll get it through a regular reload
this._uploads = {};
- this.reload().then(function(success){
+ return this.reload().then(function(success){
if (!success) {
self.changeDirectory(currentDir, true);
}