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

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (-6 / +22 lines)
Lines 4524-4533 div .suggestion_note { Link Here
4524
4524
4525
/* Cookie consent bar */
4525
/* Cookie consent bar */
4526
#cookieConsentBar {
4526
#cookieConsentBar {
4527
    align-items: center;
4527
    background: rgba( 0, 0, 0, .7 );
4528
    background: rgba( 0, 0, 0, .7 );
4528
    bottom: 0;
4529
    bottom: 0;
4529
    color: rgba( 255, 255, 255, .9 );
4530
    color: rgba( 255, 255, 255, .9 );
4530
    display: none;
4531
    display: none;
4532
    flex-wrap: wrap;
4531
    left: 0;
4533
    left: 0;
4532
    padding: 20px;
4534
    padding: 20px;
4533
    position: fixed;
4535
    position: fixed;
Lines 4539-4554 div .suggestion_note { Link Here
4539
        color: #D7EBFF;
4541
        color: #D7EBFF;
4540
    }
4542
    }
4541
4543
4542
    #consentButtons {
4544
    button {
4543
        margin-top: 10px;
4545
        margin-bottom: .5rem;
4544
        text-align: right;
4546
        margin-top: .5rem;
4545
    }
4546
4547
4547
    button:not( :last-child ) {
4548
        &:not( :last-child ) {
4548
        margin-right: 10px;
4549
            margin-right: 10px;
4550
        }
4549
    }
4551
    }
4550
}
4552
}
4551
4553
4554
#consentButtons {
4555
    flex-grow: 1;
4556
    margin-top: 10px;
4557
    text-align: left;
4558
    white-space: normal;
4559
}
4560
4552
/* Cookie consent modal */
4561
/* Cookie consent modal */
4553
#cookieConsentModal {
4562
#cookieConsentModal {
4554
    .modal-dialog {
4563
    .modal-dialog {
Lines 4584-4589 div .suggestion_note { Link Here
4584
@import "toolbar";
4593
@import "toolbar";
4585
@import "forms";
4594
@import "forms";
4586
4595
4596
@media only screen and ( min-width: 608px ) {
4597
    #consentButtons {
4598
        text-align: right;
4599
        white-space: nowrap;
4600
    }
4601
}
4602
4587
@media ( max-width: 767px ) {
4603
@media ( max-width: 767px ) {
4588
    .header-menu-link {
4604
    .header-menu-link {
4589
        display: inline-block;
4605
        display: inline-block;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc (-2 / +2 lines)
Lines 86-92 Link Here
86
        <!-- Cookie consent bar -->
86
        <!-- Cookie consent bar -->
87
        <div id="cookieConsentBar" aria-hidden="true">
87
        <div id="cookieConsentBar" aria-hidden="true">
88
            [% IF ( CookieConsentBar && CookieConsentBar.content && CookieConsentBar.content.count >0 ) %]
88
            [% IF ( CookieConsentBar && CookieConsentBar.content && CookieConsentBar.content.count >0 ) %]
89
                <div id="cookieConsentBarText">
89
                <div id="cookieConsentBar_content">
90
                    [%- FOREACH item IN CookieConsentBar.content -%]
90
                    [%- FOREACH item IN CookieConsentBar.content -%]
91
                        [%- item.content | $raw -%]
91
                        [%- item.content | $raw -%]
92
                    [%- END -%]
92
                    [%- END -%]
Lines 97-103 Link Here
97
                [% IF ( JSConsents.all('staffConsent').size ) %]
97
                [% IF ( JSConsents.all('staffConsent').size ) %]
98
                    <button type="button" class="btn btn-primary consentAcceptEssential">Accept only essential cookies</button>
98
                    <button type="button" class="btn btn-primary consentAcceptEssential">Accept only essential cookies</button>
99
                [% END %]
99
                [% END %]
100
                <button type="button" class="btn btn-info" id="consentMoreInfo">More information</button>
100
                <button type="button" class="btn btn-default" id="consentMoreInfo">More information</button>
101
            </div>
101
            </div>
102
        </div> <!-- /#cookieConsentBar -->
102
        </div> <!-- /#cookieConsentBar -->
103
        <!-- Cookie consent modal -->
103
        <!-- Cookie consent modal -->
(-)a/koha-tmpl/intranet-tmpl/prog/js/cookieconsent.js (-1 / +1 lines)
Lines 40-46 Link Here
40
            consentBar.css('bottom', height);
40
            consentBar.css('bottom', height);
41
        };
41
        };
42
        consentBar.attr('aria-hidden', 'false');
42
        consentBar.attr('aria-hidden', 'false');
43
        consentBar.show();
43
        consentBar.css("display", "flex");
44
    }
44
    }
45
45
46
    function hideConsentBar() {
46
    function hideConsentBar() {
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss (+6 lines)
Lines 276-281 Link Here
276
                margin: 5px 0;
276
                margin: 5px 0;
277
            }
277
            }
278
        }
278
        }
279
280
    }
281
282
    #consentButtons {
283
        text-align: right;
