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 105-122 function cancelEnrollment( id ) { Link Here
105
105
106
    var Tables = $("#clubs-table-enrolled,#clubs-table-unenrolled");
106
    var Tables = $("#clubs-table-enrolled,#clubs-table-unenrolled");
107
    Tables.each(function(){
107
    Tables.each(function(){
108
        $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
108
        $(this).kohaTable({
109
            "searching": false,
109
            searching: false,
110
            "paging": false,
110
            paging: false,
111
            "info": false,
111
            info: false,
112
            "responsive": {
112
            responsive: {
113
                "details": { "type": "column", "target": -1 }
113
                details: { type: "column", target: -1 },
114
            },
114
            },
115
            "columnDefs": [
115
            columnDefs: [
116
                { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] },
116
                { orderable: false, searchable: false, targets: ["NoSort"] },
117
                { "className": "dtr-control", "orderable": false, "targets": -1 },
117
                { className: "dtr-control", orderable: false, targets: -1 },
118
            ],
118
            ],
119
        }));
119
        });
120
    });
120
    });
121
121
122
    $(".cancel_enrollment").on("click", function(e){
122
    $(".cancel_enrollment").on("click", function(e){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt (-6 / +6 lines)
Lines 85-91 $( document ).ready(function() { Link Here
85
    var txtActivefilter = _("Filter paid transactions");
85
    var txtActivefilter = _("Filter paid transactions");
86
    var txtInactivefilter = _("Show all transactions");
86
    var txtInactivefilter = _("Show all transactions");
87
87
88
    var fines_table = $("#finestable").dataTable($.extend(true, {}, dataTablesDefaults, {
88
    var fines_table = $("#finestable").kohaTable({
89
         [% IF ENABLE_OPAC_PAYMENTS %]
89
         [% IF ENABLE_OPAC_PAYMENTS %]
90
         "order": [[ 1, "desc" ]],
90
         "order": [[ 1, "desc" ]],
91
         [% ELSE %]
91
         [% ELSE %]
Lines 98-119 $( document ).ready(function() { Link Here
98
         "columnDefs": [
98
         "columnDefs": [
99
            { "className": 'dtr-control', "orderable": false, "targets": -1 }
99
            { "className": 'dtr-control', "orderable": false, "targets": -1 }
100
         ],
100
         ],
101
         'fnDrawCallback': function() {
101
         'drawCallback': function() {
102
            show_hiddentfoot('#finestable');
102
            show_hiddentfoot('#finestable');
103
         }
103
         }
104
    } ));
104
    } );
105
105
106
    $('table[id^="finestable-"]').dataTable($.extend(true, {}, dataTablesDefaults, {
106
    $('table[id^="finestable-"]').kohaTable({
107
         "responsive": {
107
         "responsive": {
108
            "details": { "type": 'column',"target": -1 }
108
            "details": { "type": 'column',"target": -1 }
109
         },
109
         },
110
         "columnDefs": [
110
         "columnDefs": [
111
            { "className": 'dtr-control', "orderable": false, "targets": -1 }
111
            { "className": 'dtr-control', "orderable": false, "targets": -1 }
112
         ],
112
         ],
113
         'fnDrawCallback': function() {
113
         'drawCallback': function() {
114
            show_hiddentfoot('table[id^="finestable-"]');
114
            show_hiddentfoot('table[id^="finestable-"]');
115
         }
115
         }
116
    } ));
116
    });
117
117
118
    function show_hiddentfoot(selector) {
118
    function show_hiddentfoot(selector) {
119
        $('.finestable tfoot .sum').show();
119
        $('.finestable tfoot .sum').show();
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt (-2 / +1 lines)
Lines 100-107 Link Here
100
[% INCLUDE 'datatables.inc' %]
100
[% INCLUDE 'datatables.inc' %]
101
<script>
101
<script>
102
    $(document).ready(function(){
102
    $(document).ready(function(){
103
        $("#subscriptions").dataTable($.extend(true, {}, dataTablesDefaults, {
103
        $("#subscriptions").kohaTable();
104
        }));
105
        $(".unsubscribe").submit(function(){
104
        $(".unsubscribe").submit(function(){
106
            var patron = $(this).data('patron');
105
            var patron = $(this).data('patron');
107
            var title = $(this).data('title');
106
            var title = $(this).data('title');
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt (-10 / +8 lines)
Lines 117-133 Link Here
117
    [% INCLUDE 'datatables.inc' %]
117
    [% INCLUDE 'datatables.inc' %]
118
    <script type="text/JavaScript">
118
    <script type="text/JavaScript">
119
        $(document).ready(function(){
119
        $(document).ready(function(){
120
            $('.table').dataTable($.extend(true, {}, dataTablesDefaults, {
120
            $(".table").kohaTable({
121
                "searching": false,
121
                searching: false,
122
                "paging": false,
122
                paging: false,
123
                "info": false,
123
                info: false,
124
                "responsive": {
124
                responsive: {
125
                    "details": { "type": 'column',"target": -1 }
125
                    details: { type: "column", target: -1 },
126
                },
126
                },
127
                "columnDefs": [
127
                columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
128
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
128
            });
129
                ],
130
            }));
131
        });
129
        });
132
    </script>
130
    </script>
133
[% END %]
131
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-13 / +5 lines)
Lines 498-516 Link Here
498
                });
498
                });
499
499
500
                if( $("#itemst").length > 0 ){
500
                if( $("#itemst").length > 0 ){
501
                    var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
501
                    var itemst = $("#itemst").kohaTable({
502
                        "order": [[ 1, "asc" ]],
502
                        order: [[1, "asc"]],
503
                        "columnDefs": [
503
                        columnDefs: [{ targets: [0, -1], sortable: false, searchable: false }],
504
                          { "targets": [ 0,-1 ], "sortable": false, "searchable": false }
504
                        columns: [null, { type: "anti-the" }, null, null, null],
505
                        ],
505
                    });
506
                        "columns": [
507
                            null,
508
                            { "type": "anti-the" },
509
                            null,
510
                            null,
511
                            null
512
                        ],
513
                    }));
514
506
515
                    var buttons = new $.fn.dataTable.Buttons(itemst, {
507
                    var buttons = new $.fn.dataTable.Buttons(itemst, {
516
                         buttons: [
508
                         buttons: [
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt (-10 / +8 lines)
Lines 321-337 Link Here
321
        });
321
        });
322
322
323
        $(document).ready(function() {
323
        $(document).ready(function() {
324
            $('#pickups-table').dataTable($.extend(true, {}, dataTablesDefaults, {
324
            $("#pickups-table").kohaTable({
325
                "searching": false,
325
                searching: false,
326
                "paging": false,
326
                paging: false,
327
                "info": false,
327
                info: false,
328
                "responsive": {
328
                responsive: {
329
                    "details": { "type": 'column',"target": -1 }
329
                    details: { type: "column", target: -1 },
330
                },
330
                },
331
                "columnDefs": [
331
                columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
332
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
332
            });
333
                ],
334
            }));
335
            $("#pickup-branch option").each(function(){
333
            $("#pickup-branch option").each(function(){
336
                if ( $(this).val() != "" && !policies[$(this).val()].enabled ) {
334
                if ( $(this).val() != "" && !policies[$(this).val()].enabled ) {
337
                    $(this).prop("disabled", "disabled");
335
                    $(this).prop("disabled", "disabled");
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt (-3 / +3 lines)
Lines 203-211 Link Here
203
                $(this).addClass("currentsubtab");
203
                $(this).addClass("currentsubtab");
204
                showlayer( year );
204
                showlayer( year );
205
            });
205
            });
206
            $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, {
206
            $(".subscriptionstclass").kohaTable({
207
                "order": [[ 0, "desc" ]]
207
                order: [[0, "desc"]],
208
            }));
208
            });
209
        });
209
        });
210
210
211
        // Filters initialization
211
        // 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($.extend(true, {}, dataTablesDefaults, {
55
        $("table").kohaTable({
56
          'filter': false,
56
            filter: false,
57
          'columnDefs': [
57
            columnDefs: [{ targets: [-1, -2], sortable: false }],
58
              { '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 340-351 Link Here
340
[% BLOCK jsinclude %]
340
[% BLOCK jsinclude %]
341
    [% INCLUDE 'datatables.inc' %]
341
    [% INCLUDE 'datatables.inc' %]
342
    <script>
342
    <script>
343
        $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, {
343
        $("#illrequestlist").kohaTable({
344
            "columnDefs": [
344
            columnDefs: [{ targets: [-1], sortable: false, searchable: false }],
345
                { "targets": [ -1 ], "sortable": false, "searchable": false }
345
            order: [[3, "desc"]],
346
            ],
346
        });
347
            "order": [[ 3, "desc" ]],
348
        }));
349
        $("#backend-dropdown-options").removeClass("nojs");
347
        $("#backend-dropdown-options").removeClass("nojs");
350
        [% IF services_json.length > 0 %]
348
        [% IF services_json.length > 0 %]
351
            var services = [% services_json | $raw %];
349
            var services = [% services_json | $raw %];
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-10 / +8 lines)
Lines 315-330 Link Here
315
                }, 100);
315
                }, 100);
316
            });
316
            });
317
        }
317
        }
318
        $('.table').dataTable($.extend(true, {}, dataTablesDefaults, {
318
        $(".table").kohaTable({
319
            "searching": false,
319
            searching: false,
320
            "paging": false,
320
            paging: false,
321
            "info": false,
321
            info: false,
322
            "responsive": {
322
            responsive: {
323
                "details": { "type": 'column',"target": -1 }
323
                details: { type: "column", target: -1 },
324
            },
324
            },
325
            "columnDefs": [
325
            columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
326
                { "className": 'dtr-control', "orderable": false, "targets": -1 }
326
        });
327
            ],
328
        }));
329
    </script>
327
    </script>
330
[% END %]
328
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt (-9 / +9 lines)
Lines 135-150 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($.extend(true, {}, dataTablesDefaults, {
138
            $("#recalls-table").kohaTable({
139
                "responsive": {
139
                responsive: {
140
                    "details": { "type": 'column', "target": -1 }
140
                    details: { type: "column", target: -1 },
141
                },
141
                },
142
                "columnDefs": [
142
                columnDefs: [
143
                    { "targets": [ "nosort" ],"sortable": false,"searchable": false },
143
                    { targets: ["nosort"], sortable: false, searchable: false },
144
                    { "type": "anti-the", "targets" : [ "anti-the" ] },
144
                    { type: "anti-the", targets: ["anti-the"] },
145
                    { "className": "dtr-control", "orderable": false, "targets": -1 }
145
                    { className: "dtr-control", orderable: false, targets: -1 },
146
                ]
146
                ],
147
            }));
147
            });
148
        });
148
        });
149
    </script>
149
    </script>
150
[% END %]
150
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-2 / +2 lines)
Lines 564-570 Link Here
564
    [% END %]
