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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt (-10 / +10 lines)
Lines 98-115 Link Here
98
98
99
        var Tables = $("#clubs-table-enrolled,#clubs-table-unenrolled");
99
        var Tables = $("#clubs-table-enrolled,#clubs-table-unenrolled");
100
        Tables.each(function(){
100
        Tables.each(function(){
101
            $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
101
            $(this).kohaTable({
102
                "searching": false,
102
                searching: false,
103
                "paging": false,
103
                paging: false,
104
                "info": false,
104
                info: false,
105
                "responsive": {
105
                responsive: {
106
                    "details": { "type": "column", "target": -1 }
106
                    details: { type: "column", target: -1 },
107
                },
107
                },
108
                "columnDefs": [
108
                columnDefs: [
109
                    { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] },
109
                    { orderable: false, searchable: false, targets: ["NoSort"] },
110
                    { "className": "dtr-control", "orderable": false, "targets": -1 },
110
                    { className: "dtr-control", orderable: false, targets: -1 },
111
                ],
111
                ],
112
            }));
112
            });
113
        });
113
        });
114
114
115
        $(".cancel_enrollment").on("click", function(e){
115
        $(".cancel_enrollment").on("click", function(e){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt (-6 / +6 lines)
Lines 89-95 Link Here
89
            var txtActivefilter = _("Filter paid transactions");
89
            var txtActivefilter = _("Filter paid transactions");
90
            var txtInactivefilter = _("Show all transactions");
90
            var txtInactivefilter = _("Show all transactions");
91
91
92
            var fines_table = $("#finestable").dataTable($.extend(true, {}, dataTablesDefaults, {
92
            var fines_table = $("#finestable").kohaTable({
93
                 [% IF ENABLE_OPAC_PAYMENTS %]
93
                 [% IF ENABLE_OPAC_PAYMENTS %]
94
                 "order": [[ 1, "desc" ]],
94
                 "order": [[ 1, "desc" ]],
95
                 [% ELSE %]
95
                 [% ELSE %]
Lines 102-123 Link Here
102
                 "columnDefs": [
102
                 "columnDefs": [
103
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
103
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
104
                 ],
104
                 ],
105
                 'fnDrawCallback': function() {
105
                 'drawCallback': function() {
106
                    show_hiddentfoot('#finestable');
106
                    show_hiddentfoot('#finestable');
107
                 }
107
                 }
108
            } ));
108
            } );
109
109
110
            $('table[id^="finestable-"]').dataTable($.extend(true, {}, dataTablesDefaults, {
110
            $('table[id^="finestable-"]').kohaTable({
111
                 "responsive": {
111
                 "responsive": {
112
                    "details": { "type": 'column',"target": -1 }
112
                    "details": { "type": 'column',"target": -1 }
113
                 },
113
                 },
114
                 "columnDefs": [
114
                 "columnDefs": [
115
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
115
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
116
                 ],
116
                 ],
117
                 'fnDrawCallback': function() {
117
                 'drawCallback': function() {
118
                    show_hiddentfoot('table[id^="finestable-"]');
118
                    show_hiddentfoot('table[id^="finestable-"]');
119
                 }
119
                 }
120
            } ));
120
            });
121
121
122
            function show_hiddentfoot(selector) {
122
            function show_hiddentfoot(selector) {
123
                $('.finestable tfoot .sum').show();
123
                $('.finestable tfoot .sum').show();
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt (-1 / +1 lines)
Lines 101-107 Link Here
101
    [% INCLUDE 'datatables.inc' %]
101
    [% INCLUDE 'datatables.inc' %]
102
    <script>
102
    <script>
103
        $(document).ready(function () {
103
        $(document).ready(function () {
104
            $("#subscriptions").dataTable($.extend(true, {}, dataTablesDefaults, {}));
104
            $("#subscriptions").kohaTable();
105
            $(".unsubscribe").submit(function () {
105
            $(".unsubscribe").submit(function () {
106
                var patron = $(this).data("patron");
106
                var patron = $(this).data("patron");
107
                var title = $(this).data("title");
107
                var title = $(this).data("title");
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt (-11 / +9 lines)
Lines 121-137 Link Here
121
    [% INCLUDE 'datatables.inc' %]
121
    [% INCLUDE 'datatables.inc' %]
122
    <script type="text/JavaScript">
122
    <script type="text/JavaScript">
123
        $(document).ready(function () {
123
        $(document).ready(function () {
124
            $(".table").dataTable(
124
            $(".table").kohaTable({
125
                $.extend(true, {}, dataTablesDefaults, {
125
                searching: false,
126
                    searching: false,
126
                paging: false,
127
                    paging: false,
127
                info: false,
128
                    info: false,
128
                responsive: {
129
                    responsive: {
129
                    details: { type: "column", target: -1 },
130
                        details: { type: "column", target: -1 },
130
                },
131
                    },
131
                columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
132
                    columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
132
            });
133
                })
134
            );
135
        });
133
        });
136
    </script>
134
    </script>
137
[% END %]
135
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-13 / +5 lines)
Lines 544-562 Link Here
544
            });
544
            });
545
545
546
            if( $("#itemst").length > 0 ){
546
            if( $("#itemst").length > 0 ){
547
                var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
547
                var itemst = $("#itemst").kohaTable({
548
                    "order": [[ 1, "asc" ]],
548
                    order: [[1, "asc"]],
549
                    "columnDefs": [
549
                    columnDefs: [{ targets: [0, -1], sortable: false, searchable: false }],
550
                      { "targets": [ 0,-1 ], "sortable": false, "searchable": false }
550
                    columns: [null, { type: "anti-the" }, null, null, null],
551
                    ],
551
                });
552
                    "columns": [
553
                        null,
554
                        { "type": "anti-the" },
555
                        null,
556
                        null,
557
                        null
558
                    ],
559
                }));
560
552
561
                var buttons = new $.fn.dataTable.Buttons(itemst, {
553
                var buttons = new $.fn.dataTable.Buttons(itemst, {
562
                     buttons: [
554
                     buttons: [
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt (-10 / +8 lines)
Lines 325-341 Link Here
325
        });
325
        });
326
326
327
        $(document).ready(function() {
327
        $(document).ready(function() {
328
            $('#pickups-table').dataTable($.extend(true, {}, dataTablesDefaults, {
328
            $("#pickups-table").kohaTable({
329
                "searching": false,
329
                searching: false,
330
                "paging": false,
330
                paging: false,
331
                "info": false,
331
                info: false,
332
                "responsive": {
332
                responsive: {
333
                    "details": { "type": 'column',"target": -1 }
333
                    details: { type: "column", target: -1 },
334
                },
334
                },
335
                "columnDefs": [
335
                columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
336
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
336
            });
337
                ],
338
            }));
339
            $("#pickup-branch option").each(function(){
337
            $("#pickup-branch option").each(function(){
340
                if ( $(this).val() != "" && !policies[$(this).val()].enabled ) {
338
                if ( $(this).val() != "" && !policies[$(this).val()].enabled ) {
341
                    $(this).prop("disabled", "disabled");
339
                    $(this).prop("disabled", "disabled");
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt (-3 / +3 lines)
Lines 207-215 Link Here
207
                $(this).addClass("currentsubtab");
207
                $(this).addClass("currentsubtab");
208
                showlayer( year );
208
                showlayer( year );
209
            });
209
            });
210
            $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, {
210
            $(".subscriptionstclass").kohaTable({
211
                "order": [[ 0, "desc" ]]
211
                order: [[0, "desc"]],
212
            }));
212
            });
213
        });
213
        });
214
214
215
        // Filters initialization
215
        // Filters initialization
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt (-6 / +4 lines)
Lines 52-63 Link Here
52
    [% INCLUDE 'datatables.inc' %]
52
    [% INCLUDE 'datatables.inc' %]
53
    <script>
53
    <script>
54
        $(document).ready(function () {
54
        $(document).ready(function () {
55
            $("table").dataTable(
55
            $("table").kohaTable({
56
                $.extend(true, {}, dataTablesDefaults, {
56
                filter: false,
57
                    filter: false,
57
                columnDefs: [{ targets: [-1, -2], sortable: false }],
58
                    columnDefs: [{ targets: [-1, -2], sortable: false }],
58
            });
59
                })
60
            );
61
59
62
            $(".role").click(function () {
60
            $(".role").click(function () {
63
                var docs_node = $(this).parent().find("div.docs");
61
                var docs_node = $(this).parent().find("div.docs");
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt (-6 / +4 lines)
Lines 334-345 Link Here
334
[% BLOCK jsinclude %]
334
[% BLOCK jsinclude %]
335
    [% INCLUDE 'datatables.inc' %]
335
    [% INCLUDE 'datatables.inc' %]
336
    <script>
336
    <script>
337
        $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
337
        $("#illrequestlist").kohaTable({
338
            "columnDefs": [
338
            columnDefs: [{ targets: [-1], sortable: false, searchable: false }],
339
                { "targets": [ -1 ], "sortable": false, "searchable": false }
339
            order: [[3, "desc"]],
340
            ],
340
        });
341
            "order": [[ 3, "desc" ]],
342
        }));
343
        $("#backend-dropdown-options").removeClass("nojs");
341
        $("#backend-dropdown-options").removeClass("nojs");
344
        [% IF services_json.length > 0 %]
342
        [% IF services_json.length > 0 %]
345
            var services = [% services_json | $raw %];
343
            var services = [% services_json | $raw %];
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-10 / +8 lines)
Lines 407-422 Link Here
407
                }, 100);
407
                }, 100);
408
            });
408
            });
409
        }
409
        }
410
        $('.table').dataTable($.extend(true, {}, dataTablesDefaults, {
410
        $(".table").kohaTable({
411
            "searching": false,
411
            searching: false,
412
            "paging": false,
412
            paging: false,
413
            "info": false,
413
            info: false,
414
            "responsive": {
414
            responsive: {
415
                "details": { "type": 'column',"target": -1 }
415
                details: { type: "column", target: -1 },
416
            },
416
            },
417
            "columnDefs": [
417
            columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
418
                { "className": 'dtr-control', "orderable": false, "targets": -1 }
418
        });
419
            ],
420
        }));
421
    </script>
419
    </script>
422
[% END %]
420
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt (-12 / +10 lines)
Lines 135-152 Link Here
135
            $(".cancel_recall").click(function () {
135
            $(".cancel_recall").click(function () {
136
                return confirmDelete(_("Are you sure you want to remove this recall?"));
136
                return confirmDelete(_("Are you sure you want to remove this recall?"));
137
            });
137
            });
138
            $("#recalls-table").dataTable(
138
            $("#recalls-table").kohaTable({
139
                $.extend(true, {}, dataTablesDefaults, {
139
                responsive: {
140
                    responsive: {
140
                    details: { type: "column", target: -1 },
141
                        details: { type: "column", target: -1 },
141
                },
142
                    },
142
                columnDefs: [
143
                    columnDefs: [
143
                    { targets: ["nosort"], sortable: false, searchable: false },
144
                        { targets: ["nosort"], sortable: false, searchable: false },
144
                    { type: "anti-the", targets: ["anti-the"] },
145
                        { type: "anti-the", targets: ["anti-the"] },
145
                    { className: "dtr-control", orderable: false, targets: -1 },
146
                        { className: "dtr-control", orderable: false, targets: -1 },
146
                ],
147
                    ],
147
            });
148
                })
149
            );
150
        });
148
        });
