diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-07-20 23:40:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 23:40:00 +0200 |
commit | 53aaa62572015853b924fc1293761562733beb49 (patch) | |
tree | 3ddc3ae8e24f9747b677e0560a0689761adfa558 /apps/files/js | |
parent | 52ec71c4b05cce98af59332904c77d619d5bfed0 (diff) | |
parent | 89ee10a536c179bfaf603467891470ac03eaa342 (diff) | |
download | nextcloud-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.js | 7 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 4 |
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'); } |