564
    [% END %]
565
565
566
    $(function() {
566
    $(function() {
567
        $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
567
        $("#suggestt").kohaTable({
568
            "order": [[ 1, "asc" ]],
568
            "order": [[ 1, "asc" ]],
569
            "columnDefs": [
569
            "columnDefs": [
570
              [% IF ( loggedinusername ) %]{ "targets": [ 0 ], "sortable": false, "searchable": false }[% END %],
570
              [% IF ( loggedinusername ) %]{ "targets": [ 0 ], "sortable": false, "searchable": false }[% END %],
Lines 587-593 Link Here
587
                    target: -1
587
                    target: -1
588
                }
588
                }
589
            },
589
            },
590
        }));
590
        });
591
        [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
591
        [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
592
        $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
592
        $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
593
        $("#CheckAll").on("click",function(e){
593
        $("#CheckAll").on("click",function(e){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt (-12 / +12 lines)
Lines 259-279 Link Here
259
            }
259
            }
260
        });
260
        });
261
261
262
        $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, {
262
        $("#mytagst").kohaTable({
263
            "sorting": [[ 2, "asc" ]],
263
            sorting: [[2, "asc"]],
264
            "columnDefs": [
264
            columnDefs: [
265
                { "targets": [ 0 ], "sortable": false, "searchable": false },
265
                { targets: [0], sortable: false, searchable: false },
266
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
266
                { sType: "anti-the", aTargets: ["anti-the"] },
267
                { "className": 'dtr-control', "orderable": false, "targets": -1 },
267
                { className: "dtr-control", orderable: false, targets: -1 },
268
                { responsivePriority: 1, targets: 2 }
268
                { responsivePriority: 1, targets: 2 },
269
            ],
269
            ],
270
            "responsive": {
270
            responsive: {
271
                details: {
271
                details: {
272
                    type: 'column',
272
                    type: "column",
273
                    target: -1
273
                    target: -1,
274
                }
274
                },
275
            },
275
            },
276
        }));
