mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Restore fixed order for grouped column (fixes #1534)
This commit is contained in:
parent
10c1ccd6e4
commit
1891bc6f32
@ -4,3 +4,4 @@
|
|||||||
- More information on this: Only 1 level is currently supported; creating > 1 level nestings was _never_ possible via the UI/frontend, but not checked/enforced by the backend before `v3.0.0` - so it was potentially possible via the API (or any third party app/tool which utilizes it) to create such a nesting which then made this upgrade to fail
|
- More information on this: Only 1 level is currently supported; creating > 1 level nestings was _never_ possible via the UI/frontend, but not checked/enforced by the backend before `v3.0.0` - so it was potentially possible via the API (or any third party app/tool which utilizes it) to create such a nesting which then made this upgrade to fail
|
||||||
- Fixed that the "Stock by-barcode" API routes were broken (thanks @larsverp)
|
- Fixed that the "Stock by-barcode" API routes were broken (thanks @larsverp)
|
||||||
- Fixed that it was not possible to select a chore/battery on the corresponding tracking pages by mouse/touch
|
- Fixed that it was not possible to select a chore/battery on the corresponding tracking pages by mouse/touch
|
||||||
|
- Fixed that grouping by columns in tables may caused duplicate groups
|
||||||
|
@ -801,6 +801,13 @@ $.extend(true, $.fn.dataTable.defaults, {
|
|||||||
if ("dataSrc" in rowGroup)
|
if ("dataSrc" in rowGroup)
|
||||||
{
|
{
|
||||||
api.rowGroup().dataSrc(rowGroup.dataSrc);
|
api.rowGroup().dataSrc(rowGroup.dataSrc);
|
||||||
|
|
||||||
|
// Apply fixed order for group column
|
||||||
|
var fixedOrder = {
|
||||||
|
pre: [rowGroup.dataSrc, 'asc']
|
||||||
|
};
|
||||||
|
|
||||||
|
api.order.fixed(fixedOrder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1096,6 +1103,9 @@ $(document).on("click", ".change-table-columns-rowgroup-toggle", function()
|
|||||||
};
|
};
|
||||||
|
|
||||||
dataTable.rowGroup().enable(false);
|
dataTable.rowGroup().enable(false);
|
||||||
|
|
||||||
|
// Remove fixed order
|
||||||
|
dataTable.order.fixed({});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1106,6 +1116,12 @@ $(document).on("click", ".change-table-columns-rowgroup-toggle", function()
|
|||||||
|
|
||||||
dataTable.rowGroup().enable(true);
|
dataTable.rowGroup().enable(true);
|
||||||
dataTable.rowGroup().dataSrc(columnIndex);
|
dataTable.rowGroup().dataSrc(columnIndex);
|
||||||
|
|
||||||
|
// Apply fixed order for group column
|
||||||
|
var fixedOrder = {
|
||||||
|
pre: [columnIndex, 'asc']
|
||||||
|
};
|
||||||
|
dataTable.order.fixed(fixedOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
var settingKey = 'datatables_rowGroup_' + dataTable.settings()[0].sTableId;
|
var settingKey = 'datatables_rowGroup_' + dataTable.settings()[0].sTableId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user