Merge pull request #981 from alphagov/fix-api-page-firefox

Fix API log page in Firefox
This commit is contained in:
Chris Hill-Scott
2016-10-14 13:28:38 +01:00
committed by GitHub
4 changed files with 50 additions and 27 deletions

View File

@@ -133,22 +133,20 @@
// If this is not a native implementation, create an arrow
// inside the summary
if (!NATIVE_DETAILS) {
var twisty = document.createElement('i');
if (openAttr === true) {
twisty.className = 'arrow arrow-open';
twisty.appendChild(document.createTextNode('\u25bc'));
} else {
twisty.className = 'arrow arrow-closed';
twisty.appendChild(document.createTextNode('\u25ba'));
}
details.__summary.__twisty = details.__summary.insertBefore(twisty, details.__summary.firstChild);
details.__summary.__twisty.setAttribute('aria-hidden', 'true');
var twisty = document.createElement('i');
if (openAttr === true) {
twisty.className = 'arrow arrow-open';
twisty.appendChild(document.createTextNode('\u25bc'));
} else {
twisty.className = 'arrow arrow-closed';
twisty.appendChild(document.createTextNode('\u25ba'));
}
details.__summary.__twisty = details.__summary.insertBefore(twisty, details.__summary.firstChild);
details.__summary.__twisty.setAttribute('aria-hidden', 'true');
}
// Define a statechange function that updates aria-expanded and style.display

View File

@@ -192,3 +192,25 @@ details summary {
.tabular-numbers {
@include core-19($tabular-numbers: true);
}
summary::-moz-details-marker {
display: none;
}
summary::-ms-details-marker {
display: none;
}
summary::-o-details-marker {
display: none;
}
summary::details-marker {
display: none;
}
summary::-webkit-details-marker {
display: none;
}
details .arrow {
font-size: 16px;
}

View File

@@ -19,6 +19,7 @@
}
&-meta {
display: block;
color: $secondary-text-colour;
}

View File

@@ -61,25 +61,27 @@
<h3 class="api-notifications-item-recipient">
{{ notification.to }}
</h3>
<div class="grid-row api-notifications-item-meta">
<div class="column-half api-notifications-item-key">
<span class="grid-row api-notifications-item-meta">
<span class="column-half api-notifications-item-key">
{{notification.key_name}}
</div>
<div class="column-half api-notifications-item-time">
</span>
<span class="column-half api-notifications-item-time">
<time class="timeago" datetime="{{ notification.created_at }}">
{{ notification.created_at|format_delta }}
</time>
</div>
</div>
</span>
</span>
</summary>
<dl id="notification-{{ notification.id }}" class="api-notifications-item-data bottom-gutter-1-2">
{% for key in [
'id', 'notification_type', 'created_at', 'updated_at', 'sent_at', 'status'
] %}
<dt>{{ key }}:</dt>
<dd class="api-notifications-item-data-item">{{ notification[key] }}</dd>
{% endfor %}
</dl>
<div>
<dl id="notification-{{ notification.id }}" class="api-notifications-item-data bottom-gutter-1-2">
{% for key in [
'id', 'notification_type', 'created_at', 'updated_at', 'sent_at', 'status'
] %}
<dt>{{ key }}:</dt>
<dd class="api-notifications-item-data-item">{{ notification[key] }}</dd>
{% endfor %}
</dl>
</div>
</details>
{% endfor %}
{% if api_notifications.notifications %}