276
        });
277
    });
277
    });
278
278
279
</script>
279
</script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt (-11 / +11 lines)
Lines 145-164 Link Here
145
    [% INCLUDE 'datatables.inc' %]
145
    [% INCLUDE 'datatables.inc' %]
146
    <script>
146
    <script>
147
        $(function() {
147
        $(function() {
148
            $("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
148
            $("#topissuest").kohaTable({
149
                "sorting": [[3, "desc"]],
149
                sorting: [[3, "desc"]],
150
                "columnDefs": [
150
                columnDefs: [
151
                    { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
151
                    { sortable: false, searchable: false, targets: ["NoSort"] },
152
                    { "type": "anti-the", "targets" : [ "anti-the" ] },
152
                    { type: "anti-the", targets: ["anti-the"] },
153
                    { "className": 'dtr-control', "orderable": false, "targets": -1 },
153
                    { className: "dtr-control", orderable: false, targets: -1 },
154
                ],
154
                ],
155
                "responsive": {
155
                responsive: {
156
                    details: {
156
                    details: {
157
                        type: 'column',
157
                        type: "column",
158
                        target: -1
158
                        target: -1,
159
                    }
159
                    },
160
                },
160
                },
161
            }));
161
            });
162
        });
162
        });
163
    </script>
163
    </script>