151
    </script>
149
    </script>
152
[% END %]
150
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-2 / +2 lines)
Lines 595-601 Link Here
595
        [% END %]
595
        [% END %]
596
596
597
        $(function() {
597
        $(function() {
598
            $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
598
            $("#suggestt").kohaTable({
599
                "order": [[ 1, "asc" ]],
599
                "order": [[ 1, "asc" ]],
600
                "columnDefs": [
600
                "columnDefs": [
601
                  [% IF ( loggedinusername ) %]{ "targets": [ 0 ], "sortable": false, "searchable": false }[% END %],
601
                  [% IF ( loggedinusername ) %]{ "targets": [ 0 ], "sortable": false, "searchable": false }[% END %],
Lines 618-624 Link Here
618
                        target: -1
618
                        target: -1
619
                    }
619
                    }
620
                },
620
                },
621
            }));
621
            });
622
            [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
622
            [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
623
            $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
623
            $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
624
            $("#CheckAll").on("click",function(e){
624
            $("#CheckAll").on("click",function(e){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt (-16 / +14 lines)
Lines 295-317 Link Here
295
                }
295
                }
296
            });
296
            });
297
297
298
            $("#mytagst").dataTable(
298
            $("#mytagst").kohaTable({
299
                $.extend(true, {}, dataTablesDefaults, {
299
                sorting: [[2, "asc"]],
300
                    sorting: [[2, "asc"]],
300
                columnDefs: [
301
                    columnDefs: [
301
                    { targets: [0], sortable: false, searchable: false },
302
                        { targets: [0], sortable: false, searchable: false },
302
                    { sType: "anti-the", aTargets: ["anti-the"] },
303
                        { sType: "anti-the", aTargets: ["anti-the"] },
303
                    { className: "dtr-control", orderable: false, targets: -1 },
304
                        { className: "dtr-control", orderable: false, targets: -1 },
304
                    { responsivePriority: 1, targets: 2 },
305
                        { responsivePriority: 1, targets: 2 },
305
                ],
306
                    ],
306
                responsive: {
307
                    responsive: {
307
                    details: {
308
                        details: {
308
                        type: "column",
309
                            type: "column",
309
                        target: -1,
310
                            target: -1,
311
                        },
312
                    },
310
                    },
313
                })
311
                },
314
            );
312
            });
