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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (-7 / +12 lines)
Lines 396-401 Link Here
396
396
397
[% MACRO jsinclude BLOCK %]
397
[% MACRO jsinclude BLOCK %]
398
    [% INCLUDE 'datatables.inc' %]
398
    [% INCLUDE 'datatables.inc' %]
399
    <script>
400
        let listclosed = [% listclosed ? 1 : 0 | html %];
401
        let grouping = [% grouping ? 1 : 0 | html %];
402
    </script>
403
399
    <script>
404
    <script>
400
        function submitForm(form) {
405
        function submitForm(form) {
401
            if (form.closedbg.checked == true) {
406
            if (form.closedbg.checked == true) {
Lines 419-430 Link Here
419
        }
424
        }
420
425
421
        $(document).ready(function() {
426
        $(document).ready(function() {
422
            [% IF ( listclosed) %]
427
            if (listclosed){
423
                $("#basket_groups a[href='#closed']").tab("show");
428
                $("#basket_groups a[href='#closed']").tab("show");
424
            [% ELSE %]
429
            } else {
425
                $("#basket_groups a[href='#opened']").tab("show");
430
                $("#basket_groups a[href='#opened']").tab("show");
426
            [% END %]
431
            }
427
            [% UNLESS ( grouping ) %]
432
433
            if (!grouping){
428
                let dt_params = {
434
                let dt_params = {
429
                    autoWidth: false,
435
                    autoWidth: false,
430
                    pagingType: "full",
436
                    pagingType: "full",
Lines 433-439 Link Here
433
                $("#grouped").kohaTable(dt_params);
439
                $("#grouped").kohaTable(dt_params);
434
                $("#basket_group_opened").kohaTable(dt_params);
440
                $("#basket_group_opened").kohaTable(dt_params);
435
                $("#basket_group_closed").kohaTable(dt_params);
441
                $("#basket_group_closed").kohaTable(dt_params);
436
            [% ELSE %]
442
            } else {
437
                grouped = $("#grouped").kohaTable({
443
                grouped = $("#grouped").kohaTable({
438
                    dom: "t",
444
                    dom: "t",
439
                    autoWidth: false,
445
                    autoWidth: false,
Lines 448-454 Link Here
448
                        emptyTable: _("There are no ungrouped baskets"),
454
                        emptyTable: _("There are no ungrouped baskets"),
449
                    },
455
                    },
450
                });
456
                });
451
            [% END %]
457
            }
452
458
453
            $("#basketgroupcolumns").on("click", ".addtogroup", function(){
459
            $("#basketgroupcolumns").on("click", ".addtogroup", function(){
454
                const row = $("#" + $(this).data("basketid") );
460
                const row = $("#" + $(this).data("basketid") );
455
- 

Return to bug 41563