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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt (-5 / +8 lines)
Lines 2-7 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE TablesSettings %]
5
[% USE AdditionalContents %]
6
[% USE AdditionalContents %]
6
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
Lines 284-299 Link Here
284
285
285
[% BLOCK jsinclude %]
286
[% BLOCK jsinclude %]
286
[% INCLUDE 'datatables.inc' %]
287
[% INCLUDE 'datatables.inc' %]
288
[% INCLUDE 'columns_settings.inc' %]
287
<script>
289
<script>
288
290
289
    var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete selected search history entries?");
291
    var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete selected search history entries?");
290
    $(document).ready(function() {
292
    $(document).ready(function() {
291
        // We show table ordered by descending dates by default
293
        // We show table ordered by descending dates by default
292
        // (so that the more recent query is shown first)
294
        // (so that the more recent query is shown first)
293
        $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
295
        var columns_settings = []; // Empty because there are no columns we want to be configurable
296
        var table = KohaTable(".historyt", {
294
            "order": [[ 1, "desc" ]],
297
            "order": [[ 1, "desc" ]],
295
            "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
298
            "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
296
            "columnDefs": [
299
            "aoColumnDefs": [
297
                { "targets": [ 0 ], "sortable": false, "searchable": false },
300
                { "targets": [ 0 ], "sortable": false, "searchable": false },
298
                { "className": 'dtr-control', "orderable": false, "targets": -1 }
301
                { "className": 'dtr-control', "orderable": false, "targets": -1 }
299
            ],
302
            ],
Lines 305-315 Link Here
305
            "responsive": {
308
            "responsive": {
306
                "details": { "type": 'column',"target": -1 }
309
                "details": { "type": 'column',"target": -1 }
307
            },
310
            },
308
        }));
311
        }, columns_settings);
309
312
310
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
313
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
311
            $(".historyt").DataTable().responsive.recalc();
314
            table.DataTable().responsive.recalc();
312
        });
315
        });
316
313
        $(".CheckNone").click(function(e){
317
        $(".CheckNone").click(function(e){
314
            e.preventDefault();
318
            e.preventDefault();
315
            var form = $(this).parents("form").get(0);
319
            var form = $(this).parents("form").get(0);
316
- 

Return to bug 35436