foundation-rails 5.5.1.0 → 5.5.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/bower.json +2 -2
  2. data/lib/foundation/rails/version.rb +1 -1
  3. data/update-gem.sh +12 -7
  4. data/vendor/assets/javascripts/foundation.js +2 -2
  5. data/vendor/assets/javascripts/foundation/foundation.abide.js +62 -40
  6. data/vendor/assets/javascripts/foundation/foundation.accordion.js +7 -7
  7. data/vendor/assets/javascripts/foundation/foundation.alert.js +3 -3
  8. data/vendor/assets/javascripts/foundation/foundation.clearing.js +46 -48
  9. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +71 -62
  10. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +18 -14
  11. data/vendor/assets/javascripts/foundation/foundation.interchange.js +31 -25
  12. data/vendor/assets/javascripts/foundation/foundation.joyride.js +81 -73
  13. data/vendor/assets/javascripts/foundation/foundation.js +54 -41
  14. data/vendor/assets/javascripts/foundation/foundation.magellan.js +44 -39
  15. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +19 -19
  16. data/vendor/assets/javascripts/foundation/foundation.orbit.js +133 -129
  17. data/vendor/assets/javascripts/foundation/foundation.reveal.js +73 -51
  18. data/vendor/assets/javascripts/foundation/foundation.slider.js +63 -67
  19. data/vendor/assets/javascripts/foundation/foundation.tab.js +39 -19
  20. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +30 -23
  21. data/vendor/assets/javascripts/foundation/foundation.topbar.js +66 -59
  22. data/vendor/assets/stylesheets/foundation/_functions.scss +1 -1
  23. data/vendor/assets/stylesheets/foundation/_settings.scss +99 -77
  24. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +2 -2
  25. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +1 -0
  26. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +1 -1
  27. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +7 -4
  28. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +2 -1
  29. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +11 -2
  30. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +1 -0
  31. data/vendor/assets/stylesheets/foundation/components/_forms.scss +13 -6
  32. data/vendor/assets/stylesheets/foundation/components/_global.scss +3 -3
  33. data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +32 -2
  34. data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +6 -4
  35. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +15 -29
  36. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +12 -0
  37. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +1 -2
  38. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +3 -1
  39. data/vendor/assets/stylesheets/foundation/components/_toolbar.scss +3 -1
  40. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +10 -3
  41. data/vendor/assets/stylesheets/foundation/components/_type.scss +1 -62
  42. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +78 -12
  43. metadata +2 -3
  44. data/vendor/assets/_settings.scss +0 -1445
data/bower.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "foundation-rails",
3
- "version": "5.5.0.0",
3
+ "version": "5.5.1.1",
4
4
  "dependencies": {
5
- "foundation": "5.5.0"
5
+ "foundation": "5.5.1"
6
6
  }
7
7
  }
@@ -1,5 +1,5 @@
1
1
  module Foundation
2
2
  module Rails
3
- VERSION = "5.5.1.0"
3
+ VERSION = "5.5.1.1"
4
4
  end
5
5
  end
data/update-gem.sh CHANGED
@@ -1,13 +1,18 @@
1
1
  #! /bin/sh
2
2
 
3
+ # clean old version
4
+ rm -rf vendor
5
+ mkdir -p vendor/assets/javascripts/vendor vendor/assets/stylesheets
6
+
7
+ # update assets
3
8
  bower install
4
- rm -rf vendor/assets/javascripts/vendor
5
- rm -rf vendor/assets/stylesheets
6
- mkdir -p vendor/assets/javascripts/vendor
7
- mkdir -p vendor/assets/stylesheets
8
9
  cp bower_components/modernizr/modernizr.js vendor/assets/javascripts/vendor/.
9
10
  cp -R bower_components/foundation/js/foundation/ vendor/assets/javascripts/foundation/
