Actions
Bug #1683
closedBroken table sorting for CIDOC columns
Start date:
2022-04-04
Estimated time:
Found in version:
Actions
Added by Alexander Watzinger over 2 years ago. Updated over 2 years ago.
Former function in openatlas/static/js/functions.js was removed after some troubles with it:
// DataTables - sort for CIDOC model
$.fn.dataTable.ext.order['cidoc-model'] = function (settings, col) {
return this.api().column(col, {order: 'index'}).nodes().map(function (td, i) {
const d = td.firstChild.innerText
.replace('OA', '100')
.replace(/[\D]*/, '');
return parseInt(d, 10);
});
};
Bug is fixed and pushed on develop branch.
I tested it and made a few adaptions at places that were easy to miss (not your fault, they were buried deep inside the form/overlay table/input fields).
Thanks a lot, it had bothered me for a while and now looks much more pleasing and is sort-able again.
I also uploaded it to demo-dev: https://demo-dev.openatlas.eu/overview/model