284
        white-space: nowrap;
279
    }
285
    }
280
286
281
    #views {
287
    #views {
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-7 / +15 lines)
Lines 2887-2896 $star-selected: #EDB867; Link Here
2887
2887
2888
/* Cookie consent bar */
2888
/* Cookie consent bar */
2889
#cookieConsentBar {
2889
#cookieConsentBar {
2890
    align-items: center;
2890
    background: rgba( 0, 0, 0, .7 );
2891
    background: rgba( 0, 0, 0, .7 );
2891
    bottom: 0;
2892
    bottom: 0;
2892
    color: rgba( 255, 255, 255, .9 );
2893
    color: rgba( 255, 255, 255, .9 );
2893
    display: none;
2894
    display: none;
2895
    flex-wrap: wrap;
2894
    left: 0;
2896
    left: 0;
2895
    padding: 20px;
2897
    padding: 20px;
2896
    position: fixed;
2898
    position: fixed;
Lines 2902-2917 $star-selected: #EDB867; Link Here
2902
        color: #C5ECFF;
2904
        color: #C5ECFF;
2903
    }
2905
    }
2904
2906
2905
    #consentButtons {
2907
    button {
2906
        margin-top: 10px;
2908
        margin-bottom: .5rem;
2907
        text-align: right;
2909
        margin-top: .5rem;
2908
    }
2909
2910
2910
    button:not( :last-child ) {
2911
        &:not( :last-child ) {
2911
        margin-right: 10px;
2912
            margin-right: 10px;
2913
        }
2912
    }
2914
    }
2913
}
2915
}
2914
2916
2917
#consentButtons {
2918
    flex-grow: 1;
2919
    margin-top: 10px;
2920
    text-align: left;
2921
    white-space: normal;
2922
}
2923
2915
/* Cookie consent modal */
2924
/* Cookie consent modal */
2916
#cookieConsentModal {
2925
#cookieConsentModal {
2917
    .modal-dialog {
2926
    .modal-dialog {
Lines 2919-2925 $star-selected: #EDB867; Link Here
2919
    }
2928
    }
2920
2929
2921
    .consentModalItem {
2930
    .consentModalItem {
2922
        align-items: center;
2923
        border: 1px solid #CCC;
2931
        border: 1px solid #CCC;
2924
        border-radius: 5px;
2932
        border-radius: 5px;
2925
        display: flex;
2933
        display: flex;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-1 / +3 lines)
Lines 458-464 Link Here
458
            <!-- Cookie consent bar -->
458
            <!-- Cookie consent bar -->
459
            <div id="cookieConsentBar" aria-hidden="true">
459
            <div id="cookieConsentBar" aria-hidden="true">
460
                [% IF ( CookieConsentBar ) %]
460
                [% IF ( CookieConsentBar ) %]
461
                    [% PROCESS koha_news_block news => CookieConsentBar %]
461
                    <div id="cookieConsentBar_content">
462
                        [% PROCESS koha_news_block news => CookieConsentBar %]
463
                    </div>
462
                [% END %]
464
                [% END %]
463
                <div id="consentButtons">
465
                <div id="consentButtons">
464
                    <button type="button" class="btn btn-primary consentAcceptAll">Accept all cookies</button>
466
                    <button type="button" class="btn btn-primary consentAcceptAll">Accept all cookies</button>
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js (-7 / +15 lines)
Lines 27-32 Link Here
27
        initialiseSelected();
27
        initialiseSelected();
28
    });
28
    });
29
29
30
    $(window).on("scroll", function() {
31
        const consentBar = $("#cookieConsentBar");
32
        const langmenu = $("#changelanguage");
33
        const wrapper = $("#wrapper");
34
        if( langmenu ) {
35
            const height = langmenu.height();
36
            if( $(window).scrollTop() >= wrapper.offset().top + wrapper.outerHeight() - window.innerHeight ) {
37
                consentBar.css("bottom", height);
38
            } else {
39
                consentBar.css("bottom", 0);
40
            }
41
        };
42
    });
43
30
    // Initialise existing consent based on local storage
44
    // Initialise existing consent based on local storage
31
    function getExistingConsent() {
45
    function getExistingConsent() {
32
        existingConsent = localStorage.getItem('cookieConsent') ?
46
        existingConsent = localStorage.getItem('cookieConsent') ?
Lines 36-48 Link Here
36
50
37
    function showConsentBar() {
51
    function showConsentBar() {
38
        const consentBar = $('#cookieConsentBar');
52
        const consentBar = $('#cookieConsentBar');
39
        const langmenu = $('#changelanguage');
40
        if(langmenu) {
41
            const height = langmenu.height();
42
            consentBar.css('bottom', height);
43
        };
44
        consentBar.attr('aria-hidden', 'false');
53
        consentBar.attr('aria-hidden', 'false');
45
        consentBar.show();
54
        consentBar.css("display", "flex");
46
    }
55
    }
47
56
48
    function hideConsentBar() {
57
    function hideConsentBar() {
49
- 

Return to bug 34792