foundation-rails 5.5.1.0 → 5.5.1.1

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 (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
@@ -4,23 +4,28 @@
4
4
  Foundation.libs.tab = {
5
5
  name : 'tab',
6
6
 
7
- version : '5.5.0',
7
+ version : '5.5.1',
8
8
 
9
9
  settings : {
10
- active_class: 'active',
10
+ active_class : 'active',
11
11
  callback : function () {},
12
- deep_linking: false,
13
- scroll_to_content: true,
14
- is_hover: false
12
+ deep_linking : false,
13
+ scroll_to_content : true,
14
+ is_hover : false
15
15
  },
16
16
 
17
- default_tab_hashes: [],
17
+ default_tab_hashes : [],
18
18
 
19
19
  init : function (scope, method, options) {
20
20
  var self = this,
21
21
  S = this.S;
22
22
 
23
23
  this.bindings(method, options);
24
+
25
+ // store the initial href, which is used to allow correct behaviour of the
26
+ // browser back button when deep linking is turned on.
27
+ self.entry_location = window.location.href;
28
+
24
29
  this.handle_location_hash_change();
25
30
 
26
31
  // Store the default active tabs which will be referenced when the
@@ -36,7 +41,7 @@
36
41
  S = this.S;
37
42
 
38
43
  var usual_tab_behavior = function (e) {
39
- var settings = S(this).closest('[' + self.attr_name() +']').data(self.attr_name(true) + '-init');
44
+ var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
40
45
  if (!settings.is_hover || Modernizr.touch) {
41
46
  e.preventDefault();
42
47
  e.stopPropagation();
@@ -51,8 +56,10 @@
51
56
  .on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', usual_tab_behavior )
52
57
  // Hover event: tab title
53
58
  .on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
54
- var settings = S(this).closest('[' + self.attr_name() +']').data(self.attr_name(true) + '-init');
55
- if (settings.is_hover) self.toggle_active_tab(S(this).parent());
59
+ var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
60
+ if (settings.is_hover) {
61
+ self.toggle_active_tab(S(this).parent());
62
+ }
56
63
  });
57
64
 
58
65
  // Location hash change event
@@ -103,8 +110,9 @@
103
110
  });
104
111
  },
105
112
 
