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 148-164 Link Here
148
    [% INCLUDE 'datatables.inc' %]
148
    [% INCLUDE 'datatables.inc' %]
149
    <script type="text/JavaScript">
149
    <script type="text/JavaScript">
150
        $(document).ready(function(){
150
        $(document).ready(function(){
151
            $('.table').dataTable($.extend(true, {}, dataTablesDefaults, {
151
            $(".table").kohaTable({
152
                "searching": false,
152
                searching: false,
153
                "paging": false,
153
                paging: false,
154
                "info": false,
154
                info: false,
155
                "responsive": {
155
                responsive: {
156
                    "details": { "type": 'column',"target": -1 }
156
                    details: { type: "column", target: -1 },
157
                },
157
                },
158
                "columnDefs": [
158
                columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
159
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
159
            });
160
                ],
161
            }));
162
        });
160
        });
163
    </script>
161
    </script>
164
[% END %]
162
[% 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 568-574 Link Here
568
    [% END %]
568
    [% END %]
569
569
570
    $(function() {
570
    $(function() {
571
        $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
571
        $("#suggestt").kohaTable({
572
            "order": [[ 1, "asc" ]],
572
            "order": [[ 1, "asc" ]],
573
            "columnDefs": [
573
            "columnDefs": [
574
              [% IF ( loggedinusername ) %]{ "targets": [ 0 ], "sortable": false, "searchable": false }[% END %],
574
              [% IF ( loggedinusername ) %]{ "targets": [ 0 ], "sortable": false, "searchable": false }[% END %],
Lines 591-597 Link Here
591
                    target: -1
591
                    target: -1
592
                }
592
                }
593
            },
593
            },
594
        }));
594
        });
595
        [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
595
        [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
596
        $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
596
        $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
597
        $("#CheckAll").on("click",function(e){
597
        $("#CheckAll").on("click",function(e){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt (-12 / +12 lines)
Lines 263-283 Link Here
263
            }
263
            }
264
        });
264
        });
265
265
266
        $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, {
266
        $("#mytagst").kohaTable({
267
            "sorting": [[ 2, "asc" ]],
267
            sorting: [[2, "asc"]],
268
            "columnDefs": [
268
            columnDefs: [
269
                { "targets": [ 0 ], "sortable": false, "searchable": false },
269
                { targets: [0], sortable: false, searchable: false },
270
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
270
                { sType: "anti-the", aTargets: ["anti-the"] },
271
                { "className": 'dtr-control', "orderable": false, "targets": -1 },
271
                { className: "dtr-control", orderable: false, targets: -1 },
272
                { responsivePriority: 1, targets: 2 }
272
                { responsivePriority: 1, targets: 2 },
273
            ],
273
            ],
274
            "responsive": {
274
            responsive: {
275
                details: {
275
                details: {
276
                    type: 'column',
276
                    type: "column",
277
                    target: -1
277
                    target: -1,
278
                }
278
                },
279
            },
279
            },
280
        }));
280
        });
281
    });
281
    });
282
282
283
</script>
283
</script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt (-11 / +11 lines)
Lines 148-167 Link Here
148
    [% INCLUDE 'datatables.inc' %]
148
    [% INCLUDE 'datatables.inc' %]
149
    <script>
149
    <script>
150
        $(function() {
150
        $(function() {
151
            $("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
151
            $("#topissuest").kohaTable({
152
                "sorting": [[3, "desc"]],
152
                sorting: [[3, "desc"]],
153
                "columnDefs": [
153
                columnDefs: [
154
                    { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
154
                    { sortable: false, searchable: false, targets: ["NoSort"] },
155
                    { "type": "anti-the", "targets" : [ "anti-the" ] },
155
                    { type: "anti-the", targets: ["anti-the"] },
156
                    { "className": 'dtr-control', "orderable": false, "targets": -1 },
156
                    { className: "dtr-control", orderable: false, targets: -1 },
157
                ],
157
                ],
158
                "responsive": {
158
                responsive: {
159
                    details: {
159
                    details: {
160
                        type: 'column',
160
                        type: "column",
161
                        target: -1
161
                        target: -1,
162
                    }
162
                    },
163
                },
163
                },
164
            }));
164
            });
165
        });
165
        });
