aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-07-20 23:40:00 +0200
committerGitHub <noreply@github.com>2018-07-20 23:40:00 +0200
commit53aaa62572015853b924fc1293761562733beb49 (patch)
tree3ddc3ae8e24f9747b677e0560a0689761adfa558 /apps/files/js
parent52ec71c4b05cce98af59332904c77d619d5bfed0 (diff)
parent89ee10a536c179bfaf603467891470ac03eaa342 (diff)
downloadnextcloud-server-53aaa62572015853b924fc1293761562733beb49.tar.gz
nextcloud-server-53aaa62572015853b924fc1293761562733beb49.zip
Merge pull request #9982 from nextcloud/global-flow-rebuild
Cleanup structure
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/detailsview.js7
-rw-r--r--apps/files/js/filelist.js4
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js
index 7e2a5f0e8a9..ac10b8380ef 100644
--- a/apps/files/js/detailsview.js
+++ b/apps/files/js/detailsview.js
@@ -117,6 +117,13 @@
* Renders this details view
*/
render: function() {
+ // remove old instances
+ if ($('#app-sidebar').length === 0) {
+ this.$el.insertAfter($('#app-content'));
+ } else {
+ $('#app-sidebar').replaceWith(this.$el)
+ }
+
var templateVars = {
closeLabel: t('files', 'Close')
};
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 18872568ab5..fd20ebe8321 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -99,11 +99,12 @@
/**
* Number of files per page
+ * Always show a minimum of 1
*
* @return {int} page size
*/
pageSize: function() {
- return Math.ceil(this.$container.height() / 50);
+ return Math.max(Math.ceil(this.$container.height() / 50), 1);
},
/**
@@ -274,7 +275,6 @@
if (_.isUndefined(options.detailsViewEnabled) || options.detailsViewEnabled) {
this._detailsView = new OCA.Files.DetailsView();
- this._detailsView.$el.insertBefore(this.$el);
this._detailsView.$el.addClass('disappear');
}