10
- cp -R bower_components/foundation/scss/ vendor/assets/stylesheets/
11
- cp bower_components/foundation/scss/foundation/_settings.scss vendor/assets/.
11
+ cp -R bower_components/foundation/scss/* vendor/assets/stylesheets/
12
+
13
+ # create vendor/assets/javascripts/foundation.js (rails inclusions //=require foundation, ...)
14
+ cd vendor/assets/javascripts
15
+ for f in foundation/*.js; do echo "//= require $f" | sed 's/.js//' >> foundation.js ; done
16
+
17
+ # echo "Now update version.rb"
12
18
 
13
- # echo "Now update version.rb"
@@ -1,11 +1,12 @@
1
- //= require foundation/foundation
2
1
  //= require foundation/foundation.abide
3
2
  //= require foundation/foundation.accordion
4
3
  //= require foundation/foundation.alert
5
4
  //= require foundation/foundation.clearing
6
5
  //= require foundation/foundation.dropdown
6
+ //= require foundation/foundation.equalizer
7
7
  //= require foundation/foundation.interchange
8
8
  //= require foundation/foundation.joyride
9
+ //= require foundation/foundation
9
10
  //= require foundation/foundation.magellan
10
11
  //= require foundation/foundation.offcanvas
11
12
  //= require foundation/foundation.orbit
@@ -14,4 +15,3 @@
14
15
  //= require foundation/foundation.tab
15
16
  //= require foundation/foundation.tooltip
16
17
  //= require foundation/foundation.topbar
17
- //= require foundation/foundation.equalizer
@@ -4,20 +4,20 @@
4
4
  Foundation.libs.abide = {
5
5
  name : 'abide',
6
6
 
7
- version : '5.5.0',
7
+ version : '5.5.1',
8
8
 
9
9
  settings : {
10
10
  live_validate : true,
11
- validate_on_blur: true,
11
+ validate_on_blur : true,
12
12
  focus_on_invalid : true,
13
- error_labels: true, // labels with a for="inputId" will recieve an `error` class
14
- error_class: 'error',
13
+ error_labels : true, // labels with a for="inputId" will recieve an `error` class
14
+ error_class : 'error',
15
15
  timeout : 1000,
16
16
  patterns : {
17
- alpha: /^[a-zA-Z]+$/,
17
+ alpha : /^[a-zA-Z]+$/,
18
18
  alpha_numeric : /^[a-zA-Z0-9]+$/,
19
- integer: /^[-+]?\d+$/,
20
- number: /^[-+]?\d*(?:[\.\,]\d+)?$/,
19
+ integer : /^[-+]?\d+$/,
20
+ number : /^[-+]?\d*(?:[\.\,]\d+)?$/,
21
21
 
22
22
  // amex, visa, diners
23
23
  card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
@@ -26,26 +26,26 @@
26
26
  // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
27
27
  email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
28
28
 
29
- url: /^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
29
+ url : /^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
30
30
  // abc.de
31
- domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,
31
+ domain : /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,
32
32
 
33
- datetime: /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
33
+ datetime : /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
34
34
  // YYYY-MM-DD
35
- date: /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
35
+ date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
36
36
  // HH:MM:SS
37
37
  time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
38
- dateISO: /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
38
+ dateISO : /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
39
39
  // MM/DD/YYYY
40
40
  month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
41
41
  // DD/MM/YYYY
42
42
  day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,
43
43
 
44
44
  // #FFF or #FFFFFF
45
- color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
45
+ color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
46
46
  },
47
47
  validators : {
48
- equalTo: function(el, required, parent) {
48
+ equalTo : function (el, required, parent) {
49
49
  var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
50
50
  to = el.value,
51
51
  valid = (from === to);
@@ -74,7 +74,7 @@
74
74
  var is_ajax = /ajax/i.test(self.S(this).attr(self.attr_name()));
75
75
  return self.validate(self.S(this).find('input, textarea, select').get(), e, is_ajax);
76
76
  })
77
- .on('reset', function() {
77
+ .on('reset', function () {
78
78
  return self.reset($(this));
79
79
  })
80
80
  .find('input, textarea, select')
@@ -107,9 +107,11 @@
107
107
  submit_event = /submit/.test(e.type);
108
108
 
109
109
  // Has to count up to make sure the focus gets applied to the top error
110
- for (var i=0; i < validation_count; i++) {
110
+ for (var i = 0; i < validation_count; i++) {
111
111
  if (!validations[i] && (submit_event || is_ajax)) {
112
- if (this.settings.focus_on_invalid) els[i].focus();
112
+ if (this.settings.focus_on_invalid) {
113
+ els[i].focus();
114
+ }
113
115
  form.trigger('invalid').trigger('invalid.fndtn.abide');
114
116
  this.S(els[i]).closest('form').attr(this.invalid_attr, '');
115
117
  return false;
@@ -122,7 +124,9 @@
122
124
 
123
125
  form.removeAttr(this.invalid_attr);
124
126
 
125
- if (is_ajax) return false;
127
+ if (is_ajax) {
128
+ return false;
129
+ }
126
130
 
127
131
  return true;
128
132
  },
@@ -171,8 +175,8 @@
171
175
  value = el.value.trim(),
172
176
  direct_parent = this.S(el).parent(),
173
177
  validator = el.getAttribute(this.add_namespace('data-abide-validator')),
174
- is_radio = el.type === "radio",
175
- is_checkbox = el.type === "checkbox",
178
+ is_radio = el.type === 'radio',
179
+ is_checkbox = el.type === 'checkbox',
176
180
  label = this.S('label[for="' + el.getAttribute('id') + '"]'),
177
181
  valid_length = (required) ? (el.value.length > 0) : true,
178
182
  el_validations = [];
@@ -180,7 +184,7 @@
180
184
  var parent, valid;
181
185
 
182
186
  // support old way to do equalTo validations
183
- if(el.getAttribute(this.add_namespace('data-equalto'))) { validator = "equalTo" }
187
+ if (el.getAttribute(this.add_namespace('data-equalto'))) { validator = 'equalTo' }
184
188
 
185
189
  if (!direct_parent.is('label')) {
186
190
  parent = direct_parent;
@@ -206,9 +210,9 @@
206
210
  el_validations.push(false);
207
211
  }
208
212
 
209
- el_validations = [el_validations.every(function(valid){return valid;})];
213
+ el_validations = [el_validations.every(function (valid) {return valid;})];
210
214
 
211
- if(el_validations[0]){
215
+ if (el_validations[0]) {
212
216
  this.S(el).removeAttr(this.invalid_attr);
213
217
  el.setAttribute('aria-invalid', 'false');
214
218
  el.removeAttribute('aria-describedby');
@@ -222,9 +226,11 @@
222
226
  el.setAttribute('aria-invalid', 'true');
223
227
 
224
228
  // Try to find the error associated with the input
225
- var errorElem = parent.find('small.'+this.settings.error_class, 'span.'+this.settings.error_class);
226
- var errorID = errorElem.length > 0 ? errorElem[0].id : "";
227
- if (errorID.length > 0) el.setAttribute('aria-describedby', errorID);
229
+ var errorElem = parent.find('small.' + this.settings.error_class, 'span.' + this.settings.error_class);
230
+ var errorID = errorElem.length > 0 ? errorElem[0].id : '';
231
+ if (errorID.length > 0) {
232
+ el.setAttribute('aria-describedby', errorID);
233
+ }
228
234
 
229
235
  // el.setAttribute('aria-describedby', $(el).find('.error')[0].id);
230
236
  parent.addClass(this.settings.error_class);
@@ -236,13 +242,13 @@
236
242
  }
237
243
  validations.push(el_validations[0]);
238
244
  }
239
- validations = [validations.every(function(valid){return valid;})];
245
+ validations = [validations.every(function (valid) {return valid;})];
240
246
  return validations;
241
247
  },
242
248
 
243
- valid_checkbox : function(el, required) {
249
+ valid_checkbox : function (el, required) {
244
250
  var el = this.S(el),
245
- valid = (el.is(':checked') || !required);
251
+ valid = (el.is(':checked') || !required || el.get(0).getAttribute('disabled'));
246
252
 
247
253
  if (valid) {
248
254
  el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
@@ -255,17 +261,29 @@
255
261
 
256
262
  valid_radio : function (el, required) {
257
263
  var name = el.getAttribute('name'),
258
- group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='"+name+"']"),
264
+ group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='" + name + "']"),
259
265
  count = group.length,
260
- valid = false;
266
+ valid = false,
267
+ disabled = false;
261
268
 
262
269
  // Has to count up to make sure the focus gets applied to the top error
263
- for (var i=0; i < count; i++) {
264
- if (group[i].checked) valid = true;
265
- }
270
+ for (var i=0; i < count; i++) {
271
+ if( group[i].getAttribute('disabled') ){
272
+ disabled=true;
273
+ valid=true;
274
+ } else {
275
+ if (group[i].checked){
276
+ valid = true;
277
+ } else {
278
+ if( disabled ){
279
+ valid = false;
280
+ }
281
+ }
282
+ }
283
+ }
266
284
 
267
285
  // Has to count up to make sure the focus gets applied to the top error
268
- for (var i=0; i < count; i++) {
286
+ for (var i = 0; i < count; i++) {
269
287
  if (valid) {
270
288
  this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
271
289
  } else {
@@ -276,7 +294,7 @@
276
294
  return valid;
277
295
  },
278
296
 
279
- valid_equal: function(el, required, parent) {
297
+ valid_equal : function (el, required, parent) {
280
298
  var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
281
299
  to = el.value,
282
300
  valid = (from === to);
@@ -284,17 +302,21 @@
284
302
  if (valid) {
285
303
  this.S(el).removeAttr(this.invalid_attr);
286
304
  parent.removeClass(this.settings.error_class);
287
- if (label.length > 0 && settings.error_labels) label.removeClass(this.settings.error_class);
305
+ if (label.length > 0 && settings.error_labels) {
306
+ label.removeClass(this.settings.error_class);
307
+ }
288
308
  } else {
289
309
  this.S(el).attr(this.invalid_attr, '');
290
310
  parent.addClass(this.settings.error_class);
291
- if (label.length > 0 && settings.error_labels) label.addClass(this.settings.error_class);
311
+ if (label.length > 0 && settings.error_labels) {
312
+ label.addClass(this.settings.error_class);
313
+ }
292
314
  }
293
315
 
294
316
  return valid;
295
317
  },
296
318
 
297
- valid_oneof: function(el, required, parent, doNotValidateOthers) {
319
+ valid_oneof : function (el, required, parent, doNotValidateOthers) {
298
320
  var el = this.S(el),
299
321
  others = this.S('[' + this.add_namespace('data-oneof') + ']'),
300
322
  valid = others.filter(':checked').length > 0;
@@ -307,7 +329,7 @@
307
329
 
308
330
  if (!doNotValidateOthers) {
309
331
  var _this = this;
310
- others.each(function() {
332
+ others.each(function () {
311
333
  _this.valid_oneof.call(_this, this, null, null, true);
312
334
  });
313
335
  }
@@ -4,13 +4,13 @@
4
4
  Foundation.libs.accordion = {
5
5
  name : 'accordion',
6
6
 
7
- version : '5.5.0',
7
+ version : '5.5.1',
8
8
 
9
9
  settings : {
10
- content_class: 'content',
11
- active_class: 'active',
12
- multi_expand: false,
13
- toggleable: true,
10
+ content_class : 'content',
11
+ active_class : 'active',
12
+ multi_expand : false,
13
+ toggleable : true,
14
14
  callback : function () {}
15
15
  },
16
16
 
@@ -29,13 +29,13 @@
29
29
  settings = accordion.data(self.attr_name(true) + '-init') || self.settings,
30
30
  target = S('#' + this.href.split('#')[1]),
31
31
  aunts = $('> .accordion-navigation', accordion),
32
- siblings = aunts.children('.'+settings.content_class),
32
+ siblings = aunts.children('.' + settings.content_class),
33
33
  active_content = siblings.filter('.' + settings.active_class);
34
34
 
35
35
  e.preventDefault();
36
36
 
37
37
  if (accordion.attr(self.attr_name())) {
38
- siblings = siblings.add('[' + groupSelector + '] dd > '+'.'+settings.content_class);
38
+ siblings = siblings.add('[' + groupSelector + '] dd > ' + '.' + settings.content_class);
39
39
  aunts = aunts.add('[' + groupSelector + '] .accordion-navigation');
40
40
  }
41
41
 
@@ -4,10 +4,10 @@
4
4
  Foundation.libs.alert = {
5
5
  name : 'alert',
6
6
 
7
- version : '5.5.0',
7
+ version : '5.5.1',
8
8
 
9
9
  settings : {
10
- callback: function (){}
10
+ callback : function () {}
11
11
  },
12
12
 
13
13
  init : function (scope, method, options) {
@@ -25,7 +25,7 @@
25
25
  e.preventDefault();
26
26
  if (Modernizr.csstransitions) {
27
27
  alertBox.addClass('alert-close');
28
- alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
28
+ alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function (e) {
29
29
  S(this).trigger('close').trigger('close.fndtn.alert').remove();
30
30
  settings.callback();
31
31
  });
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.clearing = {
5
5
  name : 'clearing',
6
6
 
7
- version: '5.5.0',
7
+ version : '5.5.1',
8
8
 
9
9
  settings : {
10
10
  templates : {
@@ -16,7 +16,7 @@
16
16
 
17
17
  // comma delimited list of selectors that, on click, will close clearing,
18
18
  // add 'div.clearing-blackout, div.visible-img' to close on background click
19
- close_selectors : '.clearing-close, div.clearing-blackout',
19
+ close_selectors : '.clearing-close, div.clearing-blackout',
20
20
 
21
21
  // Default to the entire li element.
22
22
  open_selectors : '',
@@ -107,23 +107,27 @@
107
107
  S = self.S;
108
108
 
109
109
  S(this.scope)
110
- .on('touchstart.fndtn.clearing', '.visible-img', function(e) {
110
+ .on('touchstart.fndtn.clearing', '.visible-img', function (e) {
111
111
  if (!e.touches) { e = e.originalEvent; }
112
112
  var data = {
113
- start_page_x: e.touches[0].pageX,
114
- start_page_y: e.touches[0].pageY,
115
- start_time: (new Date()).getTime(),
116
- delta_x: 0,
117
- is_scrolling: undefined
113
+ start_page_x : e.touches[0].pageX,
114
+ start_page_y : e.touches[0].pageY,
115
+ start_time : (new Date()).getTime(),
116
+ delta_x : 0,
117
+ is_scrolling : undefined
118
118
  };
119
119
 
120
120
  S(this).data('swipe-transition', data);
121
121
  e.stopPropagation();
122
122
  })
123
- .on('touchmove.fndtn.clearing', '.visible-img', function(e) {
124
- if (!e.touches) { e = e.originalEvent; }
123
+ .on('touchmove.fndtn.clearing', '.visible-img', function (e) {
124
+ if (!e.touches) {
125
+ e = e.originalEvent;
126
+ }
125
127
  // Ignore pinch/zoom events
126
- if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
128
+ if (e.touches.length > 1 || e.scale && e.scale !== 1) {
129
+ return;
130
+ }
127
131
 
128
132
  var data = S(this).data('swipe-transition');
129
133
 
@@ -148,7 +152,7 @@
148
152
  self.nav(e, direction);
149
153
  }
150
154
  })
151
- .on('touchend.fndtn.clearing', '.visible-img', function(e) {
155
+ .on('touchend.fndtn.clearing', '.visible-img', function (e) {
152
156
  S(this).data('swipe-transition', {});
153
157
  e.stopPropagation();
154
158
  });
@@ -160,7 +164,7 @@
160
164
  if ($el.parent().hasClass('carousel')) {
161
165
  return;
162
166
  }
163
-
167
+
164
168
  $el.after('<div id="foundationClearingHolder"></div>');
165
169
 
166
170
  var grid = $el.detach(),
@@ -171,12 +175,12 @@
171
175
  } else {
172
176
  grid_outerHTML = grid[0].outerHTML;
173
177
  }
174
-
178
+
175
179
  var holder = this.S('#foundationClearingHolder'),
176
180
  settings = $el.data(this.attr_name(true) + '-init'),
177
181
  data = {
178
- grid: '<div class="carousel">' + grid_outerHTML + '</div>',
179
- viewing: settings.templates.viewing
182
+ grid : '<div class="carousel">' + grid_outerHTML + '</div>',
183
+ viewing : settings.templates.viewing
180
184
  },
181
185
  wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
182
186
  data.grid + '</div></div>',
@@ -200,7 +204,7 @@
200
204
  error = false;
201
205
 
202
206
  // Event to disable scrolling on touch devices when Clearing is activated
203
- $('body').on('touchmove',function(e){
207
+ $('body').on('touchmove', function (e) {
204
208
  e.preventDefault();
205
209
  });
206
210
 
@@ -272,7 +276,7 @@
272
276
  .removeClass('clearing-blackout');
273
277
  container.removeClass('clearing-container');
274
278
  visible_image.hide();
275
- visible_image.trigger('closed.fndtn.clearing');
279
+ visible_image.trigger('closed.fndtn.clearing');
276
280
  }
277
281
 
278
282
  // Event to re-enable scrolling on touch devices
@@ -291,9 +295,15 @@
291
295
  PREV_KEY = this.rtl ? 39 : 37,
292
296
  ESC_KEY = 27;
293
297
 
294
- if (e.which === NEXT_KEY) this.go(clearing, 'next');
295
- if (e.which === PREV_KEY) this.go(clearing, 'prev');
296
- if (e.which === ESC_KEY) this.S('a.clearing-close').trigger('click').trigger('click.fndtn.clearing');
298
+ if (e.which === NEXT_KEY) {
299
+ this.go(clearing, 'next');
300
+ }
301
+ if (e.which === PREV_KEY) {
302
+ this.go(clearing, 'prev');
303
+ }
304
+ if (e.which === ESC_KEY) {
305
+ this.S('a.clearing-close').trigger('click').trigger('click.fndtn.clearing');
306
+ }
297
307
  },
298
308
 
299
309
  nav : function (e, direction) {
@@ -352,34 +362,18 @@
352
362
  },
353
363
 
354
364
  center_and_label : function (target, label) {
355
- if (!this.rtl) {
356
- target.css({
357
- marginLeft : -(target.outerWidth() / 2),
358
- marginTop : -(target.outerHeight() / 2)
365
+ if (!this.rtl && label.length > 0) {
366
+ label.css({
367
+ marginLeft : -(label.outerWidth() / 2),
368
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
359
369
  });
360
-
361
- if (label.length > 0) {
362
- label.css({
363
- marginLeft : -(label.outerWidth() / 2),
364
- marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
365
- });
366
- }
367
370
  } else {
368
- target.css({
369
- marginRight : -(target.outerWidth() / 2),
370
- marginTop : -(target.outerHeight() / 2),
371
+ label.css({
372
+ marginRight : -(label.outerWidth() / 2),
373
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
371
374
  left: 'auto',
372
375
  right: '50%'
373
376
  });
374
-
375
- if (label.length > 0) {
376
- label.css({
377
- marginRight : -(label.outerWidth() / 2),
378
- marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
379
- left: 'auto',
380
- right: '50%'
381
- });
382
- }
383
377
  }
384
378
  return this;
385
379
  },
@@ -397,7 +391,9 @@
397
391
 
398
392
  this.preload($image);
399
393
 
400
- if (href) return href;
394
+ if (href) {
395
+ return href;
396
+ }
401
397
  return $image.attr('src');
402
398
  },
403
399
 
@@ -436,7 +432,7 @@
436
432
  .hide();
437
433
  }
438
434
  return this;
439
- },
435
+ },
440
436
 
441
437
  // directional methods
442
438
 
@@ -470,7 +466,7 @@
470
466
  // we use jQuery animate instead of CSS transitions because we
471
467
  // need a callback to unlock the next animation
472
468
  // needs support for RTL **
473
- if (target.index() !== old_index && !/skip/.test(direction)){
469
+ if (target.index() !== old_index && !/skip/.test(direction)) {
474
470
  if (/left/.test(direction)) {
475
471
  this.lock();
476
472
  dir_obj[dir] = left + width;
@@ -526,7 +522,9 @@
526
522
 
527
523
  adjacent : function (current_index, target_index) {
528
524
  for (var i = target_index + 1; i >= target_index - 1; i--) {
529
- if (i === current_index) return true;
525
+ if (i === current_index) {
526
+ return true;
527
+ }
530
528
  }
531
529
  return false;
532
530
  },