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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt (-2 / +2 lines)
Lines 87-93 Link Here
87
                                                    [% results_loo.description %]
87
                                                    [% results_loo.description %]
88
                                                [% END %]
88
                                                [% END %]
89
                                            </td>
89
                                            </td>
90
                                            <td><span class="tdlabel">Checkouts: </span> [% results_loo.tot %]</td>
90
                                            <td><span class="tdlabel">Checkouts: </span> <span title="[% results_loo.tot %]">[% results_loo.tot %]</span></td>
91
                                            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<td>[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %][% UNLESS ( results_loo.norequests ) %]<a href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% results_loo.biblionumber %]">Place hold</a>[% END %][% END %]</td>[% END %]
91
                                            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<td>[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %][% UNLESS ( results_loo.norequests ) %]<a href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% results_loo.biblionumber %]">Place hold</a>[% END %][% END %]</td>[% END %]
92
                                            </tr>
92
                                            </tr>
93
                                    [% END %]
93
                                    [% END %]
Lines 173-179 Link Here
173
            "aoColumns": [
173
            "aoColumns": [
174
                { "sType": "anti-the" },
174
                { "sType": "anti-the" },
175
                null,
175
                null,
176
                null,
176
                { "sType": "title-numeric" },
177
                [% IF ( opacuserlogin ) %]null,[% END %]
177
                [% IF ( opacuserlogin ) %]null,[% END %]
178
            ]
178
            ]
179
        }));
179
        }));
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js (-1 / +26 lines)
Lines 55-60 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
55
    }
55
    }
56
} );
56
} );
57
57
58
/* Plugin to allow sorting numerically on data stored in a span's title attribute
59
 *
60
 * Ex: <td><span title="[% total %]">Total: [% total %]</span></td>
61
 *
62
 * In DataTables config:
63
 *     "aoColumns": [
64
 *        { "sType": "title-numeric" }
65
 *     ]
66
 * http://legacy.datatables.net/plug-ins/sorting#hidden_title
67
 */
68
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
69
    "title-numeric-pre": function ( a ) {
70
        console.log(a);
71
        var x = a.match(/title="*(-?[0-9\.]+)/)[1];
72
        return parseFloat( x );
73
    },
74
75
    "title-numeric-asc": function ( a, b ) {
76
        return ((a < b) ? -1 : ((a > b) ? 1 : 0));
77
    },
78
79
    "title-numeric-desc": function ( a, b ) {
80
        return ((a < b) ? 1 : ((a > b) ? -1 : 0));
81
    }
82
} );
83
58
(function() {
84
(function() {
59
85
60
    /* Plugin to allow text sorting to ignore articles
86
    /* Plugin to allow text sorting to ignore articles
61
- 

Return to bug 14940