mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Make number of file list entries depending on the width for grid view
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
8bf7ec26e0
commit
eb039608f9
1 changed files with 8 additions and 1 deletions
|
|
@ -99,7 +99,14 @@
|
|||
* @return {int} page size
|
||||
*/
|
||||
pageSize: function() {
|
||||
return Math.max(Math.ceil(this.$container.height() / 50), 1);
|
||||
var isGridView = this.$showGridView.is(':checked');
|
||||
var columns = 1;
|
||||
var rows = Math.ceil(this.$container.height() / 50);
|
||||
if (isGridView) {
|
||||
columns = Math.ceil(this.$container.width() / 160);
|
||||
rows = Math.ceil(this.$container.height() / 160);
|
||||
}
|
||||
return Math.max(columns*rows, columns);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue