govuk_admin_template 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.1.0
2
+
3
+ * Upgrade to JQuery 1.11.1
4
+ * Upgrade to Bootstrap 3.2
5
+
1
6
  # 1.0.5
2
7
 
3
8
  * Tweak to size of inputs when using input helper classes
@@ -1,3 +1,4 @@
1
+ @import 'govuk_admin_template/bootstrap_colour_overrides'; //Needs to be set before Bootstrap import
1
2
  @import 'bootstrap';
2
3
  @import 'govuk_admin_template/theme';
3
4
  @import 'govuk_admin_template/mixins';
@@ -0,0 +1,8 @@
1
+ /*
2
+ Bootstrap 3.2 made gray-light darker for accessibility and contrast:
3
+ https://github.com/twbs/bootstrap/releases/tag/v3.2.0
4
+
5
+ This assumed gray-light was on a light background. We aren't always
6
+ using it in that way. Reset to the original value #999.
7
+ */
8
+ $gray-light: lighten(#000, 60%);
@@ -6,7 +6,7 @@
6
6
  </h1>
7
7
  </div>
8
8
 
9
- <p class="lead">Admin app UIs are powered by <a href="http://getbootstrap.com/css/">bootstrap 3.1</a>, using <a href="https://github.com/twbs/bootstrap-sass/tree/v3.1.0">bootstrap SASS</a> v3.1.0 (<a href="https://github.com/twbs/bootstrap-sass/blob/v3.1.0/vendor/assets/stylesheets/bootstrap/_mixins.scss">mixins</a>), but maintaining bootstrap 2 button styles. This guide documents how we use bootstrap, where the apps have diverged from default styles and any custom styles needed to fill in the gaps.</p>
9
+ <p class="lead">Admin app UIs are powered by <a href="http://getbootstrap.com/css/">bootstrap 3.2</a>, using <a href="https://github.com/twbs/bootstrap-sass/tree/v3.2.0">bootstrap SASS</a> v3.2.0 (<a href="https://github.com/twbs/bootstrap-sass/blob/v3.2.0/assets/stylesheets/bootstrap/_mixins.scss">mixins</a>), but maintaining bootstrap 2 button styles. This guide documents how we use bootstrap, where the apps have diverged from default styles and any custom styles needed to fill in the gaps.</p>
10
10
 
11
11
  <h2>Grid</h2>
12
12
  <p class="lead">Apps use the <a href="http://getbootstrap.com/css/#grid">default bootstrap</a> <strong>12 column scaleable responsive grid</strong>.</p>
@@ -93,19 +93,34 @@
93
93
  <a href="#" class="btn btn-link">Link</a>
94
94
  </div>
95
95
  </div>
96
+ <h3 class="add-vertical-margins">Which button style should be used</h3>
96
97
  <div class="row">
97
- <p class="col-md-6 lead">Create and success actions use <code>btn-success</code>.</p>
98
+ <p class="col-md-6 lead">Start with <code>btn-default</code>. Buttons should always be the default grey unless there is a good reason otherwise. Buttons that initiate a user action (ie lead to a form, pop-up a modal) should be grey.</p>
99
+ <div class="col-md-6">
100
+ <a href="#" class="btn btn-default">
101
+ Open modal
102
+ </a>
103
+ <a href="#" class="btn btn-default">
104
+ Filter items
105
+ </a>
106
+ </div>
107
+ </div>
108
+ <div class="row">
109
+ <p class="col-md-6 lead">When submitting a form that will create or update items use <code>btn-success</code>.</p>
98
110
  <div class="col-md-6">
99
111
  <a href="#" class="btn btn-success">
100
- Save mapping
112
+ Save item
101
113
  </a>
102
114
  </div>
103
115
  </div>
104
116
  <div class="row">
105
- <p class="col-md-6 lead">When adding an item include an <code>icon-plus</code> icon.</p>
117
+ <p class="col-md-6 lead">When a form has a submit button and a cancel button they must be different with adequate space between them.</p>
106
118
  <div class="col-md-6">
107
- <a href="#" class="btn btn-default">
108
- <i class="glyphicon glyphicon-plus"></i> Add mapping
119
+ <a href="#" class="btn btn-default add-right-margin">
120
+ Cancel
121
+ </a>
122
+ <a href="#" class="btn btn-success">
123
+ Save item
109
124
  </a>
110
125
  </div>
111
126
  </div>
@@ -173,7 +188,7 @@
173
188
 
174
189
  <p>The second example shows a table with selectable rows. Selected rows highlight in yellow. The checkbox in the header selects all rows.</p>
175
190
  </div>
176
- <ul class="col-md-6">
191
+ <div class="col-md-6">
177
192
  <table class="table table-bordered table-hover">
178
193
  <thead>
179
194
  <tr class="table-header">
@@ -183,17 +198,17 @@
183
198
  <th>Secondary header</th>
184
199
  </tr>
185
200
  </thead>
186
- <tbody>
187
- <tr>
188
- <td>Typical row</td>
189
- </tr>
190
- <tr>
191
- <td>Typical row</td>
192
- </tr>
193
- </tbody>
201
+ <tbody>
202
+ <tr>
203
+ <td>Typical row</td>
204
+ </tr>
205
+ <tr>
206
+ <td>Typical row</td>
207
+ </tr>
208
+ </tbody>
194
209
  </table>
195
210
 
196
- <table class="table table-bordered table-hover" data-module="selectable-table">
211
+ <table class="table table-bordered" data-module="selectable-table">
197
212
  <thead>
198
213
  <tr class="table-header">
199
214
  <th></th>
@@ -225,7 +240,7 @@
225
240
  <td class="selectable-row">
226
241
  <div class="relative">
227
242
  <label>
228
- <input type="checkbox" />
243
+ <input type="checkbox" class="js-toggle-row" />
229
244
  </label>
230
245
  </div>
231
246
  </td>
@@ -233,7 +248,44 @@
233
248
  </tr>
234
249
  </tbody>
235
250
  </table>
236
- </ul>
251
+ </div>
252
+ </div>
253
+ <div class="row">
254
+ <div class="col-md-6 lead">
255
+ <p>Using the <code>filterable-table</code> <a href="https://github.com/alphagov/govuk_admin_template/blob/master/app/assets/javascripts/govuk-admin-template/modules/filterable_table.js">module</a> table rows can be filtered. The module performs a simple match against the content of each row, if there’s no match the row is hidden.</p>
256
+ </div>
257
+ <div class="col-md-6">
258
+ <table class="table table-bordered table-hover" data-module="filterable-table">
259
+ <thead>
260
+ <tr class="table-header">
261
+ <th>Primary header</th>
262
+ <th style="width: 80px">Number</th>
263
+ </tr>
264
+ <tr class="if-no-js-hide table-header-secondary">
265
+ <td colspan="2">
266
+ <form>
267
+ <label for="table-filter" class="rm">Filter organisations</label>
268
+ <input id="table-filter" type="text" class="form-control normal js-filter-table-input" placeholder="Filter table">
269
+ </form>
270
+ </td>
271
+ </tr>
272
+ </thead>
273
+ <tbody>
274
+ <tr>
275
+ <td>Apples</td>
276
+ <td>100</td>
277
+ </tr>
278
+ <tr>
279
+ <td>Bananas</td>
280
+ <td>25</td>
281
+ </tr>
282
+ <tr>
283
+ <td>Peaches</td>
284
+ <td>13</td>
285
+ </tr>
286
+ </tbody>
287
+ </table>
288
+ </div>
237
289
  </div>
238
290
  <hr>
239
291
 
@@ -415,11 +467,11 @@
415
467
  </div>
416
468
  </div>
417
469
  <div class="col-md-4">
418
- <div class="highlight highlight-turquoise">
419
- <p class="big-message">Turquoise &amp; Live</p>
470
+ <div class="highlight highlight-turquoise add-bottom-margin">
471
+ <p class="big-message">Turquoise</p>
420
472
  </div>
421
473
  <div class="highlight highlight-orange">
422
- <p class="big-message">Orange &amp; Pre-transition</p>
474
+ <p class="big-message">Orange</p>
423
475
  </div>
424
476
  </div>
425
477
  </div>
@@ -427,9 +479,9 @@
427
479
 
428
480
  <h2>No content</h2>
429
481
  <div class="row">
430
- <p class="col-md-6 lead">A large but light style which applies to the empty state, eg when there are no mappings or hits. The bordered version mimics bootstrap table styles.</p>
482
+ <p class="col-md-6 lead">A large but light style which applies to the empty state. The bordered version mimics bootstrap table styles.</p>
431
483
  <div class="col-md-6">
432
- <p class="no-content">No mappings available</p>
484
+ <p class="no-content">No items available</p>
433
485
  <p class="no-content no-content-bordered">Bordered message</p>
434
486
  <p class="no-content">A longer, multi-line no content message. Do labore et <a href="<%= @normal_link_href %>">dolore magna aliqua</a>.</p>
435
487
  </div>
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "1.0.5"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_admin_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-04 00:00:00.000000000 Z
12
+ date: 2014-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 3.1.0
37
+ version: 3.2.0.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 3.1.0
45
+ version: 3.2.0.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: jquery-rails
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - '='
52
52
  - !ruby/object:Gem::Version
53
- version: 3.0.4
53
+ version: 3.1.1
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.4
61
+ version: 3.1.1
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rails
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -139,6 +139,22 @@ dependencies:
139
139
  - - '='
140
140
  - !ruby/object:Gem::Version
141
141
  version: 1.3.1
142
+ - !ruby/object:Gem::Dependency
143
+ name: jasmine
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - '='
148
+ - !ruby/object:Gem::Version
149
+ version: 2.0.2
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - '='
156
+ - !ruby/object:Gem::Version
157
+ version: 2.0.2
142
158
  description: Styles, scripts and templates for GOV.UK admin applications
143
159
  email:
144
160
  - govuk-dev@digital.cabinet-office.gov.uk
@@ -155,6 +171,7 @@ files:
155
171
  - app/assets/stylesheets/govuk_admin_template/bootstrap-ie7.scss
156
172
  - app/assets/stylesheets/govuk_admin_template/style_guide.css.scss
157
173
  - app/assets/stylesheets/govuk_admin_template/navbar.css.scss
174
+ - app/assets/stylesheets/govuk_admin_template/bootstrap_colour_overrides.css.scss
158
175
  - app/assets/stylesheets/govuk_admin_template/toggles.css.scss
159
176
  - app/assets/stylesheets/govuk_admin_template/base.css.scss
160
177
  - app/assets/stylesheets/govuk_admin_template/buttons.css.scss
@@ -202,7 +219,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
219
  version: '0'
203
220
  segments:
204
221
  - 0
205
- hash: 2116947858523364151
222
+ hash: 2496046958828964519
206
223
  required_rubygems_version: !ruby/object:Gem::Requirement
207
224
  none: false
208
225
  requirements:
@@ -211,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
228
  version: '0'
212
229
  segments:
213
230
  - 0
214
- hash: 2116947858523364151
231
+ hash: 2496046958828964519
215
232
  requirements: []
216
233
  rubyforge_project:
217
234
  rubygems_version: 1.8.23