Project

General

Profile

Bug #1683

Broken table sorting for CIDOC columns

Added by Alexander Watzinger 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
2022-04-04
Estimated time:
Found in version:

History

#1

Updated by Alexander Watzinger 6 months 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);
        });
    };
#2

Updated by Andreas Olschnögger 6 months ago

Bug is fixed and pushed on develop branch.

#3

Updated by Andreas Olschnögger 6 months ago

  • Status changed from Assigned to Closed
#4

Updated by Alexander Watzinger 6 months ago

  • Subject changed from Model table sorting for CIDOC classes/properties not working to Broken table sorting for CIDOC columns
#5

Updated by Alexander Watzinger 6 months ago

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

Also available in: Atom PDF