foundation-rails 5.2.1.0 → 5.2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/bower.json +2 -2
  3. data/lib/foundation/rails/version.rb +1 -1
  4. data/test/dummy/Gemfile +1 -1
  5. data/vendor/assets/javascripts/foundation.js +2 -1
  6. data/vendor/assets/javascripts/foundation/foundation.abide.js +60 -19
  7. data/vendor/assets/javascripts/foundation/foundation.accordion.js +9 -5
  8. data/vendor/assets/javascripts/foundation/foundation.alert.js +13 -7
  9. data/vendor/assets/javascripts/foundation/foundation.clearing.js +19 -9
  10. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +8 -3
  11. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +7 -3
  12. data/vendor/assets/javascripts/foundation/foundation.interchange.js +5 -9
  13. data/vendor/assets/javascripts/foundation/foundation.joyride.js +10 -5
  14. data/vendor/assets/javascripts/foundation/foundation.js +29 -23
  15. data/vendor/assets/javascripts/foundation/foundation.magellan.js +15 -12
  16. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +20 -27
  17. data/vendor/assets/javascripts/foundation/foundation.orbit.js +129 -41
  18. data/vendor/assets/javascripts/foundation/foundation.reveal.js +1 -1
  19. data/vendor/assets/javascripts/foundation/foundation.slider.js +27 -14
  20. data/vendor/assets/javascripts/foundation/foundation.tab.js +19 -8
  21. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +9 -4
  22. data/vendor/assets/javascripts/foundation/foundation.topbar.js +5 -3
  23. data/vendor/assets/stylesheets/foundation/_settings.scss +69 -30
  24. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +6 -1
  25. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +19 -8
  26. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +3 -3
  27. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +4 -5
  28. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +2 -4
  29. data/vendor/assets/stylesheets/foundation/components/_forms.scss +30 -29
  30. data/vendor/assets/stylesheets/foundation/components/_global.scss +37 -76
  31. data/vendor/assets/stylesheets/foundation/components/_grid.scss +25 -26
  32. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +0 -4
  33. data/vendor/assets/stylesheets/foundation/components/_magellan.scss +2 -2
  34. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +19 -36
  35. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +126 -152
  36. data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +1 -1
  37. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +31 -14
  38. data/vendor/assets/stylesheets/foundation/components/_switch.scss +4 -30
  39. data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +0 -6
  40. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +39 -45
  41. data/vendor/assets/stylesheets/foundation/components/_type.scss +37 -125
  42. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +15 -6
  43. metadata +2 -2
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.joyride = {
7
7
  name : 'joyride',
8
8
 
9
- version : '5.2.1',
9
+ version : '5.2.2',
10
10
 
11
11
  defaults : {
12
12
  expose : false, // turn on or off the expose feature
@@ -28,6 +28,7 @@
28
28
  cookie_domain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
29
29
  cookie_expires : 365, // set when you would like the cookie to expire.
30
30
  tip_container : 'body', // Where will the tip be attached
31
+ abort_on_close : true, // When true, the close event will not fire any callback
31
32
  tip_location_patterns : {
32
33
  top: ['bottom'],
33
34
  bottom: [], // bottom should not need to be repositioned
@@ -84,7 +85,7 @@
84
85
 
85
86
  .on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
86
87
  e.preventDefault();
87
- this.end();
88
+ this.end(this.settings.abort_on_close);
88
89
  }.bind(this));
89
90
 
90
91
  $(window)
@@ -808,7 +809,7 @@
808
809
  }
809
810
  },
810
811
 
811
- end : function () {
812
+ end : function (abort) {
812
813
  if (this.settings.cookie_monster) {
813
814
  $.cookie(this.settings.cookie_name, 'ridden', { expires: this.settings.cookie_expires, domain: this.settings.cookie_domain });
814
815
  }
@@ -825,8 +826,12 @@
825
826
 
826
827
  $('.joyride-modal-bg').hide();
827
828
  this.settings.$current_tip.hide();
828
- this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
829
- this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
829
+
830
+ if (typeof abort === 'undefined') {
831
+ this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
832
+ this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
833
+ }
834
+
830
835
  $('.joyride-tip-guide').remove();
831
836
  },
832
837
 
@@ -14,8 +14,8 @@
14
14
  var head = $('head');
15
15
 
16
16
  while (i--) {
17
- if($('head').has('.' + class_array[i]).length === 0) {
18
- $('head').append('<meta class="' + class_array[i] + '" />');
17
+ if(head.has('.' + class_array[i]).length === 0) {
18
+ head.append('<meta class="' + class_array[i] + '" />');
19
19
  }
20
20
  }
21
21
  };
@@ -154,7 +154,7 @@
154
154
  https://github.com/paulirish/matchMedia.js
155
155
  */
156
156
 
157
- window.matchMedia = window.matchMedia || (function( doc, undefined ) {
157
+ window.matchMedia = window.matchMedia || (function( doc ) {
158
158
 
159
159
  "use strict";
160
160
 
@@ -246,7 +246,7 @@
246
246
  }
247
247
  } else {
248
248
  // polyfill
249
- window.requestAnimationFrame = function (callback, element) {
249
+ window.requestAnimationFrame = function (callback) {
250
250
  var currTime = new Date().getTime(),
251
251
  timeToCall = Math.max(0, 16 - (currTime - lastTime)),
252
252
  id = window.setTimeout(function () {
@@ -276,7 +276,7 @@
276
276
  window.Foundation = {
277
277
  name : 'Foundation',
278
278
 
279
- version : '5.2.1',
279
+ version : '5.2.2',
280
280
 
281
281
  media_queries : {
282
282
  small : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
@@ -289,12 +289,11 @@
289
289
  stylesheet : $('<style></style>').appendTo('head')[0].sheet,
290
290
 
291
291
  global: {
292
- namespace: ''
292
+ namespace: undefined
293
293
  },
294
294
 
295
295
  init : function (scope, libraries, method, options, response) {
296
- var library_arr,
297
- args = [scope, method, options, response],
296
+ var args = [scope, method, options, response],
298
297
  responses = [];
299
298
 
300
299
  // check RTL
@@ -332,7 +331,7 @@
332
331
  return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]);
333
332
  }
334
333
 
335
- args = args instanceof Array ? args : Array(args); // PATCH: added this line
334
+ args = args instanceof Array ? args : new Array(args); // PATCH: added this line
336
335
  return this.libs[lib].init.apply(this.libs[lib], args);
337
336
  }
338
337
 
@@ -363,19 +362,24 @@
363
362
 
364
363
  set_namespace: function () {
365
364
 
366
- // Don't bother reading the namespace out of the meta tag
367
- // if the namespace has been set globally in javascript
365
+ // Description:
366
+ // Don't bother reading the namespace out of the meta tag
367
+ // if the namespace has been set globally in javascript
368
368
  //
369
- // Example: something like Foundation.global.namespace = 'my-namespace';
369
+ // Example:
370
+ // Foundation.global.namespace = 'my-namespace';
371
+ // or make it an empty string:
372
+ // Foundation.global.namespace = '';
370
373
  //
371
- // Otherwise, if the namespace hasn't been set globally,
372
- // read it out of the meta tag
373
374
  //
374
- var namespace = this.global.namespace || $('.foundation-data-attribute-namespace').css('font-family');
375
375
 
376
- if (/false/i.test(namespace)) return;
376
+ // If the namespace has not been set (is undefined), try to read it out of the meta element.
377
+ // Otherwise use the globally defined namespace, even if it's empty ('')
378
+ var namespace = ( this.global.namespace === undefined ) ? $('.foundation-data-attribute-namespace').css('font-family') : this.global.namespace;
377
379
 
378
- this.global.namespace = namespace;
380
+ // Finally, if the namsepace is either undefined or false, set it to an empty string.
381
+ // Otherwise use the namespace value.
382
+ this.global.namespace = ( namespace === undefined || /false/i.test(namespace) ) ? '' : namespace;
379
383
  },
380
384
 
381
385
  libs : {},
@@ -415,10 +419,12 @@
415
419
  return function () {
416
420
  var context = this, args = arguments;
417
421
 
418
- clearTimeout(timer);
419
- timer = setTimeout(function () {
420
- func.apply(context, args);
421
- }, delay);
422
+ if (timer == null) {
423
+ timer = setTimeout(function () {
424
+ func.apply(context, args);
425
+ timer = null;
426
+ }, delay);
427
+ }
422
428
  };
423
429
  },
424
430
 
@@ -479,7 +485,7 @@
479
485
  return cached_options;
480
486
  }
481
487
 
482
- opts_arr = (cached_options || ':').split(';'),
488
+ opts_arr = (cached_options || ':').split(';');
483
489
  ii = opts_arr.length;
484
490
 
485
491
  function isNumber (o) {
@@ -500,7 +506,7 @@
500
506
  if (p[1].indexOf('.') === -1) {
501
507
  p[1] = parseInt(p[1], 10);
502
508
  } else {
503
- p[1] = parseFloat(p[1], 10);
509
+ p[1] = parseFloat(p[1]);
504
510
  }
505
511
  }
506
512
 
@@ -4,7 +4,7 @@
4
4
  Foundation.libs['magellan-expedition'] = {
5
5
  name : 'magellan-expedition',
6
6
 
7
- version : '5.2.1',
7
+ version : '5.2.2',
8
8
 
9
9
  settings : {
10
10
  active_class: 'active',
@@ -22,10 +22,10 @@
22
22
  var self = this,
23
23
  S = self.S,
24
24
  settings = self.settings;
25
-
25
+
26
26
  // initialize expedition offset
27
27
  self.set_expedition_position();
28
-
28
+
29
29
  S(self.scope)
30
30
  .off('.magellan')
31
31
  .on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href^="#"]', function (e) {
@@ -34,19 +34,22 @@
34
34
  settings = expedition.data('magellan-expedition-init');
35
35
 
36
36
  var hash = this.hash.split('#').join(''),
37
- target = $('a[name='+hash+']');
37
+ target = $("a[name='"+hash+"']");
38
38
  if (target.length === 0) target = $('#'+hash);
39
39
 
40
40
  // Account for expedition height if fixed position
41
41
  var scroll_top = target.offset().top;
42
- if (expedition.css('position') === 'fixed') {
43
- scroll_top = scroll_top - expedition.outerHeight();
44
- }
42
+ scroll_top = scroll_top - expedition.outerHeight();
45
43
 
46
44
  $('html, body').stop().animate({
47
45
  'scrollTop': scroll_top
48
46
  }, 700, 'swing', function () {
49
- window.location.hash = '#'+hash;
47
+ if(history.pushState) {
48
+ history.pushState(null, null, '#'+hash);
49
+ }
50
+ else {
51
+ location.hash = '#'+hash;
52
+ }
50
53
  });
51
54
  })
52
55
  .on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay))
@@ -81,7 +84,7 @@
81
84
  $('[' + this.attr_name() + '=fixed]', self.scope).each(function() {
82
85
  var expedition = $(this),
83
86
  top_offset = expedition.data('magellan-top-offset');
84
-
87
+
85
88
  if (window_top_offset >= top_offset) {
86
89
  // Placeholder allows height calculations to be consistent even when
87
90
  // appearing to switch between fixed/non-fixed placement
@@ -127,13 +130,13 @@
127
130
  offsets : function(expedition, window_offset) {
128
131
  var self = this,
129
132
  settings = expedition.data(self.attr_name(true) + '-init'),
130
- viewport_offset = (window_offset + settings.destination_threshold);
133
+ viewport_offset = window_offset;
131
134
 
132
135
  return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function(idx, el) {
133
136
  var name = $(this).data(self.data_attr('magellan-arrival')),
134
137
  dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
135
138
  if (dest.length > 0) {
136
- var top_offset = dest.offset().top;
139
+ var top_offset = dest.offset().top - settings.destination_threshold - expedition.outerHeight();
137
140
  return {
138
141
  destination : dest,
139
142
  arrival : $(this),
@@ -167,4 +170,4 @@
167
170
  $('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
168
171
  }
169
172
  };
170
- }(jQuery, this, this.document));
173
+ }(jQuery, this, this.document));
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.offcanvas = {
5
5
  name : 'offcanvas',
6
6
 
7
- version : '5.2.1',
7
+ version : '5.2.2',
8
8
 
9
9
  settings : {},
10
10
 
@@ -13,43 +13,36 @@
13
13
  },
14
14
 
15
15
  events : function () {
16
- var S = this.S;
16
+ var self = this,
17
+ S = self.S;
17
18
 
18
19
  S(this.scope).off('.offcanvas')
19
20
  .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
20
- e.preventDefault();
21
- S(this).closest('.off-canvas-wrap').toggleClass('move-right');
22
- })
23
- .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
24
- e.preventDefault();
25
- S(".off-canvas-wrap").removeClass("move-right");
21
+ self.click_toggle_class(e, 'move-right');
26
22
  })
27
23
  .on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
28
- e.preventDefault();
29
- var href = $(this).attr('href');
30
- S('.off-canvas-wrap').on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
31
- window.location = href
32
- S('.off-canvas-wrap').off('transitionend webkitTransitionEnd oTransitionEnd');
33
- });
34
24
  S(".off-canvas-wrap").removeClass("move-right");
35
25
  })
36
26
  .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
37
- e.preventDefault();
38
- S(this).closest(".off-canvas-wrap").toggleClass("move-left");
39
- })
40
- .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
41
- e.preventDefault();
42
- S(".off-canvas-wrap").removeClass("move-left");
27
+ self.click_toggle_class(e, 'move-left');
43
28
  })
44
29
  .on('click.fndtn.offcanvas', '.right-off-canvas-menu a', function (e) {
45
- e.preventDefault();
46
- var href = $(this).attr('href');
47
- S('.off-canvas-wrap').on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
48
- window.location = href
49
- S('.off-canvas-wrap').off('transitionend webkitTransitionEnd oTransitionEnd');
50
- });
51
30
  S(".off-canvas-wrap").removeClass("move-left");
52
- });
31
+ })
32
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
33
+ self.click_remove_class(e, 'move-left');
34
+ self.click_remove_class(e, 'move-right');
35
+ })
36
+ },
37
+
38
+ click_toggle_class: function(e, class_name) {
39
+ e.preventDefault();
40
+ this.S(e.target).closest('.off-canvas-wrap').toggleClass(class_name);
41
+ },
42
+
43
+ click_remove_class: function(e, class_name) {
44
+ e.preventDefault();
45
+ this.S('.off-canvas-wrap').removeClass(class_name);
53
46
  },
54
47
 
55
48
  reflow : function () {}
@@ -17,7 +17,8 @@
17
17
  timer_container,
18
18
  idx = 0,
19
19
  animate,
20
- adjust_height_after = false;
20
+ adjust_height_after = false,
21
+ has_init_active = slides_container.find("." + settings.active_slide_class).length > 0;
21
22
 
22
23
  self.cache = {};
23
24
 
@@ -25,7 +26,7 @@
25
26
  return slides_container.children(settings.slide_selector);
26
27
  };
27
28
 
28
- self.slides().first().addClass(settings.active_slide_class);
29
+ if (!has_init_active) {self.slides().first().addClass(settings.active_slide_class)};
29
30
 
30
31
  self.update_slide_number = function(index) {
31
32
  if (settings.slide_number) {
@@ -48,7 +49,12 @@
48
49
  slides_container.wrap('<div class="'+settings.container_class+'"></div>');
49
50
  container = slides_container.parent();
50
51
  slides_container.addClass(settings.slides_container_class);
52
+ slides_container.addClass(settings.animation);
51
53
 
54
+ if (settings.stack_on_small) {
55
+ container.addClass(settings.stack_on_small_class);
56
+ }
57
+
52
58
  if (settings.navigation_arrows) {
53
59
  container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
54
60
  container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
@@ -57,7 +63,9 @@
57
63
  if (settings.timer) {
58
64
  timer_container = $('<div>').addClass(settings.timer_container_class);
59
65
  timer_container.append('<span>');
60
- timer_container.append($('<div>').addClass(settings.timer_progress_class));
66
+ if (settings.timer_show_progress_bar) {
67
+ timer_container.append($('<div>').addClass(settings.timer_progress_class));
68
+ }
61
69
  timer_container.addClass(settings.timer_paused_class);
62
70
  container.append(timer_container);
63
71
  }
@@ -78,9 +86,6 @@
78
86
  });
79
87
  }
