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 139-158 Link Here
139
    <script>
139
    <script>
140
        $(document).ready(function() {
140
        $(document).ready(function() {
141
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_items', 'course-items-table', 'json' ) | $raw %];
141
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_items', 'course-items-table', 'json' ) | $raw %];
142
            KohaTable("#course-items-table", {
142
            $("#course-items-table").kohaTable(
143
                "dom": '<"top"<"table_controls"f>>t',
143
                {
144
                "sorting": [[ 1, "asc" ]],
144
                    dom: '<"top"<"table_controls"f>>t',
145
                "language": {
145
                    sorting: [[1, "asc"]],
146
                    "search": "_INPUT_",
146
                    language: {
147
                    "searchPlaceholder": _("Search course reserves")
147
                        search: "_INPUT_",
148
                        searchPlaceholder: _("Search course reserves"),
149
                    },
150
                    responsive: {
151
                        details: { type: "column", target: -1 },
152
                    },
153
                    columnDefs: [
154
                        { className: "dtr-control", orderable: false, targets: -1 },
155
                    ],
148
                },
156
                },
149
                "responsive": {
157
                table_settings
150
                    "details": { "type": 'column',"target": -1 }
158
            );
151
                },
152
                "columnDefs": [
153
                    { "className": 'dtr-control', "orderable": false, "targets": -1 },
154
                ],
155
            }, table_settings );
156
        });
159
        });
157
    </script>
160
    </script>
158
[% END %]
161
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt (-16 / +17 lines)
Lines 86-108 Link Here
86
    <script>
86
    <script>
87
        $(document).ready(function() {
87
        $(document).ready(function() {
88
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_list', 'course_reserves_table', 'json' ) | $raw %]
88
            table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_list', 'course_reserves_table', 'json' ) | $raw %]
89
            KohaTable("#course_reserves_table", {
89
            $("#course_reserves_table").kohaTable(
90
                "dom": '<"top"<"table_controls"f>>rt<"clear">',
90
                {
91
                "sorting": [[ 1, "asc" ]],
91
                    dom: '<"top"<"table_controls"f>>rt<"clear">',
92
                "asColumnDefs": [
92
                    sorting: [[1, "asc"]],
93
                    { "aTargets": [ 1 ], "sType": "nsb-nse" },
93
                    asColumnDefs: [{ aTargets: [1], sType: "nsb-nse" }],
94
                ],
94
                    language: {
95
                "language": {
95
                        search: "_INPUT_",
96
                    "search": "_INPUT_",
96
                        searchPlaceholder: _("Search courses"),
97
                    "searchPlaceholder": _("Search courses")
97
                    },
98
                    responsive: {
99
                        details: { type: "column", target: -1 },
100
                    },
101
                    cColumnDefs: [
102
                        { className: "dtr-control", orderable: false, targets: -1 },
103
                    ],
98
                },
104
                },
99
                "responsive": {
105
                table_settings
100
                    "details": { "type": 'column',"target": -1 }
106
            );
101
                },
102
                "cColumnDefs": [
103
                    { "className": 'dtr-control', "orderable": false, "targets": -1 },
104
                ],
105
            }, table_settings );
106
        });
107
        });
107
    </script>
108
    </script>
108
[% END %]
109
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-31 / +39 lines)
Lines 1862-1902 Link Here
1862
1862
1863
            var table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1863
            var table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1864
1864
1865
            KohaTable("#holdingst", {
1865
            $("#holdingst").kohaTable(
1866
                dom: '<"clearfix">t',
1866
                {
1867
                "columnDefs": [
1867
                    dom: '<"clearfix">t',
1868
                    { "className": "dtr-control", "orderable": false, "targets": -1 }
1868
                    columnDefs: [
1869
                ],
1869
                        { className: "dtr-control", orderable: false, targets: -1 },
1870
                "bKohaColumnsUseNames": true,
1870
                    ],
1871
                "responsive": {
1871
                    bKohaColumnsUseNames: true,
1872
                    "details": { "type": 'column', "target": -1 }
1872
                    responsive: {
1873
                }
1873
                        details: { type: "column", target: -1 },
1874
            }, table_settings);
1874
                    },
1875
1875
                },
1876
            KohaTable("#otherholdingst", {
1876
                table_settings
1877
                dom: '<"clearfix">t',
1877
            );
1878
                "columnDefs": [
1878
            $("#otherholdingst").kohaTable(
1879
                    { "className": "dtr-control", "orderable": false, "targets": -1 }
1879
                {
1880
                ],
1880
                    dom: '<"clearfix">t',
1881
                "bKohaColumnsUseNames": true,
1881
                    columnDefs: [
1882
                "responsive": {
1882
                        { className: "dtr-control", orderable: false, targets: -1 },
1883
                    "details": { "type": 'column', "target": -1 }
1883
                    ],
1884
                }
1884
                    bKohaColumnsUseNames: true,
1885
            }, table_settings);
1885
                    responsive: {
1886
                        details: { type: "column", target: -1 },
1887
                    },
1888
                },
1889
                table_settings
1890
            );
