From c13f1aa5d10eb82c5d6d2614b7ac11aa5183939d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 12 Oct 2016 15:25:35 +0100 Subject: [PATCH] Fix API log page in Firefox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The details of each notification were not being hidden on page load in Firefox. Firefox does not natively support the `
` element, so we polyfill it. Because of the way the polyfill is written[1] 1. There can’t be any `
` elements inside the `` (this commit changes them to be ``s instead, and adds CSS to make sure they wrap as before) 2. The contents to be shown/hidden must be wrapped in a `
` (which this commit adds) *** 1. https://github.com/alphagov/govuk_elements/blob/48fde82c721917feed3b7cf9b655e41fcddb3f49/public/javascripts/govuk/details.polyfill.js#L90 --- app/assets/stylesheets/views/api.scss | 1 + app/templates/views/api/index.html | 30 ++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/assets/stylesheets/views/api.scss b/app/assets/stylesheets/views/api.scss index 6a947afef..98e21685e 100644 --- a/app/assets/stylesheets/views/api.scss +++ b/app/assets/stylesheets/views/api.scss @@ -19,6 +19,7 @@ } &-meta { + display: block; color: $secondary-text-colour; } diff --git a/app/templates/views/api/index.html b/app/templates/views/api/index.html index a446e9dbb..cd650bc85 100644 --- a/app/templates/views/api/index.html +++ b/app/templates/views/api/index.html @@ -61,25 +61,27 @@

{{ notification.to }}

-
-
+ + {{notification.key_name}} -
-
+ + -
-
+ +
-
- {% for key in [ - 'id', 'notification_type', 'created_at', 'updated_at', 'sent_at', 'status' - ] %} -
{{ key }}:
-
{{ notification[key] }}
- {% endfor %} -
+
+
+ {% for key in [ + 'id', 'notification_type', 'created_at', 'updated_at', 'sent_at', 'status' + ] %} +
{{ key }}:
+
{{ notification[key] }}
+ {% endfor %} +
+
{% endfor %} {% if api_notifications.notifications %}