Bug 24533: (follow-up) Fix incorrect orderData column indexes
The previous commit added orderData configurations to maintain grouping
when sorting, but the column indexes were off by one. Each orderData
should reference its own column index as the secondary sort criterion,
not the previous column's index.
Corrected mappings:
- Title (index 4): [1,3] -> [1,4]
- Record Type (index 5): [1,4] -> [1,5]
- Item Type (index 6): [1,5] -> [1,6]
- Collection (index 7): [1,6] -> [1,7]
- Location (index 8): [1,7] -> [1,8]
- Home Branch (index 9): [1,8] -> [1,9]
- Current Branch (index 12): [1,11] -> [1,12]
- Call Number (index 13): [1,12] -> [1,13]
- Copy Number (index 14): [1,13] -> [1,14]
- Charge (index 15): [1,14] -> [1,15]
- Fine (index 16): [1,15] -> [1,16]
- Price (index 17): [1,16] -> [1,17]
This ensures that when clicking a column header to sort, DataTables
will:
1. Sort by column 1 (group header) first to maintain grouping
2. Sort by the clicked column (using correct index) as secondary sort
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 053dbd5ad0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
bb6aba3b1e
commit
97d9952b4d
|
|
@ -245,19 +245,19 @@ function LoadIssuesTable() {
|
|||
return title;
|
||||
},
|
||||
type: "anti-the",
|
||||
orderData: [1, 3],
|
||||
orderData: [1, 4],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
return oObj.recordtype_description.escapeHtml();
|
||||
},
|
||||
orderData: [1, 4],
|
||||
orderData: [1, 5],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
return oObj.itemtype_description.escapeHtml();
|
||||
},
|
||||
orderData: [1, 5],
|
||||
orderData: [1, 6],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
|
|
@ -265,13 +265,13 @@ function LoadIssuesTable() {
|
|||
? oObj.collection.escapeHtml()
|
||||
: "";
|
||||
},
|
||||
orderData: [1, 6],
|
||||
orderData: [1, 7],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
return oObj.location ? oObj.location.escapeHtml() : "";
|
||||
},
|
||||
orderData: [1, 7],
|
||||
orderData: [1, 8],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
|
|
@ -279,7 +279,7 @@ function LoadIssuesTable() {
|
|||
? oObj.homebranch.escapeHtml()
|
||||
: "";
|
||||
},
|
||||
orderData: [1, 8],
|
||||
orderData: [1, 9],
|
||||
},
|
||||
{
|
||||
data: "issuedate",
|
||||
|
|
@ -299,7 +299,7 @@ function LoadIssuesTable() {
|
|||
? oObj.branchname.escapeHtml()
|
||||
: "";
|
||||
},
|
||||
orderData: [1, 11],
|
||||
orderData: [1, 12],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
|
|
@ -307,7 +307,7 @@ function LoadIssuesTable() {
|
|||
? oObj.itemcallnumber.escapeHtml()
|
||||
: "";
|
||||
},
|
||||
orderData: [1, 12],
|
||||
orderData: [1, 13],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
|
|
@ -315,7 +315,7 @@ function LoadIssuesTable() {
|
|||
? oObj.copynumber.escapeHtml()
|
||||
: "";
|
||||
},
|
||||
orderData: [1, 13],
|
||||
orderData: [1, 14],
|
||||
},
|
||||
{
|
||||
data: function (oObj) {
|
||||
|
|
@ -326,7 +326,7 @@ function LoadIssuesTable() {
|
|||
"<span>"
|
||||
);
|
||||
},
|
||||
orderData: [1, 14],
|
||||
orderData: [1, 15],
|
||||
className: "nowrap",
|
||||
},
|
||||
{
|
||||
|
|
@ -338,7 +338,7 @@ function LoadIssuesTable() {
|
|||
"<span>"
|
||||
);
|
||||
},
|
||||
orderData: [1, 15],
|
||||
orderData: [1, 16],
|
||||
className: "nowrap",
|
||||
},
|
||||
{
|
||||
|
|
@ -350,7 +350,7 @@ function LoadIssuesTable() {
|
|||
"<span>"
|
||||
);
|
||||
},
|
||||
orderData: [1, 16],
|
||||
orderData: [1, 17],
|
||||
className: "nowrap",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue