load file sorting mode from the db
This commit is contained in:
parent
838e9e3126
commit
3f492dd826
|
@ -213,6 +213,7 @@ class ViewController extends Controller {
|
||||||
$params['mailNotificationEnabled'] = $this->config->getAppValue('core', 'shareapi_allow_mail_notification', 'no');
|
$params['mailNotificationEnabled'] = $this->config->getAppValue('core', 'shareapi_allow_mail_notification', 'no');
|
||||||
$params['mailPublicNotificationEnabled'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no');
|
$params['mailPublicNotificationEnabled'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no');
|
||||||
$params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes');
|
$params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes');
|
||||||
|
$params['defaultFileSorting'] = $this->config->getAppValue('files', 'file_sorting', 'name');
|
||||||
$params['appNavigation'] = $nav;
|
$params['appNavigation'] = $nav;
|
||||||
$params['appContents'] = $contentItems;
|
$params['appContents'] = $contentItems;
|
||||||
$this->navigationManager->setActiveEntry('files_index');
|
$this->navigationManager->setActiveEntry('files_index');
|
||||||
|
|
|
@ -72,7 +72,8 @@
|
||||||
fileActions: fileActions,
|
fileActions: fileActions,
|
||||||
allowLegacyActions: true,
|
allowLegacyActions: true,
|
||||||
scrollTo: urlParams.scrollto,
|
scrollTo: urlParams.scrollto,
|
||||||
filesClient: OC.Files.getClient()
|
filesClient: OC.Files.getClient(),
|
||||||
|
sorting: $('#defaultFileSorting').val()
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.files.initialize();
|
this.files.initialize();
|
||||||
|
|
|
@ -239,7 +239,11 @@
|
||||||
|
|
||||||
this.fileSummary = this._createSummary();
|
this.fileSummary = this._createSummary();
|
||||||
|
|
||||||
|
if (options.sorting) {
|
||||||
|
this.setSort(options.sorting, 'asc');
|
||||||
|
} else {
|
||||||
this.setSort('name', 'asc');
|
this.setSort('name', 'asc');
|
||||||
|
}
|
||||||
|
|
||||||
var breadcrumbOptions = {
|
var breadcrumbOptions = {
|
||||||
onClick: _.bind(this._onClickBreadCrumb, this),
|
onClick: _.bind(this._onClickBreadCrumb, this),
|
||||||
|
|
|
@ -18,4 +18,5 @@
|
||||||
<input type="hidden" name="mailNotificationEnabled" id="mailNotificationEnabled" value="<?php p($_['mailNotificationEnabled']) ?>" />
|
<input type="hidden" name="mailNotificationEnabled" id="mailNotificationEnabled" value="<?php p($_['mailNotificationEnabled']) ?>" />
|
||||||
<input type="hidden" name="mailPublicNotificationEnabled" id="mailPublicNotificationEnabled" value="<?php p($_['mailPublicNotificationEnabled']) ?>" />
|
<input type="hidden" name="mailPublicNotificationEnabled" id="mailPublicNotificationEnabled" value="<?php p($_['mailPublicNotificationEnabled']) ?>" />
|
||||||
<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" />
|
<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" />
|
||||||
|
<input type="hidden" name="defaultFileSorting" id="defaultFileSorting" value="<?php p($_['defaultFileSorting']) ?>" />
|
||||||
<?php endif;
|
<?php endif;
|
||||||
|
|
Loading…
Reference in New Issue