We have a client who would like to be able to provide a different popup message for mobile devices.

I'll upload a patch which provides this feature shortly.

Comments

LNakamura created an issue. See original summary.

LNakamura’s picture

shrop’s picture

Consider adding configuration to adjust the max-width px setting in JS so it doesn't have to be hardcoded. I bet someone here can confirm if that makes sense and patch it up.

LNakamura’s picture

StatusFileSize
new6.15 KB
new1.43 KB

Fixed a bug (new message wasn't being saved on config save), and changed the max-width to 600px in the JS, which matches the media query in eu_cookie_compliance.css.

LNakamura’s picture

Thanks, @shrop - another option would be to follow what's outlined here: https://www.lullabot.com/articles/importing-css-breakpoints-into-javascript

LNakamura’s picture

Status: Active » Needs review
svenryen’s picture

StatusFileSize
new8.37 KB

Here's an improved patch that allows the user to input the mobile breakpoint. 600 makes little sense, so I adjusted it to 768 px. It's debatable whether the css also should have 768 as the breakpoint.

I also tidied up the admin form, so that the option is exposed only when clicking a checkbox.

  • svenryen committed e34aaf9 on 8.x-1.x authored by LNakamura
    Issue #2921182 by LNakamura, svenryen: Provide alternate popup message...
svenryen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.