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: 9bf9f7485f017d85bcc7a495d8589ef344ec7e942536e9b0e1e572b37e36c919
4
- data.tar.gz: afab329a86f75e95926103ec746038e0e2ac6967b756985efc0d39f86a2c0b35
3
+ metadata.gz: af7d82223019f23f4e23fe004eef89ba49fb8720447e9c88243c007dee32bfed
4
+ data.tar.gz: 1453e76cefe515b3e19d0641f45da54362845eb3a6cd1f8b777a86aecd3c79f3
5
5
  SHA512:
6
- metadata.gz: 1b95b4802e4e9dbe071e1c9c24b8994cc868df9f1f949d2e6b64d78cd34ed4bc6d3db8ca742fc57c08236efd258418d91edeb85915f02c26b4658c6680e410fb
7
- data.tar.gz: 56e3f6bcddaf5fa925016960767017683b2ea100bdac40141b2440335ca3f1d3435658c4e11024ef19cd5d4beeefa897154ab86907fd25205c44438dc11df1dc
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
- this.innerText = 'Show search'
25
+ if (isSearchToggle) {
26
+ this.innerText = 'Show search'
27
+ }
25
28
  } else {
26
29
  this.setAttribute('class', sourceClass + ' js-visible')
27
- this.innerText = 'Hide search'
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
- <ol class="<%= classes %>">
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
- </ol>
115
+ </ul>
116
116
  <% end %>
117
117
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.66.1".freeze
2
+ VERSION = "21.66.2".freeze
3
3
  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.1
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-16 00:00:00.000000000 Z
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