80
88
 
81
- if (settings.stack_on_small) {
82
- container.addClass(settings.stack_on_small_class);
83
- }
84
89
  };
85
90
 
86
91
  self._prepare_direction = function(next_idx, current_direction) {
@@ -106,7 +111,6 @@
106
111
  var current = $(slides.get(idx))
107
112
  , next = $(slides.get(next_idx));
108
113
 
109
-
110
114
  return [dir, current, next, next_idx];
111
115
  };
112
116
 
@@ -124,6 +128,9 @@
124
128
  , next = res[2]
125
129
  , next_idx = res[3];
126
130
 
131
+ // This means that circular is disabled and we most likely reached the last slide.
132
+ if (res === false) return false;
133
+
127
134
  slides_container.trigger('before-slide-change.fndtn.orbit');
128
135
  settings.before_slide_change();
129
136
  idx = next_idx;
@@ -263,20 +270,32 @@
263
270
  self.cache.timer = self.create_timer();
264
271
  Foundation.utils.image_loaded(this.slides().children('img'), self.cache.timer.start);
265
272
  }
266
- // animate = new FadeAnimation(settings, slides_container);
267
- // if (settings.animation === 'slide')
268
- // animate = new SlideAnimation(settings, slides_container);
269
- if(settings.animation === 'fade') {slides_container.addClass('fade');}
273
+
270
274
  animate = new CSSAnimation(settings, slides_container);
275
+
276
+ if (has_init_active) {
277
+ var $init_target = slides_container.find("." + settings.active_slide_class),
278
+ animation_speed = settings.animation_speed;
279
+ settings.animation_speed = 1;
280
+ $init_target.removeClass('active');
281
+ self._goto($init_target.index());
282
+ settings.animation_speed = animation_speed;
283
+ }
284
+
271
285
  container.on('click', '.'+settings.next_class, self.next);
272
286
  container.on('click', '.'+settings.prev_class, self.prev);
273
287
 
274
- container.on('click', '[data-orbit-slide]', self.link_bullet);
288
+ if (settings.next_on_click) {
289
+ container.on('click', '[data-orbit-slide]', self.link_bullet);
290
+ }
291
+
275
292
  container.on('click', self.toggle_timer);
