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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (-24 / +44 lines)
Lines 91-108 function placeHold () { Link Here
91
        $(".hold").text(_("Place Hold"));
91
        $(".hold").text(_("Place Hold"));
92
        $("#downloadcartc").empty();
92
        $("#downloadcartc").empty();
93
        yuiToolbar();
93
        yuiToolbar();
94
95
        /* Define two custom functions (asc and desc) for string sorting */
96
        jQuery.fn.dataTableExt.oSort['callnumbers-asc']  = function(x,y) {
97
                var x_array = x.split("<span>");
98
                var y_array = y.split("<span>");
99
100
                /* Pop the first elements, they are empty strings */
101
                x_array.shift();
102
                y_array.shift();
103
104
                x_array.sort();
105
                y_array.sort();
106
107
                x = x_array.shift();
108
                y = y_array.shift();
109
110
                return ((x < y) ? -1 : ((x > y) ?  1 : 0));
111
        };
112
113
        jQuery.fn.dataTableExt.oSort['callnumbers-desc'] = function(x,y) {
114
                var x_array = x.split("<span>");
115
                var y_array = y.split("<span>");
116
117
                /* Pop the first elements, they are empty strings */
118
                x_array.shift();
119
                y_array.shift();
120
121
                x_array.sort();
122
                y_array.sort();
123
124
                x = x_array.pop();
125
                y = y_array.pop();
126
127
                return ((x < y) ?  1 : ((x > y) ? -1 : 0));
128
        };
129
94
        $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
130
        $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
95
            "sDom": 't',
131
            "sDom": 't',
96
            "aoColumnDefs": [
132
            "aoColumnDefs": [
97
                { "aTargets": [ 0,3 ], "bSortable": false, "bSearchable": false },
133
                { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
134
                { "aTargets": [ 3 ], "sType": 'callnumbers' },
98
            ],
135
            ],
99
            "aaSorting": [[ 1, "asc" ]],
136
            "aaSorting": [[ 1, "asc" ]],
100
            "bPaginate": false
137
            "bPaginate": false
101
        }));
138
        }));
102
        $(".itemstable").dataTable($.extend(true, {}, dataTablesDefaults, {
103
            "sDom": 't',
104
            "bPaginate": false
105
        }));
106
139
107
	});
140
	});
108
141
Lines 383-408 function yuiToolbar() { Link Here
383
416
384
						</td>
417
						</td>
385
            <td>[% BIBLIO_RESULT.description %]</td>
418
            <td>[% BIBLIO_RESULT.description %]</td>
386
            <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
419
            <td>
387
                <table class="itemstable">
420
                [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
388
                <thead>
389
                    <th>Location</th>
390
                    <th>Call number</th>
391
                </thead>
392
                <tbody>
393
                    [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
421
                    [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
394
                        <tr>
422
                        <span>[% ITEM_RESULT.itemcallnumber %] [% ITEM_RESULT.branchname %] <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></span>
395
                            <td>[% ITEM_RESULT.branchname %] <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
396
                            <td>
397
                                [% IF ( ITEM_RESULT.itemcallnumber ) %]
398
                                    ([% ITEM_RESULT.itemcallnumber %])
399
                                [% END %]
400
                            </td>
401
                        </tr>
402
                    [% END %]
423
                    [% END %]
403
                </tbody>
424
                [% ELSE %]
404
                </table>
425
                    This record has no items.
405
                [% ELSE %]This record has no items.[% END %]
426
                [% END %]
406
            </td>
427
            </td>
407
            </tr>
428
            </tr>
408
        [% END %]
429
        [% END %]
409
- 

Return to bug 9456