diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-03-24 09:41:40 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-06 14:49:31 +0200 |
commit | 3c3050c76f86c7a8cc2f217f9305cb1051e0eca0 (patch) | |
tree | d9656a549b1db4c7f3d37549713a6c96da616464 /apps/files/js | |
parent | 0b4da6117fff4d999cb492503a8b6fc04eb75f9d (diff) | |
download | nextcloud-server-3c3050c76f86c7a8cc2f217f9305cb1051e0eca0.tar.gz nextcloud-server-3c3050c76f86c7a8cc2f217f9305cb1051e0eca0.zip |
feat(files): implement sorting per view
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/app.js | 4 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/apps/files/js/app.js b/apps/files/js/app.js index 8ebd506c1a3..1252bd5796c 100644 --- a/apps/files/js/app.js +++ b/apps/files/js/app.js @@ -116,7 +116,9 @@ }, ], sorting: { - mode: $('#defaultFileSorting').val(), + mode: $('#defaultFileSorting').val() === 'basename' + ? 'name' + : $('#defaultFileSorting').val(), direction: $('#defaultFileSortingDirection').val() }, config: this._filesConfig, diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 2d93ced7100..e3052ea9fe8 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2181,8 +2181,10 @@ if (persist && OC.getCurrentUser().uid) { $.post(OC.generateUrl('/apps/files/api/v1/sorting'), { - mode: sort, - direction: direction + // Compatibility with new files-to-vue API + mode: sort === 'name' ? 'basename' : sort, + direction: direction, + view: 'files' }); } }, |