315
        });
313
        });
316
    </script>
314
    </script>
317
[% END %]
315
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt (-15 / +13 lines)
Lines 147-168 Link Here
147
    [% INCLUDE 'datatables.inc' %]
147
    [% INCLUDE 'datatables.inc' %]
148
    <script>
148
    <script>
149
        $(function () {
149
        $(function () {
150
            $("#topissuest").dataTable(
150
            $("#topissuest").kohaTable({
151
                $.extend(true, {}, dataTablesDefaults, {
151
                sorting: [[3, "desc"]],
152
                    sorting: [[3, "desc"]],
152
                columnDefs: [
153
                    columnDefs: [
153
                    { sortable: false, searchable: false, targets: ["NoSort"] },
154
                        { sortable: false, searchable: false, targets: ["NoSort"] },
154
                    { type: "anti-the", targets: ["anti-the"] },
155
                        { type: "anti-the", targets: ["anti-the"] },
155
                    { className: "dtr-control", orderable: false, targets: -1 },
156
                        { className: "dtr-control", orderable: false, targets: -1 },
156
                ],
157
                    ],
157
                responsive: {
158
                    responsive: {
158
                    details: {
159
                        details: {
159
                        type: "column",
160
                            type: "column",
160
                        target: -1,
161
                            target: -1,
162
                        },
163
                    },
161
                    },
164
                })
162
                },
165
            );
163
            });
166
        });
164
        });
