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

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

Return to bug 35436