View | Details | Raw Unified | Return to bug 9456
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js (-1 / +37 lines)
Lines 493-496 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
493
    "title-string-desc": function ( a, b ) {
493
    "title-string-desc": function ( a, b ) {
494
        return ((a < b) ? 1 : ((a > b) ? -1 : 0));
494
        return ((a < b) ? 1 : ((a > b) ? -1 : 0));
495
    }
495
    }
496
} );
496
} );
497
498
/* Define two custom functions (asc and desc) for basket callnumber sorting */
499
jQuery.fn.dataTableExt.oSort['callnumbers-asc']  = function(x,y) {
500
        var x_array = x.split("<div>");
501
        var y_array = y.split("<div>");
502
503
        /* Pop the first elements, they are empty strings */
504
        x_array.shift();
505
        y_array.shift();
506
507
        x_array.sort();
508
        y_array.sort();
509
510
        x = x_array.shift();
511
        y = y_array.shift();
512
513
        return ((x < y) ? -1 : ((x > y) ?  1 : 0));
514
};
515
516
jQuery.fn.dataTableExt.oSort['callnumbers-desc'] = function(x,y) {
517
        var x_array = x.split("<div>");
518
        var y_array = y.split("<div>");
519
520
        /* Pop the first elements, they are empty strings */
521
        x_array.shift();
522
        y_array.shift();
523
524
        x_array.sort();
525
        y_array.sort();
526
527
        x = x_array.pop();
528
        y = y_array.pop();
529
530
        return ((x < y) ?  1 : ((x > y) ? -1 : 0));
531
};
532
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (-36 lines)
Lines 89-129 function placeHold () { Link Here
89
        $(".hold").text(_("Place Hold"));
89
        $(".hold").text(_("Place Hold"));
90
        $("#downloadcartc").empty();
90
        $("#downloadcartc").empty();
91
91
92
        /* Define two custom functions (asc and desc) for string sorting */
93
        jQuery.fn.dataTableExt.oSort['callnumbers-asc']  = function(x,y) {
94
                var x_array = x.split("<div>");
95
                var y_array = y.split("<div>");
96
97
                /* Pop the first elements, they are empty strings */
98
                x_array.shift();
99
                y_array.shift();
100
101
                x_array.sort();
102
                y_array.sort();
103
104
                x = x_array.shift();
105
                y = y_array.shift();
106
107
                return ((x < y) ? -1 : ((x > y) ?  1 : 0));
108
        };
109
110
        jQuery.fn.dataTableExt.oSort['callnumbers-desc'] = function(x,y) {
111
                var x_array = x.split("<div>");
112
                var y_array = y.split("<div>");
113
114
                /* Pop the first elements, they are empty strings */
115
                x_array.shift();
116
                y_array.shift();
117
118
                x_array.sort();
119
                y_array.sort();
120
121
                x = x_array.pop();
122
                y = y_array.pop();
123
124
                return ((x < y) ?  1 : ((x > y) ? -1 : 0));
125
        };
126
127
        $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
92
        $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
128
            "sDom": 't',
93
            "sDom": 't',
129
            "aoColumnDefs": [
94
            "aoColumnDefs": [
130
- 

Return to bug 9456