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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt (-13 / +16 lines)
Lines 126-145 Link Here
126
    <script>
126
    <script>
127
        $(document).ready(function() {
127
        $(document).ready(function() {
128
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_items', 'course-items-table', 'json' ) | $raw %];
128
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_items', 'course-items-table', 'json' ) | $raw %];
129
            KohaTable("#course-items-table", {
129
            $("#course-items-table").kohaTable(
130
                "dom": '<"top"<"table_controls"f>>t',
130
                {
131
                "sorting": [[ 1, "asc" ]],
131
                    dom: '<"top"<"table_controls"f>>t',
132
                "language": {
132
                    sorting: [[1, "asc"]],
133
                    "search": "_INPUT_",
133
                    language: {
134
                    "searchPlaceholder": _("Search course reserves")
134
                        search: "_INPUT_",
135
                        searchPlaceholder: _("Search course reserves"),
136
                    },
137
                    responsive: {
138
                        details: { type: "column", target: -1 },
139
                    },
140
                    columnDefs: [
141
                        { className: "dtr-control", orderable: false, targets: -1 },
142
                    ],
135
                },
143
                },
136
                "responsive": {
144
                table_settings
137
                    "details": { "type": 'column',"target": -1 }
145
            );
138
                },
139
                "columnDefs": [
140
                    { "className": 'dtr-control', "orderable": false, "targets": -1 },
141
                ],
142
            }, table_settings );
143
        });
146
        });
144
    </script>
147
    </script>
145
[% END %]
148
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt (-16 / +17 lines)
Lines 75-97 Link Here
75
    <script>
75
    <script>
76
        $(document).ready(function() {
76
        $(document).ready(function() {
77
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_list', 'course_reserves_table', 'json' ) | $raw %]
77
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_list', 'course_reserves_table', 'json' ) | $raw %]
78
            KohaTable("#course_reserves_table", {
78
            $("#course_reserves_table").kohaTable(
79
                "dom": '<"top"<"table_controls"f>>rt<"clear">',
79
                {
80
                "sorting": [[ 1, "asc" ]],
80
                    dom: '<"top"<"table_controls"f>>rt<"clear">',
81
                "asColumnDefs": [
81
                    sorting: [[1, "asc"]],
82
                    { "aTargets": [ 1 ], "sType": "nsb-nse" },
82
                    asColumnDefs: [{ aTargets: [1], sType: "nsb-nse" }],
83
                ],
83
                    language: {
84
                "language": {
84
                        search: "_INPUT_",
85
                    "search": "_INPUT_",
85
                        searchPlaceholder: _("Search courses"),
86
                    "searchPlaceholder": _("Search courses")
86
                    },
87
                    responsive: {
88
                        details: { type: "column", target: -1 },
89
                    },
90
                    cColumnDefs: [
91
                        { className: "dtr-control", orderable: false, targets: -1 },
92
                    ],
87
                },
93
                },
88
                "responsive": {
94
                table_settings
89
                    "details": { "type": 'column',"target": -1 }
95
            );
90
                },
91
                "cColumnDefs": [
92
                    { "className": 'dtr-control', "orderable": false, "targets": -1 },
93
                ],
94
            }, table_settings );
95
        });
96
        });
96
    </script>
97
    </script>
97
[% END %]
98
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-31 / +39 lines)
Lines 1744-1784 Link Here
1744
1744
1745
            var table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1745
            var table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1746
1746
1747
            KohaTable("#holdingst", {
1747
            $("#holdingst").kohaTable(
1748
                dom: '<"clearfix">t',
1748
                {
1749
                "columnDefs": [
1749
                    dom: '<"clearfix">t',
1750
                    { "className": "dtr-control", "orderable": false, "targets": -1 }
1750
                    columnDefs: [
1751
                ],
1751
                        { className: "dtr-control", orderable: false, targets: -1 },
1752
                "bKohaColumnsUseNames": true,
1752
                    ],
1753
                "responsive": {
1753
                    bKohaColumnsUseNames: true,
1754
                    "details": { "type": 'column', "target": -1 }
1754
                    responsive: {
1755
                }
1755
                        details: { type: "column", target: -1 },
1756
            }, table_settings);
1756
                    },
1757
1757
                },
1758
            KohaTable("#otherholdingst", {
1758
                table_settings
1759
                dom: '<"clearfix">t',
1759
            );
1760
                "columnDefs": [
1760
            $("#otherholdingst").kohatable(
1761
                    { "className": "dtr-control", "orderable": false, "targets": -1 }
1761
                {
1762
                ],
1762
                    dom: '<"clearfix">t',
1763
                "bKohaColumnsUseNames": true,
1763
                    columnDefs: [
1764
                "responsive": {
1764
                        { className: "dtr-control", orderable: false, targets: -1 },
1765
                    "details": { "type": 'column', "target": -1 }
1765
                    ],
1766
                }
1766
                    bKohaColumnsUseNames: true,
1767
            }, table_settings);
1767
                    responsive: {
1768
                        details: { type: "column", target: -1 },
1769
                    },
1770
                },
1771
                table_settings
1772
            );
1768
1773
1769
            var serial_table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1774
            var serial_table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1770
