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

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js (-1 / +36 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
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (-36 lines)
Lines 90-130 function placeHold () { Link Here
90
        $(".hold").text(_("Place Hold"));
90
        $(".hold").text(_("Place Hold"));
91
        $("#downloadcartc").empty();
91
        $("#downloadcartc").empty();
92
92
93
        /* Define two custom functions (asc and desc) for string sorting */
94
        jQuery.fn.dataTableExt.oSort['callnumbers-asc']  = function(x,y) {
95
                var x_array = x.split("<div>");
96
                var y_array = y.split("<div>");
97
98
                /* Pop the first elements, they are empty strings */
99
                x_array.shift();
100
                y_array.shift();
101
102
                x_array.sort();
103
                y_array.sort();
104
105
                x = x_array.shift();
106
                y = y_array.shift();
107
108
                return ((x < y) ? -1 : ((x > y) ?  1 : 0));
109
        };
110
111
        jQuery.fn.dataTableExt.oSort['callnumbers-desc'] = function(x,y) {
112
                var x_array = x.split("<div>");
113
                var y_array = y.split("<div>");
114
115
                /* Pop the first elements, they are empty strings */
116
                x_array.shift();
117
                y_array.shift();
118
119
                x_array.sort();
120
                y_array.sort();
121
122
                x = x_array.pop();
123
                y = y_array.pop();
124
125
                return ((x < y) ?  1 : ((x > y) ? -1 : 0));
126
        };
127
128
        $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
93
        $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
129
            "sDom": 't',
94
            "sDom": 't',
130
            "aoColumnDefs": [
95
            "aoColumnDefs": [
131
- 

Return to bug 9456