diff -r a3765dd8cbb8 -r 26b86361e20b src/pyams_content/shared/common/zmi/search.py --- a/src/pyams_content/shared/common/zmi/search.py Wed Dec 19 11:02:20 2018 +0100 +++ b/src/pyams_content/shared/common/zmi/search.py Thu Dec 20 14:22:24 2018 +0100 @@ -9,6 +9,8 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # +from pyams_skin.interfaces.viewlet import IToolbarViewletManager +from pyams_skin.viewlet.toolbar import ToolbarAction __docformat__ = 'restructuredtext' @@ -332,6 +334,7 @@ search_form_factory = SharedToolAdvancedSearchForm sortOn = None + dt_sort_order = 'desc' def __init__(self, context, request): super(SharedToolAdvancedSearchResultsView, self).__init__(context, request) @@ -341,7 +344,7 @@ def data_attributes(self): attributes = super(SharedToolAdvancedSearchResultsView, 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