166
    </script>
166
    </script>
167
[% END %]
167
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-12 / +10 lines)
Lines 1224-1230 Link Here
1224
                $(this).on("init.dt", function() {
1224
                $(this).on("init.dt", function() {
1225
                        tableInit( $(this).attr("id") );
1225
                        tableInit( $(this).attr("id") );
1226
                    })
1226
                    })
1227
                    .dataTable($.extend(true, {}, dataTablesDefaults, {
1227
                    .kohaTable({
1228
                    "sorting" : [[ thIndex, 'asc' ]],
1228
                    "sorting" : [[ thIndex, 'asc' ]],
1229
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1229
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1230
                    "columnDefs": [
1230
                    "columnDefs": [
Lines 1261-1282 Link Here
1261
                            }
1261
                            }
1262
                        }
1262
                        }
1263
                    ]
1263
                    ]
1264
                }));
1264
                });
1265
            });
1265
            });
1266
1266
1267
            var dataTables = $("#recalls-table,#article-requests-table");
1267
            var dataTables = $("#recalls-table,#article-requests-table");
1268
            dataTables.each(function(){
1268
            dataTables.each(function(){
1269
                $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
1269
                $(this).kohaTable({
1270
                    "searching": false,
1270
                    searching: false,
1271
                    "paging": false,
1271
                    paging: false,
1272
                    "info": false,
1272
                    info: false,
1273
                    "responsive": {
1273
                    responsive: {
1274
                        "details": { "type": 'column',"target": -1 }
1274
                        details: { type: "column", target: -1 },
1275
                    },
1275
                    },
1276
                    "columnDefs": [
1276
                    columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
1277
                        { "className": 'dtr-control', "orderable": false, "targets": -1 }
1277
                });
1278
                    ],
1279
                }));
1280
            });
1278
            });
1281
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1279
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1282
                dTables.DataTable().responsive.recalc();
1280
                dTables.DataTable().responsive.recalc();
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-18 / +18 lines)
Lines 579-605 Link Here
579
            var dTables = $("#loanTable, #holdst, #finestable");
579
            var dTables = $("#loanTable, #holdst, #finestable");
580
            dTables.each(function(){
580
            dTables.each(function(){
581
                var thIndex = $(this).find("th.psort").index();
581
                var thIndex = $(this).find("th.psort").index();
582
                $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
582
                $(this).kohaTable({
583
                    "sorting" : [[ thIndex, 'asc' ]],
583
                    sorting: [[thIndex, "asc"]],
584
                    "dom": '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
584
                    dom: '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
585
                    "columnDefs": [
585
                    columnDefs: [
586
                        { "targets": [ "nosort" ],"sortable": false,"searchable": false },
586
                        { targets: ["nosort"], sortable: false, searchable: false },
587
                        { "targets": [ "noshow" ], "visible": false, "searchable": false },
587
                        { targets: ["noshow"], visible: false, searchable: false },
588
                        { "type": "anti-the", "targets" : [ "anti-the" ] },
588
                        { type: "anti-the", targets: ["anti-the"] },
589
                        { "visible": false, "targets" : [ "hidden" ] },
589
                        { visible: false, targets: ["hidden"] },
590
                        { "className": 'dtr-control', "orderable": false, "targets": -1 }
590
                        { className: "dtr-control", orderable: false, targets: -1 },
591
                    ],
591
                    ],
592
                    "language": {
592
                    language: {
593
                        "search": "_INPUT_",
593
                        search: "_INPUT_",
594
                        "searchPlaceholder": _("Search")
594
                        searchPlaceholder: _("Search"),
595
                    },
595
                    },
596
                    "responsive": {
596
                    responsive: {
597
                        details: {
597
                        details: {
598
                            type: 'column',
598
                            type: "column",
599
                            target: -1
599
                            target: -1,
600
                        }
600
                        },
601
                    }
601
                    },
602
                }));
602
                });
603
            });
603
            });
604
604
605
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
605
            $('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