govuk_publishing_components 21.66.1 → 21.66.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af7d82223019f23f4e23fe004eef89ba49fb8720447e9c88243c007dee32bfed
|
4
|
+
data.tar.gz: 1453e76cefe515b3e19d0641f45da54362845eb3a6cd1f8b777a86aecd3c79f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46c4d14d1743512c7c738734781daddb789d1f78a0253d9670a20b9a8242ae75167364ab14d808396f2db8db3e47a1882c9d4625036900a4ec43abae9755c914
|
7
|
+
data.tar.gz: e81d1abeed8ea158022a62c5ed4707174a05678de0f31d9428634b78e104780dc8c868fb9845d58b5d219aba8fd1a46e9bd9459e0c94e1f27831d3b69f6fd07c
|
@@ -13,6 +13,7 @@
|
|
13
13
|
var target = this.getAttribute('href') ? document.getElementById(this.getAttribute('href').substr(1)) : document.getElementById(this.getAttribute('data-search-toggle-for'))
|
14
14
|
var targetClass = target.getAttribute('class') || ''
|
15
15
|
var sourceClass = this.getAttribute('class') || ''
|
16
|
+
var isSearchToggle = sourceClass.match('search-toggle')
|
16
17
|
|
17
18
|
if (targetClass.indexOf('js-visible') !== -1) {
|
18
19
|
target.setAttribute('class', targetClass.replace(/(^|\s)js-visible(\s|$)/, ''))
|
@@ -21,10 +22,14 @@
|
|
21
22
|
}
|
22
23
|
if (sourceClass.indexOf('js-visible') !== -1) {
|
23
24
|
this.setAttribute('class', sourceClass.replace(/(^|\s)js-visible(\s|$)/, ''))
|
24
|
-
|
25
|
+
if (isSearchToggle) {
|
26
|
+
this.innerText = 'Show search'
|
27
|
+
}
|
25
28
|
} else {
|
26
29
|
this.setAttribute('class', sourceClass + ' js-visible')
|
27
|
-
|
30
|
+
if (isSearchToggle) {
|
31
|
+
this.innerText = 'Hide search'
|
32
|
+
}
|
28
33
|
}
|
29
34
|
this.setAttribute('aria-expanded', this.getAttribute('aria-expanded') !== 'true')
|
30
35
|
target.setAttribute('aria-hidden', target.getAttribute('aria-hidden') === 'false')
|
@@ -15,7 +15,7 @@
|
|
15
15
|
%>
|
16
16
|
<% if items.any? %>
|
17
17
|
<% unless within_multitype_list %>
|
18
|
-
<
|
18
|
+
<ul class="<%= classes %>">
|
19
19
|
<% end %>
|
20
20
|
<% items.each do |item| %>
|
21
21
|
<% highlight_class = " gem-c-document-list__item--highlight" if item[:highlight] %>
|
@@ -112,6 +112,6 @@
|
|
112
112
|
</li>
|
113
113
|
<% end %>
|
114
114
|
<% unless within_multitype_list %>
|
115
|
-
</
|
115
|
+
</ul>
|
116
116
|
<% end %>
|
117
117
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 21.66.
|
4
|
+
version: 21.66.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|