Bugzilla – Attachment 122000 Details for
Bug 27378
Enable compliance with EU Cookie Legislation via cookie consent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27378: Move "Your cookies" to existing bar
Bug-27378-Move-Your-cookies-to-existing-bar.patch (text/plain), 4.00 KB, created by
Andrew Isherwood
on 2021-06-15 12:53:05 UTC
(
hide
)
Description:
Bug 27378: Move "Your cookies" to existing bar
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2021-06-15 12:53:05 UTC
Size:
4.00 KB
patch
obsolete
>From c24c06d46f45714fc195f8dfacfe34c48f3a1e0f Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 25 Jan 2021 12:17:48 +0000 >Subject: [PATCH] Bug 27378: Move "Your cookies" to existing bar > >The new "Your cookies" button that appeared at the bottom right when an >unauthenticated user had made their cookie consent selections wasn't >ideal. > >It has now been moved to the top bar, next to "Lists", this feels like a >much more sensible place for it. >--- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 11 ----------- > .../opac-tmpl/bootstrap/en/includes/masthead.inc | 15 +++++++++------ > koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js | 7 +++---- > 3 files changed, 12 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index f17bbf0356..2fc47e2adf 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -2675,17 +2675,6 @@ $star-selected: #EDB867; > } > } > >-#cookieConsentButton { >- position: fixed; >- border: 0; >- bottom: 0; >- right: 0; >- padding: 10px; >- background: rgba(0,0,0,0.75); >- color: rgba(255,255,255,0.8); >- z-index: 1; >-} >- > #viewCookieConsents { > margin-top: 10px; > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 1c7ed2f557..879822801f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -82,6 +82,15 @@ > </div> <!-- / .dropdown-menu --> > </li> <!-- / .nav-item.dropdown --> > [% END # / IF virtualshelves %] >+ <!-- Cookie consent button for non logged-in users --> >+ [% IF !loggedinusername %] >+ <li style="display:none" id="cookieConsentDivider" class="divider-vertical" aria-hidden="true"></li> >+ <li style="display:none" id="cookieConsentLi" class="nav-item" aria-hidden="true"> >+ <a id="cookieConsentButton" href="#" name="Your cookies" class="nav-link" title="View and amend cookies you have consented to" role="button"> >+ <span class="cookieconsentlabel">Your cookies</span> >+ </a> >+ </li> >+ [% END %] > </ul> <!-- / .navbar-nav --> > > [% IF Koha.Preference( 'opacuserlogin' ) == 1 || Koha.Preference( 'EnableOpacSearchHistory') || Koha.Preference( 'opaclanguagesdisplay' ) %] >@@ -431,12 +440,6 @@ > [% END %] > </div> > </div> <!-- /#cookieConsentBar --> >- <!-- Cookie consent button for non logged-in users --> >- [% IF !loggedinusername %] >- <button id="cookieConsentButton" style="display:none" aria-hidden="true"> >- Your cookies >- </button> >- [% END %] > <!-- Cookie consent modal --> > <div id="cookieConsentModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="cookieConsentModalLabel" aria-hidden="true"> > <div class="modal-dialog"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js b/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js >index ae10eeac86..8f7a8c0252 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js >@@ -62,10 +62,9 @@ > // cookieConsentsButton element in the DOM. The user > // has previously consented, so we need to display this > // button >- const consentButton = $('#cookieConsentButton'); >- if (consentButton.length > 0) { >- consentButton.attr('aria-hidden', 'false'); >- consentButton.show(); >+ if ($('#cookieConsentButton').length > 0) { >+ $('#cookieConsentDivider').show().attr('aria-hidden', 'false'); >+ $('#cookieConsentLi').show().attr('aria-hidden', 'false'); > } > } > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27378
:
115544
|
115545
|
115546
|
115547
|
115548
|
115756
|
116397
|
116398
|
116399
|
116400
|
116401
|
116402
|
116403
|
116416
|
116417
|
116418
|
116419
|
116420
|
116421
|
116422
|
116423
|
116978
|
116979
|
116980
|
116981
|
116982
|
116983
|
116984
|
116985
|
116986
|
121728
|
121729
|
121730
|
121731
|
121732
|
121733
|
121734
|
121735
|
121995
|
121996
|
121997
|
121998
|
121999
|
122000
|
122001
|
122002
|
122635
|
122636
|
122637
|
122638
|
122639
|
122640
|
122641
|
122642
|
124957
|
124958
|
124959
|
124960
|
124961
|
124962
|
124963
|
124964
|
124965
|
130072
|
130073
|
130074
|
130075
|
130076
|
130077
|
130078
|
130079
|
130080
|
135309
|
135310
|
135311
|
135312
|
135313
|
135314
|
135315
|
135316
|
135317
|
135318
|
151735
|
151736
|
151737
|
151738
|
151739
|
151740
|
151741
|
151742
|
151743
|
151744
|
151745
|
151746
|
151747
|
151748
|
151749
|
151750
|
151751
|
151752
|
151753
|
151826
|
151827
|
151828
|
151829
|
151830
|
151831
|
151832
|
151833
|
151834
|
151835
|
151836
|
151837
|
151838
|
151839
|
151840
|
151841
|
151842
|
151843
|
151844
|
153326
|
153327
|
153328
|
153329
|
153330
|
153331
|
153332
|
153333
|
153334
|
153335
|
153336
|
154015
|
154016
|
154017
|
154018
|
154019
|
154020
|
154021
|
154022
|
154023
|
154024
|
154025
|
154093
|
154264
|
154265
|
154266
|
154267
|
154268
|
154269
|
154270
|
154271
|
154272
|
154273
|
154274
|
154275
|
154276