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 537-540 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
537
        }
537
        }
538
    });
538
    });
539
539
540
}());
540
}());
541
542
/* Define two custom functions (asc and desc) for basket callnumber sorting */
543
jQuery.fn.dataTableExt.oSort['callnumbers-asc']  = function(x,y) {
544
        var x_array = x.split("<div>");
545
        var y_array = y.split("<div>");
546
547
        /* Pop the first elements, they are empty strings */
548
        x_array.shift();
549
        y_array.shift();
550
551
        x_array.sort();
552
        y_array.sort();
553
554
        x = x_array.shift();
555
        y = y_array.shift();
556
557
        return ((x < y) ? -1 : ((x > y) ?  1 : 0));
558
};
559
560
jQuery.fn.dataTableExt.oSort['callnumbers-desc'] = function(x,y) {
561
        var x_array = x.split("<div>");
562
        var y_array = y.split("<div>");
563
564
        /* Pop the first elements, they are empty strings */
565
        x_array.shift();
566
        y_array.shift();
567
568
        x_array.sort();
569
        y_array.sort();
570
571
        x = x_array.pop();
572
        y = y_array.pop();
573
574
        return ((x < y) ?  1 : ((x > y) ? -1 : 0));
575
};
(-)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