167
    </script>
165
    </script>
168
[% END %]
166
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-12 / +10 lines)
Lines 1204-1210 Link Here
1204
                $(this).on("init.dt", function() {
1204
                $(this).on("init.dt", function() {
1205
                        tableInit( $(this).attr("id") );
1205
                        tableInit( $(this).attr("id") );
1206
                    })
1206
                    })
1207
                    .dataTable($.extend(true, {}, dataTablesDefaults, {
1207
                    .kohaTable({
1208
                    "sorting" : [[ thIndex, 'asc' ]],
1208
                    "sorting" : [[ thIndex, 'asc' ]],
1209
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1209
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1210
                    "columnDefs": [
1210
                    "columnDefs": [
Lines 1241-1262 Link Here
1241
                            }
1241
                            }
1242
                        }
1242
                        }
1243
                    ]
1243
                    ]
1244
                }));
1244
                });
1245
            });
1245
            });
1246
1246
1247
            var dataTables = $("#recalls-table,#article-requests-table");
1247
            var dataTables = $("#recalls-table,#article-requests-table");
1248
            dataTables.each(function(){
1248
            dataTables.each(function(){
1249
                $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
1249
                $(this).kohaTable({
1250
                    "searching": false,
1250
                    searching: false,
1251
                    "paging": false,
1251
                    paging: false,
1252
                    "info": false,
1252
                    info: false,
1253
                    "responsive": {
1253
                    responsive: {
1254
                        "details": { "type": 'column',"target": -1 }
1254
                        details: { type: "column", target: -1 },
1255
                    },
1255
                    },
1256
                    "columnDefs": [
1256
                    columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
1257
                        { "className": 'dtr-control', "orderable": false, "targets": -1 }
1257
                });
1258
                    ],
1259
                }));
1260
            });