164
[% END %]
164
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-12 / +10 lines)
Lines 1205-1211 Link Here
1205
                $(this).on("init.dt", function() {
1205
                $(this).on("init.dt", function() {
1206
                        tableInit( $(this).attr("id") );
1206
                        tableInit( $(this).attr("id") );
1207
                    })
1207
                    })
1208
                    .dataTable($.extend(true, {}, dataTablesDefaults, {
1208
                    .kohaTable({
1209
                    "sorting" : [[ thIndex, 'asc' ]],
1209
                    "sorting" : [[ thIndex, 'asc' ]],
1210
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1210
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1211
                    "columnDefs": [
1211
                    "columnDefs": [
Lines 1242-1263 Link Here
1242
                            }
1242
                            }
1243
                        }
1243
                        }
1244
                    ]
1244
                    ]
1245
                }));
1245
                });
1246
            });
1246
            });
1247
1247
1248
            var dataTables = $("#recalls-table,#article-requests-table");
1248
            var dataTables = $("#recalls-table,#article-requests-table");
1249
            dataTables.each(function(){
1249
            dataTables.each(function(){
1250
                $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
1250
                $(this).kohaTable({
1251
                    "searching": false,
1251
                    searching: false,
1252
                    "paging": false,
1252
                    paging: false,
1253
                    "info": false,
1253
                    info: false,
1254
                    "responsive": {
1254
                    responsive: {
1255
                        "details": { "type": 'column',"target": -1 }
1255
                        details: { type: "column", target: -1 },
1256
                    },
1256
                    },
1257
                    "columnDefs": [
1257
                    columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
1258
                        { "className": 'dtr-control', "orderable": false, "targets": -1 }
1258
                });
1259
                    ],
1260
                }));
1261
            });
1259
            });
1262
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1260
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1263
                dTables.DataTable().responsive.recalc();
1261
                dTables.DataTable().responsive.recalc();
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-18 / +18 lines)
Lines 592-618 Link Here
592
            var dTables = $("#loanTable, #holdst, #finestable");
592
            var dTables = $("#loanTable, #holdst, #finestable");
593
            dTables.each(function(){
593
            dTables.each(function(){
594
                var thIndex = $(this).find("th.psort").index();
594
                var thIndex = $(this).find("th.psort").index();
595
                $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
595
                $(this).kohaTable({
596
                    "sorting" : [[ thIndex, 'asc' ]],
596
                    sorting: [[thIndex, "asc"]],
597
                    "dom": '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
597
                    dom: '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
598
                    "columnDefs": [
598
                    columnDefs: [
599
                        { "targets": [ "nosort" ],"sortable": false,"searchable": false },
599
                        { targets: ["nosort"], sortable: false, searchable: false },
600
                        { "targets": [ "noshow" ], "visible": false, "searchable": false },
600
                        { targets: ["noshow"], visible: false, searchable: false },
601
                        { "type": "anti-the", "targets" : [ "anti-the" ] },
601
                        { type: "anti-the", targets: ["anti-the"] },
602
                        { "visible": false, "targets" : [ "hidden" ] },
602
                        { visible: false, targets: ["hidden"] },
603
                        { "className": 'dtr-control', "orderable": false, "targets": -1 }
603
                        { className: "dtr-control", orderable: false, targets: -1 },
604
                    ],
604
                    ],
605
                    "language": {
605
                    language: {
606
                        "search": "_INPUT_",
606
                        search: "_INPUT_",
607
                        "searchPlaceholder": _("Search")
607
                        searchPlaceholder: _("Search"),
608
                    },
608
                    },
609
                    "responsive": {
609
                    responsive: {
610
                        details: {
610
                        details: {
611
                            type: 'column',
611
                            type: "column",
612
                            target: -1
612
                            target: -1,
613
                        }
613
                        },
614
                    }
614
                    },
615
                }));
615
                });
616
            });
616
            });
617
617
618
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
618
            $('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 186-194 $(document).ready(function() { Link Here
186
                });
186
                });
187
            }
187
            }
188
            // Initialise the table
188
            // Initialise the table
189
            $('#'+service.id ).dataTable(
189
            $('#'+service.id ).kohaTable(tableDef);
190
                $.extend(true, {}, dataTablesDefaults, tableDef)
191
            );
192
        });
190
        });
193
    }
191
    }
194
192
195
- 

Return to bug 38255