govuk_admin_template 2.4.0 → 2.5.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dcd6d554293f6eb45fa6666b54ee2066b517c50
|
4
|
+
data.tar.gz: 4f965d6a42d966acb878a495d886d25cb743e339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 364d87846817a5f58d08d2a91bcba0e4abdbec0817c72edc72b0e236137af6de8febb1798e35417feb91a282c61ed3597e3b3069fbe94593fb6b89d07998de4f
|
7
|
+
data.tar.gz: 6d08370f1075f350aa38c17f138283d522947f9ccad72b7b3e903bb1997a018ce1723ec4f2bead3c2827cb86667cb4d7cc7572cd1713f11545156c185c8d5955
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -82,7 +82,8 @@ The gem [uses nested layouts](http://guides.rubyonrails.org/layouts_and_renderin
|
|
82
82
|
`:footer_top` (optional) | Footer content before copyright text
|
83
83
|
`:footer_version` (optional) | Text indicating the release, eg commit SHA
|
84
84
|
`:body_end` (optional) | Just before the `</body>` tag
|
85
|
-
`:full_width` (optional, boolean) | Expand content to edges of screen.
|
85
|
+
`:full_width` (optional, boolean) | Expand content to edges of screen.
|
86
|
+
`:exclude_analytics` (optional, boolean) | Don’t use the default Google Analytics snippet and profile.
|
86
87
|
`:navbar` (optional) | Custom navbar content, overrides default navbar
|
87
88
|
|
88
89
|
Example navbar_items:
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
function filterTableBasedOnInput(event) {
|
22
22
|
var searchString = $.trim(tableInput.val()),
|
23
|
-
regExp = new RegExp(searchString, 'i');
|
23
|
+
regExp = new RegExp(escapeStringForRegexp(searchString), 'i');
|
24
24
|
|
25
25
|
rows.each(function() {
|
26
26
|
var row = $(this);
|
@@ -37,6 +37,13 @@
|
|
37
37
|
var link = element.find('a.js-open-on-submit:visible').first();
|
38
38
|
GOVUKAdmin.redirect(link.attr('href'));
|
39
39
|
}
|
40
|
+
|
41
|
+
// http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
|
42
|
+
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/regexp
|
43
|
+
// Escape ~!@#$%^&*(){}[]`/=?+\|-_;:'",<.>
|
44
|
+
function escapeStringForRegexp(str) {
|
45
|
+
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
46
|
+
}
|
40
47
|
}
|
41
48
|
};
|
42
49
|
|
@@ -96,17 +96,19 @@
|
|
96
96
|
</footer>
|
97
97
|
</section>
|
98
98
|
<%= yield :body_end %>
|
99
|
-
<%
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
99
|
+
<% unless content_for?(:exclude_analytics) %>
|
100
|
+
<% if Rails.env.production? %>
|
101
|
+
<script class="analytics">
|
102
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
103
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
104
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
105
|
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
105
106
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
107
|
+
ga('create', 'UA-26179049-6', 'alphagov.co.uk');
|
108
|
+
ga('set', 'anonymizeIp', true);
|
109
|
+
ga('send', 'pageview');
|
110
|
+
</script>
|
111
|
+
<% end %>
|
110
112
|
<% end %>
|
111
113
|
</body>
|
112
114
|
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_admin_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
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: 2015-07-
|
11
|
+
date: 2015-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.2.
|
195
|
+
rubygems_version: 2.2.3
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Styles, scripts and templates for GOV.UK admin applications
|