1886
1891
1887
            var serial_table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1892
            var serial_table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1888
1893
1889
            KohaTable(".subscriptionst", {
1894
            $("#subscriptionst").kohaTable(
1890
                dom: '<"clearfix">t',
1895
                {
1891
                "sorting": [[ 1, "desc" ]],
1896
                    dom: '<"clearfix">t',
1892
                "bKohaColumnsUseNames": true,
1897
                    sorting: [[1, "desc"]],
1893
                "responsive": {
1898
                    bKohaColumnsUseNames: true,
1894
                    "details": { "type": 'column', "target": -1 }
1899
                    responsive: {
1900
                        details: { type: "column", target: -1 },
1901
                    },
1902
                    columnDefs: [
1903
                        { className: "dtr-control", orderable: false, targets: -1 },
1904
                    ],
1895
                },
1905
                },
1896
                "columnDefs": [
1906
                serial_table_settings
1897
                    { "className": "dtr-control", "orderable": false, "targets": -1 }
1907
            );
1898
                ],
1899
            }, serial_table_settings);
1900
1908
1901
            var dTables = $("#holdingst,.subscriptionst,#otherholdingst");
1909
            var dTables = $("#holdingst,.subscriptionst,#otherholdingst");
1902
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
1910
            $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt (-1 / +1 lines)
Lines 185-191 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
                dom: '<"top"<"table_entries"i><"table_controls"fB>>t',
190
                autoWidth: false,
190
                autoWidth: false,
191
                sorting: [[4, "desc"]],
191
                sorting: [[4, "desc"]],
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt (-14 / +17 lines)
Lines 229-249 Link Here
229
                $('#sortform').submit();
229
                $('#sortform').submit();
230
            });
230
            });
231
231
232
            var table = KohaTable("#readingrec", {
232
            var table = $("#readingrec").kohaTable(
233
                "dom": '<"top"<"table_entries"i><"table_controls"fB>>t',
233
                {
234
                "language": {
234
                    dom: '<"top"<"table_entries"i><"table_controls"fB>>t',
235
                    "search": "_INPUT_",
235
                    language: {
236
                    "searchPlaceholder": _("Search")
236
                        search: "_INPUT_",
237
                        searchPlaceholder: _("Search"),
238
                    },
239
                    responsive: {
240
                        details: { type: "column", target: -1 },
241
                    },
242
                    columnDefs: [
243
                        { className: "dtr-control", orderable: false, targets: [-1] },
244
                        { visible: false, targets: [0] },
245
                        { orderable: false, targets: [1] },
246
                    ],
237
                },
247
                },
238
                "responsive": {
248
            );
239
                    "details": {"type": 'column',"target": -1}
249
240
                },
241
                "columnDefs": [
242
                    { "className": "dtr-control","orderable": false,"targets": [-1] },
243
                    { "visible": false, "targets": [0]},
244
                    { "orderable": false, "targets": [1]}
245
                ],
246
            });
247
            let table_dt = table.DataTable();
250
            let table_dt = table.DataTable();
248
251
249
            $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
252
            $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt (-3 / +2 lines)
Lines 295-301 Link Here
295
        $(document).ready(function () {
295
        $(document).ready(function () {
296
            // We show table ordered by descending dates by default
296
            // We show table ordered by descending dates by default
297
            // (so that the more recent query is shown first)
297
            // (so that the more recent query is shown first)
298
            var table = KohaTable(".historyt", {
298
            let history_tables = $(".historyt").kohaTable({
299
                order: [[1, "desc"]],
299
                order: [[1, "desc"]],
300
                dom: '<"top"<"table_entries"><"table_controls"fB>>t',
300
                dom: '<"top"<"table_entries"><"table_controls"fB>>t',
301
                columnDefs: [
301
                columnDefs: [
Lines 312-318 Link Here
312
            });
312
            });
313
313
314
            $('a[data-bs-toggle="tab"]').on("shown.bs.tab", function (e) {
314
            $('a[data-bs-toggle="tab"]').on("shown.bs.tab", function (e) {
315
                table.DataTable().responsive.recalc();
315
                history_tables.DataTable().responsive.recalc();
316
            });
316
            });
317
317
318
            $(".CheckNone").click(function (e) {
318
            $(".CheckNone").click(function (e) {
319
- 

Return to bug 26553