1775
1771
            KohaTable("#subscriptionst", {
1776
            $("#subscriptionst").kohaTable(
1772
                dom: '<"clearfix">t',
1777
                {
1773
                "sorting": [[ 1, "desc" ]],
1778
                    dom: '<"clearfix">t',
1774
                "bKohaColumnsUseNames": true,
1779
                    sorting: [[1, "desc"]],
1775
                "responsive": {
1780
                    bKohaColumnsUseNames: true,
1776
                    "details": { "type": 'column', "target": -1 }
1781
                    responsive: {
1782
                        details: { type: "column", target: -1 },
1783
                    },
1784
                    columnDefs: [
1785
                        { className: "dtr-control", orderable: false, targets: -1 },
1786
                    ],
1777
                },
1787
                },
1778
                "columnDefs": [
1788
                serial_table_settings
1779
                    { "className": "dtr-control", "orderable": false, "targets": -1 }
1789
            );
1780
                ],
1781
            }, serial_table_settings);
1782
1790
1783
            var dTables = $("#holdingst,#subscriptionst,#otherholdingst");
1791
            var dTables = $("#holdingst,#subscriptionst,#otherholdingst");
1784
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1792
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt (-12 / +12 lines)
Lines 185-202 Link Here
185
        $('#sort').change(function() {
185
        $('#sort').change(function() {
186
            $('#sortform').submit();
186
            $('#sortform').submit();
187
        });
187
        });
188
        var table = KohaTable("#table_holdshistory", {
188
        var table = $("#table_holdshistory").kohaTable(
189
            "dom": '<"top"<"table_entries"i><"table_controls"fB>>t',
189
            {
190
            "autoWidth": false,
190
                dom: '<"top"<"table_entries"i><"table_controls"fB>>t',
191
            "sorting": [[4, 'desc']],
191
                autoWidth: false,
192
            "columnDefs": [
192
                sorting: [[4, "desc"]],
193
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
193
                columnDefs: [{ sType: "anti-the", aTargets: ["anti-the"] }],
194
            ],
194
                language: {
195
            "language": {
195
                    search: "_INPUT_",
196
                "search": "_INPUT_",
196
                    searchPlaceholder: _("Search"),
197
                "searchPlaceholder": _("Search")
197
                },
198
            }
198
            },
199
        });
199
        );
200
    });
200
    });
201
</script>
201
</script>
202
[% END %]
202
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt (-14 / +17 lines)
Lines 231-251 Link Here
231
            $('#sortform').submit();
231
            $('#sortform').submit();
232
        });
232
        });
233
233
234
        var table = KohaTable("#readingrec", {
234
        var table = $("#readingrec").kohaTable(
235
            "dom": '<"top"<"table_entries"i><"table_controls"fB>>t',
235
            {
236
            "language": {
236
                dom: '<"top"<"table_entries"i><"table_controls"fB>>t',
237
                "search": "_INPUT_",
237
                language: {
238
                "searchPlaceholder": _("Search")
238
                    search: "_INPUT_",
239
                    searchPlaceholder: _("Search"),
240
                },
241
                responsive: {
242
                    details: { type: "column", target: -1 },
243
                },
244
                columnDefs: [
245
                    { className: "dtr-control", orderable: false, targets: [-1] },
246
                    { visible: false, targets: [0] },
247
                    { orderable: false, targets: [1] },
248
                ],
239
            },
249
            },
240
            "responsive": {
250
        );
241
                "details": {"type": 'column',"target": -1}
251
242
            },
243
            "columnDefs": [
244
                { "className": "dtr-control","orderable": false,"targets": [-1] },
245
                { "visible": false, "targets": [0]},
246
                { "orderable": false, "targets": [1]}
247
            ],
248
        });
249
        let table_dt = table.DataTable();
252
        let table_dt = table.DataTable();
250
253
251
        $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
254
        $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt (-14 / +13 lines)
Lines 294-317 Link Here
294
    $(document).ready(function() {
294
    $(document).ready(function() {
295
        // We show table ordered by descending dates by default
295
        // We show table ordered by descending dates by default
296
        // (so that the more recent query is shown first)
296
        // (so that the more recent query is shown first)
297
        var table = KohaTable(".historyt", {
297
        let history_tables = $(".historyt").kohaTable({
298
            "order": [[ 1, "desc" ]],
298
            order: [[1, "desc"]],
299
            "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
299
            dom: '<"top"<"table_entries"><"table_controls"fB>>t',
300
            "columnDefs": [
300
            columnDefs: [
301
                { "targets": [ 0 ], "sortable": false, "searchable": false },
301
                { targets: [0], sortable: false, searchable: false },
302
                { "className": 'dtr-control', "orderable": false, "targets": -1 }
302
                { className: "dtr-control", orderable: false, targets: -1 },
303
            ],
303
            ],
304
            "language": {
304
            language: {
305
                "search": "_INPUT_",
305
                search: "_INPUT_",
306
                "searchPlaceholder": _("Search")
306
                searchPlaceholder: _("Search"),
307
            },
307
            },
308
            "responsive": {
308
            responsive: {
309
                "details": { "type": 'column',"target": -1 }
309
                details: { type: "column", target: -1 },
310
            },
310
            },
311
        });
311
        });
312
312
313
        $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
313
        $('a[data-bs-toggle="tab"]').on("shown.bs.tab", function (e) {
314
            table.DataTable().responsive.recalc();
314
            history_tables.DataTable().responsive.recalc();
315
        });
315
        });
316
316
317
        $(".CheckNone").click(function(e){
317
        $(".CheckNone").click(function(e){
318
- 

Return to bug 26553