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

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js (+30 lines)
Lines 548-559 jQuery.fn.dataTableExt.oSort['callnumbers-asc'] = function(x,y) { Link Here
548
        x_array.shift();
548
        x_array.shift();
549
        y_array.shift();
549
        y_array.shift();
550
550
551
        x_array = jQuery.map( x_array, function( a ) {
552
            return parse_callnumber( a );
553
        });
554
        y_array = jQuery.map( y_array, function( a ) {
555
            return parse_callnumber( a );
556
        });
557
551
        x_array.sort();
558
        x_array.sort();
552
        y_array.sort();
559
        y_array.sort();
553
560
554
        x = x_array.shift();
561
        x = x_array.shift();
555
        y = y_array.shift();
562
        y = y_array.shift();
556
563
564
        if ( !x ) { x = ""; }
565
        if ( !y ) { y = ""; } 
566
557
        return ((x < y) ? -1 : ((x > y) ?  1 : 0));
567
        return ((x < y) ? -1 : ((x > y) ?  1 : 0));
558
};
568
};
559
569
Lines 565-575 jQuery.fn.dataTableExt.oSort['callnumbers-desc'] = function(x,y) { Link Here
565
        x_array.shift();
575
        x_array.shift();
566
        y_array.shift();
576
        y_array.shift();
567
577
578
        x_array = jQuery.map( x_array, function( a ) {
579
            return parse_callnumber( a );
580
        });
581
        y_array = jQuery.map( y_array, function( a ) {
582
            return parse_callnumber( a );
583
        });
584
568
        x_array.sort();
585
        x_array.sort();
569
        y_array.sort();
586
        y_array.sort();
570
587
571
        x = x_array.pop();
588
        x = x_array.pop();
572
        y = y_array.pop();
589
        y = y_array.pop();
573
590
591
        if ( !x ) { x = ""; }
592
        if ( !y ) { y = ""; } 
593
574
        return ((x < y) ?  1 : ((x > y) ? -1 : 0));
594
        return ((x < y) ?  1 : ((x > y) ? -1 : 0));
575
};
595
};
596
597
function parse_callnumber ( html ) {
598
    var array = html.split('<span class="callnumber">');
599
    if ( array[1] ) {
600
        array = array[1].split('</span>');
601
        return array[0];
602
    } else {
603
        return "";
604
    }
605
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (-2 / +1 lines)
Lines 326-332 function placeHold () { Link Here
326
            <td>
326
            <td>
327
                [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
327
                [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
328
                    [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
328
                    [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
329
                        <div><span class="nowrap"><strong>[% ITEM_RESULT.itemcallnumber %]</strong> [% ITEM_RESULT.branchname %] <span class="shelvingloc inline">[% ITEM_RESULT.location_description %]</span></span></div>
329
                        <div><span class="nowrap"><strong><span class="callnumber">[% ITEM_RESULT.itemcallnumber %]</span></strong> [% ITEM_RESULT.branchname %] <span class="shelvingloc inline">[% ITEM_RESULT.location_description %]</span></span></div>
330
                    [% END %]
330
                    [% END %]
331
                [% ELSE %]
331
                [% ELSE %]
332
                    This record has no items.
332
                    This record has no items.
333
- 

Return to bug 9456