276
293
  if (settings.swipe) {
277
294
  slides_container.on('touchstart.fndtn.orbit',function(e) {
278
295
  if (self.cache.animating) {return;}
279
296
  if (!e.touches) {e = e.originalEvent;}
297
+ e.preventDefault();
298
+ e.stopPropagation();
280
299
 
281
300
  self.cache.start_page_x = e.touches[0].pageX;
282
301
  self.cache.start_page_y = e.touches[0].pageY;
@@ -352,12 +371,13 @@
352
371
  });
353
372
 
354
373
  $(document).on('click', '[data-orbit-link]', self.link_custom);
355
- $(window).on('resize', self.compute_dimensions);
356
- Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
357
- Foundation.utils.image_loaded(this.slides().children('img'), function() {
358
- container.prev('.preloader').css('display', 'none');
359
- self.update_slide_number(0);
360
- self.update_active_link(0);
374
+ $(window).on('load resize', self.compute_dimensions);
375
+ var children = this.slides().find('img');
376
+ Foundation.utils.image_loaded(children, self.compute_dimensions);
377
+ Foundation.utils.image_loaded(children, function() {
378
+ container.prev('.'+settings.preloader_class).css('display', 'none');
379
+ self.update_slide_number(idx);
380
+ self.update_active_link(idx);
361
381
  slides_container.trigger('ready.fndtn.orbit');
362
382
  });
363
383
  };
@@ -369,6 +389,7 @@
369
389
  var self = this,
370
390
  duration = settings.timer_speed,
371
391
  progress = el.find('.'+settings.timer_progress_class),
392
+ do_progress = progress && progress.css('display') != 'none',
372
393
  start,
373
394
  timeout,
374
395
  left = -1;
@@ -385,7 +406,7 @@
385
406
  clearTimeout(timeout);
386
407
  el.addClass(settings.timer_paused_class);
387
408
  left = -1;
388
- self.update_progress(0);
409
+ if (do_progress) {self.update_progress(0);}
389
410
  self.start();
390
411
  };
391
412
 
@@ -393,8 +414,10 @@
393
414
  if (!el.hasClass(settings.timer_paused_class)) {return true;}
394
415
  left = (left === -1) ? duration : left;
395
416
  el.removeClass(settings.timer_paused_class);
396
- start = new Date().getTime();
397
- progress.animate({'width': '100%'}, left, 'linear');
417
+ if (do_progress) {
418
+ start = new Date().getTime();
419
+ progress.animate({'width': '100%'}, left, 'linear');
420
+ }
398
421
  timeout = setTimeout(function() {
399
422
  self.restart();
400
423
  callback();
@@ -406,10 +429,12 @@
406
429
  if (el.hasClass(settings.timer_paused_class)) {return true;}
407
430
  clearTimeout(timeout);
408
431
  el.addClass(settings.timer_paused_class);
409
- var end = new Date().getTime();
410
- left = left - (end - start);
411
- var w = 100 - ((left / duration) * 100);
412
- self.update_progress(w);
432
+ if (do_progress) {
433
+ var end = new Date().getTime();
434
+ left = left - (end - start);
435
+ var w = 100 - ((left / duration) * 100);
436
+ self.update_progress(w);
437
+ }
413
438
  el.trigger('timer-stopped.fndtn.orbit');
414
439
  };
415
440
  };
@@ -418,29 +443,89 @@
418
443
  var animation_end = "webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";
419
444
 
420
445
  this.next = function(current, next, callback) {
421
- next.on(animation_end, function(e){
422
- next.unbind(animation_end);
423
- current.removeClass("active animate-out");
424
- next.removeClass("animate-in");
425
- callback();
426
- });
446
+ if (Modernizr.csstransitions) {
447
+ next.on(animation_end, function(e){
448
+ next.unbind(animation_end);
449
+ current.removeClass("active animate-out");
450
+ next.removeClass("animate-in");
451
+ container.children().css({
452
+ "transform":"",
453
+ "-ms-transform":"",
454
+ "-webkit-transition-duration":"",
455
+ "-moz-transition-duration": "",
456
+ "-o-transition-duration": "",
457
+ "transition-duration":""
458
+ });
459
+ callback();
460
+ });
461
+ } else {
462
+ setTimeout(function(){
463
+ current.removeClass("active animate-out");
464
+ next.removeClass("animate-in");
465
+ container.children().css({
466
+ "transform":"",
467
+ "-ms-transform":"",
468
+ "-webkit-transition-duration":"",
469
+ "-moz-transition-duration": "",
470
+ "-o-transition-duration": "",
471
+ "transition-duration":""
472
+ });
473
+ callback();
474
+ }, settings.animation_speed);
475
+ }
427
476
  container.children().css({
428
- "transform":"",
429
- "transitionDuration":""
477
+ "transform":"",
478
+ "-ms-transform":"",
479
+ "-webkit-transition-duration":"",
480
+ "-moz-transition-duration": "",
481
+ "-o-transition-duration": "",
482
+ "transition-duration":""
430
483
  });
431
484
  current.addClass("animate-out");
432
485
  next.addClass("animate-in");
433
486
  };
434
487
 
435
488
  this.prev = function(current, prev, callback) {
436
- prev.on(animation_end, function(e){
437
- prev.unbind(animation_end);
438
- current.removeClass("active animate-out");
439
- prev.removeClass("animate-in");
440
- callback();
489
+ if (Modernizr.csstransitions) {
490
+ prev.on(animation_end, function(e){
491
+ prev.unbind(animation_end);
492
+ current.removeClass("active animate-out");
493
+ prev.removeClass("animate-in");
494
+ container.children().css({
495
+ "transform":"",
496
+ "-ms-transform":"",
497
+ "-webkit-transition-duration":"",
498
+ "-moz-transition-duration": "",
499
+ "-o-transition-duration": "",
500
+ "transition-duration":""
501
+ });
502
+ callback();
503
+ });
504
+ } else {
505
+ setTimeout(function(){
506
+ current.removeClass("active animate-out");
507
+ prev.removeClass("animate-in");
508
+ container.children().css({
509
+ "transform":"",
510
+ "-ms-transform":"",
511
+ "-webkit-transition-duration":"",
512
+ "-moz-transition-duration": "",
513
+ "-o-transition-duration": "",
514
+ "transition-duration":""
515
+ });
516
+ callback();
517
+ }, settings.animation_speed);
518
+ }
519
+ container.children().css({
520
+ "transform":"",
521
+ "-ms-transform":"",
522
+ "-webkit-transition-duration":"",
523
+ "-moz-transition-duration": "",
524
+ "-o-transition-duration": "",
525
+ "transition-duration":""
441
526
  });
442
- current.css({"transform":"", "transitionDuration":""}).addClass("animate-out");
443
- prev.css({"transform":"", "transitionDuration":""}).addClass("animate-in");
527
+ current.addClass("animate-out");
528
+ prev.addClass("animate-in");
444
529
  };
445
530
  };
446
531
 
@@ -450,13 +535,14 @@
450
535
  Foundation.libs.orbit = {
451
536
  name: 'orbit',
452
537
 
453
- version: '5.2.1',
538
+ version: '5.2.2',
454
539
 
455
540
  settings: {
456
541
  animation: 'slide',
457
542
  timer_speed: 10000,
458
543
  pause_on_hover: true,
459
544
  resume_on_mouseout: false,
545
+ next_on_click: true,
460
546
  animation_speed: 500,
461
547
  stack_on_small: false,
462
548
  navigation_arrows: true,
@@ -469,7 +555,9 @@
469
555
  timer_container_class: 'orbit-timer',
470
556
  timer_paused_class: 'paused',
471
557
  timer_progress_class: 'orbit-progress',
558
+ timer_show_progress_bar: true,
472
559
  slides_container_class: 'orbit-slides-container',
560
+ preloader_class: 'preloader',
473
561
  slide_selector: '*',
474
562
  bullets_container_class: 'orbit-bullets',
475
563
  bullets_active_class: 'active',