mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Allows sorting of attachments by 'upload date' (#3275)
This commit is contained in:
parent
efbef2dc90
commit
1184ca06ac
@ -284,6 +284,7 @@ function loadAttachmentTable(url, options) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'upload_date',
|
field: 'upload_date',
|
||||||
|
sortable: true,
|
||||||
title: '{% trans "Upload Date" %}',
|
title: '{% trans "Upload Date" %}',
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
var html = renderDate(value);
|
var html = renderDate(value);
|
||||||
|
@ -374,6 +374,11 @@ $.fn.inventreeTable = function(options) {
|
|||||||
options.pageList = [25, 50, 100, 250, 'all'];
|
options.pageList = [25, 50, 100, 250, 'all'];
|
||||||
options.totalField = 'count';
|
options.totalField = 'count';
|
||||||
options.dataField = 'results';
|
options.dataField = 'results';
|
||||||
|
|
||||||
|
if (options.sidePagination == null) {
|
||||||
|
options.sidePagination = 'server';
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
options.pagination = false;
|
options.pagination = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user