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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_to_pull.tt (-3 / +2 lines)
Lines 53-59 Link Here
53
                            <th class="recall-enumeration">Available enumeration</th>
53
                            <th class="recall-enumeration">Available enumeration</th>
54
                            <th class="recall-itemtypes">Available item types</th>
54
                            <th class="recall-itemtypes">Available item types</th>
55
                            <th class="recall-locations">Available locations</th>
55
                            <th class="recall-locations">Available locations</th>
56
                            <th class="recall-date title-string">Earliest recall date</th>
56
                            <th class="recall-date">Earliest recall date</th>
57
                            <th class="recall-action no-sort">&nbsp;</th>
57
                            <th class="recall-action no-sort">&nbsp;</th>
58
                        </tr>
58
                        </tr>
59
                    </thead>
59
                    </thead>
Lines 117-123 Link Here
117
                                    </ul>
117
                                    </ul>
118
                                </td>
118
                                </td>
119
                                <td class="recall-date">
119
                                <td class="recall-date">
120
                                    <span title="[% recall.first_recall.created_date | html %]">[% recall.first_recall.created_date | $KohaDates %] in [% recall.first_recall.library.branchname | html %]</span>
120
                                    <span data-order="[% recall.first_recall.created_date | html %]">[% recall.first_recall.created_date | $KohaDates %] in [% recall.first_recall.library.branchname | html %]</span>
121
                                </td>
121
                                </td>
122
                                <td class="recall-action">
122
                                <td class="recall-action">
123
                                    <form action="/cgi-bin/koha/recalls/recalls_to_pull.pl" method="post">
123
                                    <form action="/cgi-bin/koha/recalls/recalls_to_pull.pl" method="post">
Lines 152-158 Link Here
152
    <script>
152
    <script>
153
        $(document).ready(function () {
153
        $(document).ready(function () {
154
            $("#recalls-table").kohaTable({
154
            $("#recalls-table").kohaTable({
155
                columnDefs: [{ type: "title-string", targets: ["title-string"] }],
156
                pagingType: "full_numbers",
155
                pagingType: "full_numbers",
157
            });
156
            });
158
157
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt (-4 / +4 lines)
Lines 47-53 Link Here
47
                        <table id="recallswaiting-table">
47
                        <table id="recallswaiting-table">
48
                            <thead
48
                            <thead
49
                                ><tr>
49
                                ><tr>
50
                                    <th class="recall-waitingdate title-string">Available since</th>
50
                                    <th class="recall-waitingdate">Available since</th>
51
                                    <th class="recall-title anti-the">Title</th>
51
                                    <th class="recall-title anti-the">Title</th>
52
                                    <th class="recall-patron">Requested by</th>
52
                                    <th class="recall-patron">Requested by</th>
53
                                    <th class="recall-library">Pickup location</th>
53
                                    <th class="recall-library">Pickup location</th>
Lines 57-63 Link Here
57
                            <tbody>
57
                            <tbody>
58
                                [% FOREACH recall IN recalls %]
58
                                [% FOREACH recall IN recalls %]
59
                                    <tr>
59
                                    <tr>
60
                                        <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
60
                                        <td data-order="[% recall.waiting_date | html %]" class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
61
                                        <td class="recall-title">
61
                                        <td class="recall-title">
62
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]">
62
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]">
63
                                                [% recall.biblio.title | html %]
63
                                                [% recall.biblio.title | html %]
Lines 100-106 Link Here
100
                            <table id="recallsover-table">
100
                            <table id="recallsover-table">
101
                                <thead
101
                                <thead
102
                                    ><tr>
102
                                    ><tr>
103
                                        <th class="recall-waitingdate title-string">Available since</th>
103
                                        <th class="recall-waitingdate">Available since</th>
104
                                        <th class="recall-title anti-the">Title</th>
104
                                        <th class="recall-title anti-the">Title</th>
105
                                        <th class="recall-patron">Requested by</th>
105
                                        <th class="recall-patron">Requested by</th>
106
                                        <th class="recall-library">Pickup location</th>
106
                                        <th class="recall-library">Pickup location</th>
Lines 110-116 Link Here
110
                                <tbody>
110
                                <tbody>
111
                                    [% FOREACH recall IN over %]
111
                                    [% FOREACH recall IN over %]
112
                                        <tr>
112
                                        <tr>
113
                                            <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
113
                                            <td data-order="[% recall.waiting_date | html %]" class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
114
                                            <td class="recall-title">
114
                                            <td class="recall-title">
115
                                                [% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %]
115
                                                [% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %]
116
                                                [% IF recall.biblio.author %]by [% recall.biblio.author | html %][% END %]
116
                                                [% IF recall.biblio.author %]by [% recall.biblio.author | html %][% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-28 lines)
Lines 222-255 $.fn.dataTableExt.oSort["num-html-desc"] = function (a, b) { Link Here
222
    });
222
    });
223
})();
223
})();
224
224
225
/* Plugin to allow sorting on data stored in a span's title attribute
226
 *
227
 * Ex: <td><span title="[% ISO_date %]">[% formatted_date %]</span></td>
228
 *
229
 * In DataTables config:
230
 *     "data": [
231
 *        { "type": "title-string" },
232
 *      ]
233
 * http://datatables.net/plug-ins/sorting#hidden_title_string
234
 */
235
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
236
    "title-string-pre": function (a) {
237
        var m = a.match(/title="(.*?)"/);
238
        if (null !== m && m.length) {
239
            return m[1].toLowerCase();
240
        }
241
        return "";
242
    },
243
244
    "title-string-asc": function (a, b) {
245
        return a < b ? -1 : a > b ? 1 : 0;
246
    },
247
248
    "title-string-desc": function (a, b) {
249
        return a < b ? 1 : a > b ? -1 : 0;
250
    },
251
});
252
253
(function () {
225
(function () {
254
    /* Plugin to allow text sorting to ignore articles
226
    /* Plugin to allow text sorting to ignore articles
255
     *
227
     *
(-)a/koha-tmpl/intranet-tmpl/prog/js/recalls.js (-2 lines)
Lines 128-134 $(document).ready(function () { Link Here
128
    });
128
    });
129
129
130
    $("#recalls-table").kohaTable({
130
    $("#recalls-table").kohaTable({
131
        columnDefs: [{ type: "title-string", targets: ["title-string"] }],
132
        order: [[1, "asc"]],
131
        order: [[1, "asc"]],
133
        pagingType: "full_numbers",
132
        pagingType: "full_numbers",
134
    });
133
    });
135
- 

Return to bug 27934