1258
            });
1261
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1259
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1262
                dTables.DataTable().responsive.recalc();
1260
                dTables.DataTable().responsive.recalc();
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-18 / +18 lines)
Lines 457-483 Link Here
457
                var dTables = $("#loanTable, #holdst, #finestable");
457
                var dTables = $("#loanTable, #holdst, #finestable");
458
                dTables.each(function(){
458
                dTables.each(function(){
459
                    var thIndex = $(this).find("th.psort").index();
459
                    var thIndex = $(this).find("th.psort").index();
460
                    $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
460
                    $(this).kohaTable({
461
                        "sorting" : [[ thIndex, 'asc' ]],
461
                        sorting: [[thIndex, "asc"]],
462
                        "dom": '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
462
                        dom: '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
463
                        "columnDefs": [
463
                        columnDefs: [
464
                            { "targets": [ "nosort" ],"sortable": false,"searchable": false },
464
                            { targets: ["nosort"], sortable: false, searchable: false },
465
                            { "targets": [ "noshow" ], "visible": false, "searchable": false },
465
                            { targets: ["noshow"], visible: false, searchable: false },
466
                            { "type": "anti-the", "targets" : [ "anti-the" ] },
466
                            { type: "anti-the", targets: ["anti-the"] },
467
                            { "visible": false, "targets" : [ "hidden" ] },
467
                            { visible: false, targets: ["hidden"] },
468
                            { "className": 'dtr-control', "orderable": false, "targets": -1 }
468
                            { className: "dtr-control", orderable: false, targets: -1 },
469
                        ],
469
                        ],
470
                        "language": {
470
                        language: {
471
                            "search": "_INPUT_",
471
                            search: "_INPUT_",
472
                            "searchPlaceholder": _("Search")
472
                            searchPlaceholder: _("Search"),
473
                        },
473
                        },
474
                        "responsive": {
474
                        responsive: {
475
                            details: {
475
                            details: {
476
                                type: 'column',
476
                                type: "column",
477
                                target: -1
477
                                target: -1,
478
                            }
478
                            },
479
                        }
479
                        },
480
                    }));
480
                    });
481
                });
481
                });
482
482
483
                $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
483
                $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js (-4 / +1 lines)
Lines 199-207 $(document).ready(function () { Link Here
199
                });
199
                });
200
            };
200
            };
201
            // Initialise the table
201
            // Initialise the table
202
            $("#" + service.id).dataTable(
202
            $("#" + service.id).kohaTable(tableDef);
203
                $.extend(true, {}, dataTablesDefaults, tableDef)
204
            );
205
        });
203
        });
206
    };
204
    };
207
});
205
});
208
- 

Return to bug 38255