diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-04-12 10:19:52 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-04-13 11:28:42 +0200 |
commit | 3f492dd82681ca92e9e86acfcf1c15dfcfcf34cf (patch) | |
tree | ff4a4cb9ebd0f0a5f5704e7212d94ed77aaf4bbc /apps/files/js | |
parent | 838e9e312673c2fb30796b07b6fa2542ee8f554e (diff) | |
download | nextcloud-server-3f492dd82681ca92e9e86acfcf1c15dfcfcf34cf.tar.gz nextcloud-server-3f492dd82681ca92e9e86acfcf1c15dfcfcf34cf.zip |
load file sorting mode from the db
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/app.js | 3 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/js/app.js b/apps/files/js/app.js index ff505d417f1..8662cd7c852 100644 --- a/apps/files/js/app.js +++ b/apps/files/js/app.js @@ -72,7 +72,8 @@ fileActions: fileActions, allowLegacyActions: true, scrollTo: urlParams.scrollto, - filesClient: OC.Files.getClient() + filesClient: OC.Files.getClient(), + sorting: $('#defaultFileSorting').val() } ); this.files.initialize(); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 71af4a21b9b..322dfcaa66e 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -239,7 +239,11 @@ this.fileSummary = this._createSummary(); - this.setSort('name', 'asc'); + if (options.sorting) { + this.setSort(options.sorting, 'asc'); + } else { + this.setSort('name', 'asc'); + } var breadcrumbOptions = { onClick: _.bind(this._onClickBreadCrumb, this), |