106
- toggle_active_tab: function (tab, location_hash) {
107
- var S = this.S,
113
+ toggle_active_tab : function (tab, location_hash) {
114
+ var self = this,
115
+ S = self.S,
108
116
  tabs = tab.closest('[' + this.attr_name() + ']'),
109
117
  tab_link = tab.find('a'),
110
118
  anchor = tab.children('a').first(),
@@ -112,7 +120,7 @@
112
120
  target = S(target_hash),
113
121
  siblings = tab.siblings(),
114
122
  settings = tabs.data(this.attr_name(true) + '-init'),
115
- interpret_keyup_action = function(e) {
123
+ interpret_keyup_action = function (e) {
116
124
  // Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
117
125
 
118
126
  // define current, previous and next (possible) tabs
@@ -157,6 +165,16 @@
157
165
  $('#' + $(document.activeElement).attr('href').substring(1))
158
166
  .attr('aria-hidden', null);
159
167
 
168
+ },
169
+ go_to_hash = function(hash) {
170
+ // This function allows correct behaviour of the browser's back button when deep linking is enabled. Without it
171
+ // the user would get continually redirected to the default hash.
172
+ var is_entry_location = window.location.href === self.entry_location,
173
+ default_hash = settings.scroll_to_content ? self.default_tab_hashes[0] : is_entry_location ? window.location.hash :'fndtn-' + self.default_tab_hashes[0].replace('#', '')
174
+
175
+ if (!(is_entry_location && hash === default_hash)) {
176
+ window.location.hash = hash;
177
+ }
160
178
  };
161
179
 
162
180
  // allow usage of data-tab-content attribute instead of href
@@ -168,8 +186,10 @@
168
186
  if (settings.deep_linking) {
169
187
 
170
188
  if (settings.scroll_to_content) {
189
+
171
190
  // retain current hash to scroll to content
172
- window.location.hash = location_hash || target_hash;
191
+ go_to_hash(location_hash || target_hash);
192
+
173
193
  if (location_hash == undefined || location_hash == target_hash) {
174
194
  tab.parent()[0].scrollIntoView();
175
195
  } else {
@@ -178,9 +198,9 @@
178
198
  } else {
179
199
  // prefix the hashes so that the browser doesn't scroll down
180
200
  if (location_hash != undefined) {
181
- window.location.hash = 'fndtn-' + location_hash.replace('#', '');
201
+ go_to_hash('fndtn-' + location_hash.replace('#', ''));
182
202
  } else {
183
- window.location.hash = 'fndtn-' + target_hash.replace('#', '');
203
+ go_to_hash('fndtn-' + target_hash.replace('#', ''));
184
204
  }
185
205
  }
186
206
  }
@@ -190,10 +210,10 @@
190
210
  // window (notably in Chrome).
191
211
  // Clean up multiple attr instances to done once
192
212
  tab.addClass(settings.active_class).triggerHandler('opened');
193
- tab_link.attr({'aria-selected': 'true', tabindex: 0});
213
+ tab_link.attr({'aria-selected' : 'true', tabindex : 0});
194
214
  siblings.removeClass(settings.active_class)
195
- siblings.find('a').attr({'aria-selected': 'false', tabindex: -1});
196
- target.siblings().removeClass(settings.active_class).attr({'aria-hidden': 'true', tabindex: -1});
215
+ siblings.find('a').attr({'aria-selected' : 'false', tabindex : -1});
216
+ target.siblings().removeClass(settings.active_class).attr({'aria-hidden' : 'true', tabindex : -1});
197
217
  target.addClass(settings.active_class).attr('aria-hidden', 'false').removeAttr('tabindex');
198
218
  settings.callback(tab);
199
219
  target.triggerHandler('toggled', [tab]);
@@ -202,7 +222,7 @@
202
222
  tab_link.off('keydown').on('keydown', interpret_keyup_action );
203
223
  },
204
224
 
205
- data_attr: function (str) {
225
+ data_attr : function (str) {
206
226
  if (this.namespace.length > 0) {
207
227
  return this.namespace + '-' + str;
208
228
  }
@@ -4,15 +4,15 @@
4
4
  Foundation.libs.tooltip = {
5
5
  name : 'tooltip',
6
6
 
7
- version : '5.5.0',
7
+ version : '5.5.1',
8
8
 
9
9
  settings : {
10
10
  additional_inheritable_classes : [],
11
11
  tooltip_class : '.tooltip',
12
- append_to: 'body',
13
- touch_close_text: 'Tap To Close',
14
- disable_for_touch: false,
15
- hover_delay: 200,
12
+ append_to : 'body',
13
+ touch_close_text : 'Tap To Close',
14
+ disable_for_touch : false,
15
+ hover_delay : 200,
16
16
  show_on : 'all',
17
17
  tip_template : function (selector, content) {
18
18
  return '<span data-selector="' + selector + '" id="' + selector + '" class="'
@@ -28,7 +28,7 @@
28
28
  this.bindings(method, options);
29
29
  },
30
30
 
31
- should_show: function (target, tip) {
31
+ should_show : function (target, tip) {
32
32
  var settings = $.extend({}, this.settings, this.data_options(target));
33
33
 
34
34
  if (settings.show_on === 'all') {
@@ -69,15 +69,19 @@
69
69
  return false;
70
70
  }
71
71
 
72
- if (/mouse/i.test(e.type) && self.ie_touch(e)) return false;
72
+ if (/mouse/i.test(e.type) && self.ie_touch(e)) {
73
+ return false;
74
+ }
73
75
 
74
76
  if ($this.hasClass('open')) {
75
- if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) e.preventDefault();
77
+ if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
78
+ e.preventDefault();
79
+ }
76
80
  self.hide($this);
77
81
  } else {
78
82
  if (settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
79
83
  return;
80
- } else if(!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
84
+ } else if (!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
81
85
  e.preventDefault();
82
86
  S(settings.tooltip_class + '.open').hide();
83
87
  is_touch = true;
@@ -96,12 +100,13 @@
96
100
  }
97
101
  })
98
102
  .on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', '[' + this.attr_name() + '].open', function (e) {
99
- if (/mouse/i.test(e.type) && self.ie_touch(e)) return false;
103
+ if (/mouse/i.test(e.type) && self.ie_touch(e)) {
104
+ return false;
105
+ }
100
106
 
101
- if($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
107
+ if ($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
102
108
  return;
103
- }
104
- else if($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
109
+ } else if ($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
105
110
  self.convert_to_touch($(this));
106
111
  } else {
107
112
  self.hide($(this));
@@ -119,7 +124,7 @@
119
124
 
120
125
  showTip : function ($target) {
121
126
  var $tip = this.getTip($target);
122
- if (this.should_show($target, $tip)){
127
+ if (this.should_show($target, $tip)) {
123
128
  return this.show($target);
124
129
  }
125
130
  return;
@@ -166,13 +171,13 @@
166
171
  $tip.addClass(classes).appendTo(settings.append_to);
167
172
 
168
173
  if (Modernizr.touch) {
169
- $tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');
170
- $tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function(e) {
174
+ $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
175
+ $tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function (e) {
171
176
  self.hide($target);
172
177
  });
173
178
  }
174
179
 
175
- $target.removeAttr('title').attr('title','');
180
+ $target.removeAttr('title').attr('title', '');
176
181
  },
177
182
 
178
183
  reposition : function (target, tip, classes) {
@@ -186,7 +191,7 @@
186
191
  nubWidth = nub.outerHeight();
187
192
 
188
193
  if (this.small()) {
189
- tip.css({'width' : '100%' });
194
+ tip.css({'width' : '100%'});
190
195
  } else {
191
196
  tip.css({'width' : (width) ? width : 'auto'});
192
197
  }
@@ -215,7 +220,9 @@
215
220
  objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', left);
216
221
  tip.removeClass('tip-override');
217
222
  if (classes && classes.indexOf('tip-top') > -1) {
218
- if (Foundation.rtl) nub.addClass('rtl');
223
+ if (Foundation.rtl) {
224
+ nub.addClass('rtl');
225
+ }
219
226
  objPos(tip, (target.offset().top - tip.outerHeight()), 'auto', 'auto', left)
220
227
  .removeClass('tip-override');
221
228
  } else if (classes && classes.indexOf('tip-left') > -1) {
@@ -250,14 +257,14 @@
250
257
  return $.trim(filtered);
251
258
  },
252
259
 
253
- convert_to_touch : function($target) {
260
+ convert_to_touch : function ($target) {
254
261
  var self = this,
255
262
  $tip = self.getTip($target),
256
263
  settings = $.extend({}, self.settings, self.data_options($target));
257
264
 
258
265
  if ($tip.find('.tap-to-close').length === 0) {
259
- $tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');
260
- $tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function(e) {
266
+ $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
267
+ $tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function (e) {
261
268
  self.hide($target);
262
269
  });
263
270
  }
@@ -280,7 +287,7 @@
280
287
  hide : function ($target) {
281
288
  var $tip = this.getTip($target);
282
289
 
283
- $tip.fadeOut(150, function() {
290
+ $tip.fadeOut(150, function () {
284
291
  $tip.find('.tap-to-close').remove();
285
292
  $tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
286
293
  $target.removeClass('open');
@@ -4,15 +4,15 @@
4
4
  Foundation.libs.topbar = {
5
5
  name : 'topbar',
6
6
 
7
- version: '5.5.0',
7
+ version : '5.5.1',
8
8
 
9
9
  settings : {
10
10
  index : 0,
11
11
  sticky_class : 'sticky',
12
- custom_back_text: true,
13
- back_text: 'Back',
14
- mobile_show_parent_link: true,
15
- is_hover: true,
12
+ custom_back_text : true,
13
+ back_text : 'Back',
14
+ mobile_show_parent_link : true,
15
+ is_hover : true,
16
16
  scrolltop : true, // jump to top when sticky nav menu toggle is clicked
17
17
  sticky_on : 'all'
18
18
  },
@@ -60,29 +60,33 @@
60
60
 
61
61
  },
62
62
 
63
- is_sticky: function (topbar, topbarContainer, settings) {
64
- var sticky = topbarContainer.hasClass(settings.sticky_class);
65
-
66
- if (sticky && settings.sticky_on === 'all') {
63
+ is_sticky : function (topbar, topbarContainer, settings) {
64
+ var sticky = topbarContainer.hasClass(settings.sticky_class);
65
+ var smallMatch = matchMedia(Foundation.media_queries.small).matches;
66
+ var medMatch = matchMedia(Foundation.media_queries.medium).matches;
67
+ var lrgMatch = matchMedia(Foundation.media_queries.large).matches;
68
+
69
+ if (sticky && settings.sticky_on === 'all') {
70
+ return true;
71
+ }
72
+ if (sticky && this.small() && settings.sticky_on.indexOf('small') !== -1) {
73
+ if (smallMatch && !medMatch && !lrgMatch) { return true; }
74
+ }
75
+ if (sticky && this.medium() && settings.sticky_on.indexOf('medium') !== -1) {
76
+ if (smallMatch && medMatch && !lrgMatch) { return true; }
77
+ }
78
+ if (sticky && this.large() && settings.sticky_on.indexOf('large') !== -1) {
79
+ if (smallMatch && medMatch && lrgMatch) { return true; }
80
+ }
81
+
82
+ // fix for iOS browsers
83
+ if (sticky && navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
67
84
  return true;
68
- } else if (sticky && this.small() && settings.sticky_on === 'small') {
69
- return (matchMedia(Foundation.media_queries.small).matches && !matchMedia(Foundation.media_queries.medium).matches &&
70
- !matchMedia(Foundation.media_queries.large).matches);
71
- //return true;
72
- } else if (sticky && this.medium() && settings.sticky_on === 'medium') {
73
- return (matchMedia(Foundation.media_queries.small).matches && matchMedia(Foundation.media_queries.medium).matches &&
74
- !matchMedia(Foundation.media_queries.large).matches);
75
- //return true;
76
- } else if(sticky && this.large() && settings.sticky_on === 'large') {
77
- return (matchMedia(Foundation.media_queries.small).matches && matchMedia(Foundation.media_queries.medium).matches &&
78
- matchMedia(Foundation.media_queries.large).matches);
79
- //return true;
80
- }
81
-
82
- return false;
85
+ }
86
+ return false;
83
87
  },
84
88
 
85
- toggle: function (toggleEl) {
89
+ toggle : function (toggleEl) {
86
90
  var self = this,
87
91
  topbar;
88
92
 
@@ -98,11 +102,11 @@
98
102
 
99
103
  if (self.breakpoint()) {
100
104
  if (!self.rtl) {
101
- section.css({left: '0%'});
102
- $('>.name', section).css({left: '100%'});
105
+ section.css({left : '0%'});
106
+ $('>.name', section).css({left : '100%'});
103
107
  } else {
104
- section.css({right: '0%'});
105
- $('>.name', section).css({right: '100%'});
108
+ section.css({right : '0%'});
109
+ $('>.name', section).css({right : '100%'});
106
110
  }
107
111
 
108
112
  self.S('li.moved', section).removeClass('moved');
@@ -126,7 +130,7 @@
126
130
  topbar.addClass('fixed');
127
131
  self.S('body').removeClass('f-topbar-fixed');
128
132
 
129
- window.scrollTo(0,0);
133
+ window.scrollTo(0, 0);
130
134
  } else {
131
135
  topbar.parent().removeClass('expanded');
132
136
  }
@@ -162,11 +166,10 @@
162
166
  e.preventDefault();
163
167
  self.toggle(this);
164
168
  })
165
- .on('click.fndtn.topbar','.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]',function (e) {
169
+ .on('click.fndtn.topbar', '.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]', function (e) {
166
170
  var li = $(this).closest('li');
167
- if(self.breakpoint() && !li.hasClass('back') && !li.hasClass('has-dropdown'))
168
- {
169
- self.toggle();
171
+ if (self.breakpoint() && !li.hasClass('back') && !li.hasClass('has-dropdown')) {
172
+ self.toggle();
170
173
  }
171
174
  })
172
175
  .on('click.fndtn.topbar', '[' + this.attr_name() + '] li.has-dropdown', function (e) {
@@ -175,13 +178,18 @@
175
178
  topbar = li.closest('[' + self.attr_name() + ']'),
176
179
  settings = topbar.data(self.attr_name(true) + '-init');
177
180
 
178
- if(target.data('revealId')) {
181
+ if (target.data('revealId')) {
179
182
  self.toggle();
180
183
  return;
181
184
  }
182
185
 
183
- if (self.breakpoint()) return;
184
- if (settings.is_hover && !Modernizr.touch) return;
186
+ if (self.breakpoint()) {
187
+ return;
188
+ }
189
+
190
+ if (settings.is_hover && !Modernizr.touch) {
191
+ return;
192
+ }
185
193
 
186
194
  e.stopImmediatePropagation();
187
195
 
@@ -218,20 +226,20 @@
218
226
  $selectedLi.addClass('moved');
219
227
 
220
228
  if (!self.rtl) {
221
- section.css({left: -(100 * topbar.data('index')) + '%'});
222
- section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
229
+ section.css({left : -(100 * topbar.data('index')) + '%'});
230
+ section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
223
231
  } else {
224
- section.css({right: -(100 * topbar.data('index')) + '%'});
225
- section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
232
+ section.css({right : -(100 * topbar.data('index')) + '%'});
233
+ section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
226
234
  }
227
235
 
228
236
  topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height'));
229
237
  }
230
238
  });
231
239
 
232
- S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function() {
240
+ S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () {
233
241
  self.resize.call(self);
234
- }, 50)).trigger('resize').trigger('resize.fndtn.topbar').load(function(){
242
+ }, 50)).trigger('resize').trigger('resize.fndtn.topbar').load(function () {
235
243
  // Ensure that the offset is calculated after all of the pages resources have loaded
236
244
  S(this).trigger('resize.fndtn.topbar');
237
245
  });
@@ -260,11 +268,11 @@
260
268
  topbar.data('index', topbar.data('index') - 1);
261
269
 
262
270
  if (!self.rtl) {
263
- section.css({left: -(100 * topbar.data('index')) + '%'});
264
- section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
271
+ section.css({left : -(100 * topbar.data('index')) + '%'});
272
+ section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
265
273
  } else {
266
- section.css({right: -(100 * topbar.data('index')) + '%'});
267
- section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
274
+ section.css({right : -(100 * topbar.data('index')) + '%'});
275
+ section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
268
276
  }
269
277
 
270
278
  if (topbar.data('index') === 0) {
@@ -280,10 +288,10 @@
280
288
 
281
289
  // Show dropdown menus when their items are focused
282
290
  S(this.scope).find('.dropdown a')
283
- .focus(function() {
291
+ .focus(function () {
284
292
  $(this).parents('.has-dropdown').addClass('hover');
285
293
  })
286
- .blur(function() {
294
+ .blur(function () {
287
295
  $(this).parents('.has-dropdown').removeClass('hover');
288
296
  });
289
297
  },
@@ -305,18 +313,18 @@
305
313
  .find('li')
306
314
  .removeClass('hover');
307
315
 
308
- if(doToggle) {
316
+ if (doToggle) {
309
317
  self.toggle(topbar);
310
318
  }
311
319
  }
312
320
 
313
- if(self.is_sticky(topbar, stickyContainer, settings)) {
314
- if(stickyContainer.hasClass('fixed')) {
321
+ if (self.is_sticky(topbar, stickyContainer, settings)) {
322
+ if (stickyContainer.hasClass('fixed')) {
315
323
  // Remove the fixed to allow for correct calculation of the offset.
316
324
  stickyContainer.removeClass('fixed');
317
325
 
318
326
  stickyOffset = stickyContainer.offset().top;
319
- if(self.S(document.body).hasClass('f-topbar-fixed')) {
327
+ if (self.S(document.body).hasClass('f-topbar-fixed')) {
320
328
  stickyOffset -= topbar.data('height');
321
329
  }
322
330
 
@@ -361,11 +369,10 @@
361
369
  url = $link.attr('href'),
362
370
  $titleLi;
363
371
 
364
-
365
372
  if (!$dropdown.find('.title.back').length) {
366
373
 
367
374
  if (settings.mobile_show_parent_link == true && url) {
368
- $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link show-for-small-only"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
375
+ $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-large-up"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
369
376
  } else {
370
377
  $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');
371
378
  }
@@ -390,7 +397,7 @@
390
397
  },
391
398
 
392
399
  assembled : function (topbar) {
393
- topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled: true}));
400
+ topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled : true}));
394
401
  },
395
402
 
396
403
  height : function (ul) {
@@ -407,17 +414,17 @@
407
414
  sticky : function () {
408
415
  var self = this;
409
416
 
410
- this.S(window).on('scroll', function() {
417
+ this.S(window).on('scroll', function () {
411
418
  self.update_sticky_positioning();
412
419
  });
413
420
  },
414
421
 
415
- update_sticky_positioning: function() {
422
+ update_sticky_positioning : function () {
416
423
  var klass = '.' + this.settings.sticky_class,
417
424
  $window = this.S(window),
418
425
  self = this;
419
426
 
420
- if (self.settings.sticky_topbar && self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(), this.settings)) {
427
+ if (self.settings.sticky_topbar && self.is_sticky(this.settings.sticky_topbar, this.settings.sticky_topbar.parent(), this.settings)) {
421
428
  var distance = this.settings.sticky_topbar.data('stickyoffset');
422
429
  if (!self.S(klass).hasClass('expanded')) {
423
430
  if ($window.scrollTop() > (distance)) {