--- a/src/pyams_content/root/zmi/search.py Tue Aug 28 15:43:03 2018 +0200
+++ b/src/pyams_content/root/zmi/search.py Tue Aug 28 16:19:33 2018 +0200
@@ -91,12 +91,13 @@
title = _("Quick search results")
sortOn = None
+ dt_sort_order = 'desc'
@property
def data_attributes(self):
attributes = super(SiteRootQuickSearchResults, self).data_attributes
attributes['table'] = {
- 'data-ams-datatable-sorting': '[]',
+ 'data-ams-datatable-sorting': '{0},{1}'.format(len(self.columns) - 1, self.dt_sort_order),
'data-ams-datatable-display-length': IAdminProfile(self.request.principal).table_page_length
}
return attributes
--- a/src/pyams_content/shared/common/zmi/search.py Tue Aug 28 15:43:03 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/search.py Tue Aug 28 16:19:33 2018 +0200
@@ -92,12 +92,13 @@
title = _("Quick search results")
sortOn = None
+ dt_sort_order = 'desc'
@property
def data_attributes(self):
attributes = super(SharedToolQuickSearchResults, self).data_attributes
attributes['table'] = {
- 'data-ams-datatable-sorting': '[]',
+ 'data-ams-datatable-sorting': '{0},{1}'.format(len(self.columns) - 1, self.dt_sort_order),
'data-ams-datatable-display-length': IAdminProfile(self.request.principal).table_page_length
}
return attributes