foundation-rails 5.2.2.0 → 5.2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/vendor/assets/javascripts/foundation/foundation.abide.js +5 -5
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +13 -8
- data/vendor/assets/javascripts/foundation/foundation.alert.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +36 -33
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +15 -10
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +12 -6
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +3 -3
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +9 -15
- data/vendor/assets/javascripts/foundation/foundation.js +30 -28
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +36 -31
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +72 -14
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +19 -15
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +26 -16
- data/vendor/assets/javascripts/foundation/foundation.slider.js +2 -3
- data/vendor/assets/javascripts/foundation/foundation.tab.js +8 -9
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +30 -4
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +22 -19
- data/vendor/assets/stylesheets/foundation/_settings.scss +50 -40
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +8 -7
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +8 -8
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +6 -6
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +7 -5
- data/vendor/assets/stylesheets/foundation/components/_global.scss +67 -3
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +1 -2
- data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +2 -1
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +3 -3
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +32 -58
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +39 -31
- data/vendor/assets/stylesheets/foundation/components/_pagination.scss +5 -5
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +4 -5
- data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +5 -5
- data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +26 -4
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +7 -7
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_switch.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +44 -12
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +9 -5
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +4 -4
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +30 -26
- data/vendor/assets/stylesheets/foundation/components/_type.scss +39 -21
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +64 -1
- data/vendor/assets/stylesheets/normalize.scss +20 -18
- metadata +2 -2
@@ -81,7 +81,8 @@
|
|
81
81
|
container.append(bullets_container);
|
82
82
|
bullets_container.wrap('<div class="orbit-bullets-container"></div>');
|
83
83
|
self.slides().each(function(idx, el) {
|
84
|
-
var bullet = $('<li>').attr('data-orbit-slide', idx)
|
84
|
+
var bullet = $('<li>').attr('data-orbit-slide', idx)
|
85
|
+
.on('click', self.link_bullet);
|
85
86
|
bullets_container.append(bullet);
|
86
87
|
});
|
87
88
|
}
|
@@ -142,6 +143,8 @@
|
|
142
143
|
var unlock = function() {
|
143
144
|
if (start_timer === true) {self.cache.timer.restart();}
|
144
145
|
self.update_slide_number(idx);
|
146
|
+
// Remove "animate-in" class as late as possible to avoid "flickering" (especially with variable_height).
|
147
|
+
next.removeClass("animate-in");
|
145
148
|
next.addClass(settings.active_slide_class);
|
146
149
|
self.update_active_link(next_idx);
|
147
150
|
slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number: idx, total_slides: slides.length}]);
|
@@ -152,7 +155,7 @@
|
|
152
155
|
|
153
156
|
};
|
154
157
|
if (slides_container.height() != next.height() && settings.variable_height) {
|
155
|
-
slides_container.animate({'height': next.height()}, 250, 'linear', unlock);
|
158
|
+
slides_container.animate({'min-height': next.height()}, 250, 'linear', unlock);
|
156
159
|
} else {
|
157
160
|
unlock();
|
158
161
|
}
|
@@ -166,7 +169,7 @@
|
|
166
169
|
};
|
167
170
|
|
168
171
|
if (next.height() > slides_container.height() && settings.variable_height) {
|
169
|
-
slides_container.animate({'height': next.height()}, 250, 'linear', start_animation);
|
172
|
+
slides_container.animate({'min-height': next.height()}, 250, 'linear', start_animation);
|
170
173
|
} else {
|
171
174
|
start_animation();
|
172
175
|
}
|
@@ -203,6 +206,7 @@
|
|
203
206
|
}
|
204
207
|
};
|
205
208
|
|
209
|
+
// Click handler for slides and bullets.
|
206
210
|
self.link_bullet = function(e) {
|
207
211
|
var index = $(this).attr('data-orbit-slide');
|
208
212
|
if ((typeof index === 'string') && (index = $.trim(index)) != "") {
|
@@ -210,19 +214,22 @@
|
|
210
214
|
{
|
211
215
|
var slide = container.find('[data-orbit-slide='+index+']');
|
212
216
|
if (slide.index() != -1) {
|
217
|
+
index = slide.index() + 1;
|
218
|
+
self._prepare_direction(index);
|
213
219
|
setTimeout(function(){
|
214
|
-
self._goto(
|
220
|
+
self._goto(index);
|
215
221
|
},100);
|
216
222
|
}
|
217
223
|
}
|
218
224
|
else
|
219
225
|
{
|
226
|
+
index = parseInt(index);
|
227
|
+
self._prepare_direction(index);
|
220
228
|
setTimeout(function(){
|
221
|
-
self._goto(
|
229
|
+
self._goto(index);
|
222
230
|
},100);
|
223
231
|
}
|
224
232
|
}
|
225
|
-
|
226
233
|
}
|
227
234
|
|
228
235
|
self.timer_callback = function() {
|
@@ -237,7 +244,7 @@
|
|
237
244
|
if ($(this).height() > h) { h = $(this).height(); }
|
238
245
|
});
|
239
246
|
}
|
240
|
-
slides_container.
|
247
|
+
slides_container.css('minHeight', String(h)+'px');
|
241
248
|
};
|
242
249
|
|
243
250
|
self.create_timer = function() {
|
@@ -268,7 +275,7 @@
|
|
268
275
|
self.build_markup();
|
269
276
|
if (settings.timer) {
|
270
277
|
self.cache.timer = self.create_timer();
|
271
|
-
Foundation.utils.image_loaded(this.slides().
|
278
|
+
Foundation.utils.image_loaded(this.slides().find('img'), self.cache.timer.start);
|
272
279
|
}
|
273
280
|
|
274
281
|
animate = new CSSAnimation(settings, slides_container);
|
@@ -286,7 +293,7 @@
|
|
286
293
|
container.on('click', '.'+settings.prev_class, self.prev);
|
287
294
|
|
288
295
|
if (settings.next_on_click) {
|
289
|
-
container.on('click', '[data-orbit-slide]', self.link_bullet);
|
296
|
+
container.on('click', '.'+settings.slides_container_class+' [data-orbit-slide]', self.link_bullet);
|
290
297
|
}
|
291
298
|
|
292
299
|
container.on('click', self.toggle_timer);
|
@@ -447,7 +454,6 @@
|
|
447
454
|
next.on(animation_end, function(e){
|
448
455
|
next.unbind(animation_end);
|
449
456
|
current.removeClass("active animate-out");
|
450
|
-
next.removeClass("animate-in");
|
451
457
|
container.children().css({
|
452
458
|
"transform":"",
|
453
459
|
"-ms-transform":"",
|
@@ -461,7 +467,6 @@
|
|
461
467
|
} else {
|
462
468
|
setTimeout(function(){
|
463
469
|
current.removeClass("active animate-out");
|
464
|
-
next.removeClass("animate-in");
|
465
470
|
container.children().css({
|
466
471
|
"transform":"",
|
467
472
|
"-ms-transform":"",
|
@@ -490,7 +495,6 @@
|
|
490
495
|
prev.on(animation_end, function(e){
|
491
496
|
prev.unbind(animation_end);
|
492
497
|
current.removeClass("active animate-out");
|
493
|
-
prev.removeClass("animate-in");
|
494
498
|
container.children().css({
|
495
499
|
"transform":"",
|
496
500
|
"-ms-transform":"",
|
@@ -504,7 +508,6 @@
|
|
504
508
|
} else {
|
505
509
|
setTimeout(function(){
|
506
510
|
current.removeClass("active animate-out");
|
507
|
-
prev.removeClass("animate-in");
|
508
511
|
container.children().css({
|
509
512
|
"transform":"",
|
510
513
|
"-ms-transform":"",
|
@@ -535,7 +538,7 @@
|
|
535
538
|
Foundation.libs.orbit = {
|
536
539
|
name: 'orbit',
|
537
540
|
|
538
|
-
version: '5.2.
|
541
|
+
version: '5.2.3',
|
539
542
|
|
540
543
|
settings: {
|
541
544
|
animation: 'slide',
|
@@ -580,6 +583,7 @@
|
|
580
583
|
},
|
581
584
|
|
582
585
|
events : function (instance) {
|
586
|
+
var self = this;
|
583
587
|
var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
|
584
588
|
this.S(instance).data(self.name + '-instance', orbit_instance);
|
585
589
|
},
|
@@ -603,4 +607,4 @@
|
|
603
607
|
};
|
604
608
|
|
605
609
|
|
606
|
-
}(jQuery,
|
610
|
+
}(jQuery, window, window.document));
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.reveal = {
|
5
5
|
name : 'reveal',
|
6
6
|
|
7
|
-
version : '5.2.
|
7
|
+
version : '5.2.3',
|
8
8
|
|
9
9
|
locked : false,
|
10
10
|
|
@@ -134,20 +134,24 @@
|
|
134
134
|
},
|
135
135
|
|
136
136
|
open : function (target, ajax_settings) {
|
137
|
-
var self = this
|
137
|
+
var self = this,
|
138
|
+
modal;
|
139
|
+
|
138
140
|
if (target) {
|
139
141
|
if (typeof target.selector !== 'undefined') {
|
140
|
-
|
142
|
+
// Find the named node; only use the first one found, since the rest of the code assumes there's only one node
|
143
|
+
modal = self.S('#' + target.data(self.data_attr('reveal-id'))).first();
|
141
144
|
} else {
|
142
|
-
|
145
|
+
modal = self.S(this.scope);
|
143
146
|
|
144
147
|
ajax_settings = target;
|
145
148
|
}
|
146
149
|
} else {
|
147
|
-
|
150
|
+
modal = self.S(this.scope);
|
148
151
|
}
|
149
152
|
|
150
153
|
var settings = modal.data(self.attr_name(true) + '-init');
|
154
|
+
settings = settings || this.settings;
|
151
155
|
|
152
156
|
if (!modal.hasClass('open')) {
|
153
157
|
var open_modal = self.S('[' + self.attr_name() + '].open');
|
@@ -161,7 +165,7 @@
|
|
161
165
|
modal.trigger('open');
|
162
166
|
|
163
167
|
if (open_modal.length < 1) {
|
164
|
-
this.toggle_bg(modal);
|
168
|
+
this.toggle_bg(modal, true);
|
165
169
|
}
|
166
170
|
|
167
171
|
if (typeof ajax_settings === 'string') {
|
@@ -187,6 +191,7 @@
|
|
187
191
|
|
188
192
|
modal.html(data);
|
189
193
|
self.S(modal).foundation('section', 'reflow');
|
194
|
+
self.S(modal).children().foundation();
|
190
195
|
|
191
196
|
if (open_modal.length > 0) {
|
192
197
|
self.hide(open_modal, settings.css.close);
|
@@ -203,13 +208,13 @@
|
|
203
208
|
close : function (modal) {
|
204
209
|
var modal = modal && modal.length ? modal : this.S(this.scope),
|
205
210
|
open_modals = this.S('[' + this.attr_name() + '].open'),
|
206
|
-
settings = modal.data(this.attr_name(true) + '-init');
|
211
|
+
settings = modal.data(this.attr_name(true) + '-init') || this.settings;
|
207
212
|
|
208
213
|
if (open_modals.length > 0) {
|
209
214
|
this.locked = true;
|
210
215
|
this.key_up_off(modal); // PATCH #3: turning on key up capture only when a reveal window is open
|
211
216
|
modal.trigger('close');
|
212
|
-
this.toggle_bg(modal);
|
217
|
+
this.toggle_bg(modal, false);
|
213
218
|
this.hide(open_modals, settings.css.close, settings);
|
214
219
|
}
|
215
220
|
},
|
@@ -224,18 +229,19 @@
|
|
224
229
|
return base;
|
225
230
|
},
|
226
231
|
|
227
|
-
toggle_bg : function (modal) {
|
228
|
-
var settings = modal.data(this.attr_name(true));
|
229
|
-
|
232
|
+
toggle_bg : function (modal, state) {
|
230
233
|
if (this.S('.' + this.settings.bg_class).length === 0) {
|
231
234
|
this.settings.bg = $('<div />', {'class': this.settings.bg_class})
|
232
235
|
.appendTo('body').hide();
|
233
236
|
}
|
234
237
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
238
|
+
var visible = this.settings.bg.filter(':visible').length > 0;
|
239
|
+
if ( state != visible ) {
|
240
|
+
if ( state == undefined ? visible : !state ) {
|
241
|
+
this.hide(this.settings.bg);
|
242
|
+
} else {
|
243
|
+
this.show(this.settings.bg);
|
244
|
+
}
|
239
245
|
}
|
240
246
|
},
|
241
247
|
|
@@ -243,6 +249,8 @@
|
|
243
249
|
// is modal
|
244
250
|
if (css) {
|
245
251
|
var settings = el.data(this.attr_name(true) + '-init');
|
252
|
+
settings = settings || this.settings;
|
253
|
+
|
246
254
|
if (el.parent('body').length === 0) {
|
247
255
|
var placeholder = el.wrap('<div style="display: none;" />').parent(),
|
248
256
|
rootElement = this.settings.rootElement || 'body';
|
@@ -311,6 +319,8 @@
|
|
311
319
|
// is modal
|
312
320
|
if (css) {
|
313
321
|
var settings = el.data(this.attr_name(true) + '-init');
|
322
|
+
settings = settings || this.settings;
|
323
|
+
|
314
324
|
var animData = getAnimationData(settings.animation);
|
315
325
|
if (!animData.animate) {
|
316
326
|
this.locked = false;
|
@@ -424,4 +434,4 @@
|
|
424
434
|
fade: fade
|
425
435
|
};
|
426
436
|
}
|
427
|
-
}(jQuery,
|
437
|
+
}(jQuery, window, window.document));
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.slider = {
|
5
5
|
name : 'slider',
|
6
6
|
|
7
|
-
version : '5.2.
|
7
|
+
version : '5.2.3',
|
8
8
|
|
9
9
|
settings: {
|
10
10
|
start: 0,
|
@@ -123,7 +123,6 @@
|
|
123
123
|
|
124
124
|
normalized_value : function(val, start, end, step) {
|
125
125
|
var range = end - start,
|
126
|
-
step = step,
|
127
126
|
point = val*range,
|
128
127
|
mod = (point-(point%step)) / step,
|
129
128
|
rem = point % step,
|
@@ -197,4 +196,4 @@
|
|
197
196
|
|
198
197
|
};
|
199
198
|
|
200
|
-
}(jQuery,
|
199
|
+
}(jQuery, window, window.document));
|
@@ -1,11 +1,10 @@
|
|
1
|
-
/*jslint unparam: true, browser: true, indent: 2 */
|
2
1
|
;(function ($, window, document, undefined) {
|
3
2
|
'use strict';
|
4
3
|
|
5
4
|
Foundation.libs.tab = {
|
6
5
|
name : 'tab',
|
7
6
|
|
8
|
-
version : '5.2.
|
7
|
+
version : '5.2.3',
|
9
8
|
|
10
9
|
settings : {
|
11
10
|
active_class: 'active',
|
@@ -27,7 +26,7 @@
|
|
27
26
|
// Store the default active tabs which will be referenced when the
|
28
27
|
// location hash is absent, as in the case of navigating the tabs and
|
29
28
|
// returning to the first viewing via the browser Back button.
|
30
|
-
S('[' + this.attr_name() + '] >
|
29
|
+
S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
|
31
30
|
self.default_tab_hashes.push(this.hash);
|
32
31
|
});
|
33
32
|
},
|
@@ -39,7 +38,7 @@
|
|
39
38
|
S(this.scope)
|
40
39
|
.off('.tab')
|
41
40
|
// Click event: tab title
|
42
|
-
.on('click.fndtn.tab', '[' + this.attr_name() + '] >
|
41
|
+
.on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
|
43
42
|
var settings = S(this).closest('[' + self.attr_name() +']').data(self.attr_name(true) + '-init');
|
44
43
|
if (!settings.is_hover || Modernizr.touch) {
|
45
44
|
e.preventDefault();
|
@@ -48,7 +47,7 @@
|
|
48
47
|
}
|
49
48
|
})
|
50
49
|
// Hover event: tab title
|
51
|
-
.on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] >
|
50
|
+
.on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
|
52
51
|
var settings = S(this).closest('[' + self.attr_name() +']').data(self.attr_name(true) + '-init');
|
53
52
|
if (settings.is_hover) self.toggle_active_tab(S(this).parent());
|
54
53
|
});
|
@@ -75,19 +74,19 @@
|
|
75
74
|
var hash_element = S(hash);
|
76
75
|
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tab-content')) {
|
77
76
|
// Tab content div
|
78
|
-
self.toggle_active_tab($('[' + self.attr_name() + '] >
|
77
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + hash + ']').parent());
|
79
78
|
} else {
|
80
79
|
// Not the tab content div. If inside the tab content, find the
|
81
80
|
// containing tab and toggle it as active.
|
82
81
|
var hash_tab_container_id = hash_element.closest('.content').attr('id');
|
83
82
|
if (hash_tab_container_id != undefined) {
|
84
|
-
self.toggle_active_tab($('[' + self.attr_name() + '] >
|
83
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash);
|
85
84
|
}
|
86
85
|
}
|
87
86
|
} else {
|
88
87
|
// Reference the default tab hashes which were initialized in the init function
|
89
88
|
for (var ind in self.default_tab_hashes) {
|
90
|
-
self.toggle_active_tab($('[' + self.attr_name() + '] >
|
89
|
+
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + self.default_tab_hashes[ind] + ']').parent());
|
91
90
|
}
|
92
91
|
}
|
93
92
|
}
|
@@ -165,4 +164,4 @@
|
|
165
164
|
|
166
165
|
reflow : function () {}
|
167
166
|
};
|
168
|
-
}(jQuery,
|
167
|
+
}(jQuery, window, window.document));
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.tooltip = {
|
5
5
|
name : 'tooltip',
|
6
6
|
|
7
|
-
version : '5.2.
|
7
|
+
version : '5.2.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
additional_inheritable_classes : [],
|
@@ -13,6 +13,7 @@
|
|
13
13
|
touch_close_text: 'Tap To Close',
|
14
14
|
disable_for_touch: false,
|
15
15
|
hover_delay: 200,
|
16
|
+
show_on : 'all',
|
16
17
|
tip_template : function (selector, content) {
|
17
18
|
return '<span data-selector="' + selector + '" class="'
|
18
19
|
+ Foundation.libs.tooltip.settings.tooltip_class.substring(1)
|
@@ -27,6 +28,29 @@
|
|
27
28
|
this.bindings(method, options);
|
28
29
|
},
|
29
30
|
|
31
|
+
should_show: function (target, tip) {
|
32
|
+
var settings = $.extend({}, this.settings, this.data_options(target));
|
33
|
+
|
34
|
+
if (settings.show_on === 'all') {
|
35
|
+
return true;
|
36
|
+
} else if (this.small() && settings.show_on === 'small') {
|
37
|
+
return true;
|
38
|
+
} else if (this.medium() && settings.show_on === 'medium') {
|
39
|
+
return true;
|
40
|
+
} else if (this.large() && settings.show_on === 'large') {
|
41
|
+
return true;
|
42
|
+
}
|
43
|
+
return false;
|
44
|
+
},
|
45
|
+
|
46
|
+
medium : function () {
|
47
|
+
return matchMedia(Foundation.media_queries['medium']).matches;
|
48
|
+
},
|
49
|
+
|
50
|
+
large : function () {
|
51
|
+
return matchMedia(Foundation.media_queries['large']).matches;
|
52
|
+
},
|
53
|
+
|
30
54
|
events : function (instance) {
|
31
55
|
var self = this,
|
32
56
|
S = self.S;
|
@@ -95,8 +119,10 @@
|
|
95
119
|
|
96
120
|
showTip : function ($target) {
|
97
121
|
var $tip = this.getTip($target);
|
98
|
-
|
122
|
+
if (this.should_show($target, $tip)){
|
99
123
|
return this.show($target);
|
124
|
+
}
|
125
|
+
return;
|
100
126
|
},
|
101
127
|
|
102
128
|
getTip : function ($target) {
|
@@ -168,7 +194,7 @@
|
|
168
194
|
'top' : (top) ? top : 'auto',
|
169
195
|
'bottom' : (bottom) ? bottom : 'auto',
|
170
196
|
'left' : (left) ? left : 'auto',
|
171
|
-
'right' : (right) ? right : 'auto'
|
197
|
+
'right' : (right) ? right : 'auto'
|
172
198
|
}).end();
|
173
199
|
};
|
174
200
|
|
@@ -269,4 +295,4 @@
|
|
269
295
|
|
270
296
|
reflow : function () {}
|
271
297
|
};
|
272
|
-
}(jQuery,
|
298
|
+
}(jQuery, window, window.document));
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.topbar = {
|
5
5
|
name : 'topbar',
|
6
6
|
|
7
|
-
version: '5.2.
|
7
|
+
version: '5.2.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
index : 0,
|
@@ -28,11 +28,10 @@
|
|
28
28
|
self.S('[' + this.attr_name() + ']', this.scope).each(function () {
|
29
29
|
var topbar = $(this),
|
30
30
|
settings = topbar.data(self.attr_name(true) + '-init'),
|
31
|
-
section = self.S('section', this)
|
32
|
-
titlebar = topbar.children().filter('ul').first();
|
31
|
+
section = self.S('section', this);
|
33
32
|
topbar.data('index', 0);
|
34
33
|
var topbarContainer = topbar.parent();
|
35
|
-
if(topbarContainer.hasClass('fixed') || self.is_sticky(topbar, topbarContainer, settings) ) {
|
34
|
+
if (topbarContainer.hasClass('fixed') || self.is_sticky(topbar, topbarContainer, settings) ) {
|
36
35
|
self.settings.sticky_class = settings.sticky_class;
|
37
36
|
self.settings.sticky_topbar = topbar;
|
38
37
|
topbar.data('height', topbarContainer.outerHeight());
|
@@ -41,7 +40,9 @@
|
|
41
40
|
topbar.data('height', topbar.outerHeight());
|
42
41
|
}
|
43
42
|
|
44
|
-
if (!settings.assembled)
|
43
|
+
if (!settings.assembled) {
|
44
|
+
self.assemble(topbar);
|
45
|
+
}
|
45
46
|
|
46
47
|
if (settings.is_hover) {
|
47
48
|
self.S('.has-dropdown', topbar).addClass('not-click');
|
@@ -76,12 +77,13 @@
|
|
76
77
|
},
|
77
78
|
|
78
79
|
toggle: function (toggleEl) {
|
79
|
-
var self = this
|
80
|
+
var self = this,
|
81
|
+
topbar;
|
80
82
|
|
81
83
|
if (toggleEl) {
|
82
|
-
|
84
|
+
topbar = self.S(toggleEl).closest('[' + this.attr_name() + ']');
|
83
85
|
} else {
|
84
|
-
|
86
|
+
topbar = self.S('[' + this.attr_name() + ']');
|
85
87
|
}
|
86
88
|
|
87
89
|
var settings = topbar.data(this.attr_name(true) + '-init');
|
@@ -120,15 +122,15 @@
|
|
120
122
|
|
121
123
|
window.scrollTo(0,0);
|
122
124
|
} else {
|
123
|
-
|
125
|
+
topbar.parent().removeClass('expanded');
|
124
126
|
}
|
125
127
|
}
|
126
128
|
} else {
|
127
|
-
if(self.is_sticky(topbar, topbar.parent(), settings)) {
|
129
|
+
if (self.is_sticky(topbar, topbar.parent(), settings)) {
|
128
130
|
topbar.parent().addClass('fixed');
|
129
131
|
}
|
130
132
|
|
131
|
-
if(topbar.parent().hasClass('fixed')) {
|
133
|
+
if (topbar.parent().hasClass('fixed')) {
|
132
134
|
if (!topbar.hasClass('expanded')) {
|
133
135
|
topbar.removeClass('fixed');
|
134
136
|
topbar.parent().removeClass('expanded');
|
@@ -330,8 +332,7 @@
|
|
330
332
|
assemble : function (topbar) {
|
331
333
|
var self = this,
|
332
334
|
settings = topbar.data(this.attr_name(true) + '-init'),
|
333
|
-
section = self.S('section', topbar)
|
334
|
-
titlebar = $(this).children().filter('ul').first();
|
335
|
+
section = self.S('section', topbar);
|
335
336
|
|
336
337
|
// Pull element out of the DOM for manipulation
|
337
338
|
section.detach();
|
@@ -339,13 +340,14 @@
|
|
339
340
|
self.S('.has-dropdown>a', section).each(function () {
|
340
341
|
var $link = self.S(this),
|
341
342
|
$dropdown = $link.siblings('.dropdown'),
|
342
|
-
url = $link.attr('href')
|
343
|
+
url = $link.attr('href'),
|
344
|
+
$titleLi;
|
343
345
|
|
344
346
|
if (!$dropdown.find('.title.back').length) {
|
345
347
|
if (settings.mobile_show_parent_link && url && url.length > 1) {
|
346
|
-
|
348
|
+
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
|
347
349
|
} else {
|
348
|
-
|
350
|
+
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li>');
|
349
351
|
}
|
350
352
|
|
351
353
|
// Copy link to subnav
|
@@ -375,14 +377,15 @@
|
|
375
377
|
var total = 0,
|
376
378
|
self = this;
|
377
379
|
|
378
|
-
$('> li', ul).each(function () {
|
380
|
+
$('> li', ul).each(function () {
|
381
|
+
total += self.S(this).outerHeight(true);
|
382
|
+
});
|
379
383
|
|
380
384
|
return total;
|
381
385
|
},
|
382
386
|
|
383
387
|
sticky : function () {
|
384
|
-
var
|
385
|
-
self = this;
|
388
|
+
var self = this;
|
386
389
|
|
387
390
|
this.S(window).on('scroll', function() {
|
388
391
|
self.update_sticky_positioning();
|