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.
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/update-gem.sh +12 -7
- data/vendor/assets/javascripts/foundation.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.abide.js +62 -40
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +7 -7
- data/vendor/assets/javascripts/foundation/foundation.alert.js +3 -3
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +46 -48
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +71 -62
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +18 -14
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +31 -25
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +81 -73
- data/vendor/assets/javascripts/foundation/foundation.js +54 -41
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +44 -39
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +19 -19
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +133 -129
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +73 -51
- data/vendor/assets/javascripts/foundation/foundation.slider.js +63 -67
- data/vendor/assets/javascripts/foundation/foundation.tab.js +39 -19
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +30 -23
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +66 -59
- data/vendor/assets/stylesheets/foundation/_functions.scss +1 -1
- data/vendor/assets/stylesheets/foundation/_settings.scss +99 -77
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +1 -0
- data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +7 -4
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +2 -1
- data/vendor/assets/stylesheets/foundation/components/_clearing.scss +11 -2
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +1 -0
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +13 -6
- data/vendor/assets/stylesheets/foundation/components/_global.scss +3 -3
- data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +32 -2
- data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +6 -4
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +15 -29
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +12 -0
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +1 -2
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +3 -1
- data/vendor/assets/stylesheets/foundation/components/_toolbar.scss +3 -1
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +10 -3
- data/vendor/assets/stylesheets/foundation/components/_type.scss +1 -62
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +78 -12
- metadata +2 -3
- data/vendor/assets/_settings.scss +0 -1445
@@ -6,7 +6,7 @@
|
|
6
6
|
Foundation.libs.joyride = {
|
7
7
|
name : 'joyride',
|
8
8
|
|
9
|
-
version : '5.5.
|
9
|
+
version : '5.5.1',
|
10
10
|
|
11
11
|
defaults : {
|
12
12
|
expose : false, // turn on or off the expose feature
|
@@ -32,16 +32,16 @@
|
|
32
32
|
tip_container : 'body', // Where will the tip be attached
|
33
33
|
abort_on_close : true, // When true, the close event will not fire any callback
|
34
34
|
tip_location_patterns : {
|
35
|
-
top: ['bottom'],
|
36
|
-
bottom: [], // bottom should not need to be repositioned
|
37
|
-
left: ['right', 'top', 'bottom'],
|
38
|
-
right: ['left', 'top', 'bottom']
|
35
|
+
top : ['bottom'],
|
36
|
+
bottom : [], // bottom should not need to be repositioned
|
37
|
+
left : ['right', 'top', 'bottom'],
|
38
|
+
right : ['left', 'top', 'bottom']
|
39
39
|
},
|
40
|
-
post_ride_callback : function (){}, // A method to call once the tour closes (canceled or complete)
|
41
|
-
post_step_callback : function (){}, // A method to call after each step
|
42
|
-
pre_step_callback : function (){}, // A method to call before each step
|
43
|
-
pre_ride_callback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
|
44
|
-
post_expose_callback : function (){}, // A method to call after an element has been exposed
|
40
|
+
post_ride_callback : function () {}, // A method to call once the tour closes (canceled or complete)
|
41
|
+
post_step_callback : function () {}, // A method to call after each step
|
42
|
+
pre_step_callback : function () {}, // A method to call before each step
|
43
|
+
pre_ride_callback : function () {}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
|
44
|
+
post_expose_callback : function () {}, // A method to call after an element has been exposed
|
45
45
|
template : { // HTML segments for tip layout
|
46
46
|
link : '<a href="#close" class="joyride-close-tip">×</a>',
|
47
47
|
timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
|
@@ -64,7 +64,7 @@
|
|
64
64
|
this.bindings(method, options)
|
65
65
|
},
|
66
66
|
|
67
|
-
go_next : function() {
|
67
|
+
go_next : function () {
|
68
68
|
if (this.settings.$li.next().length < 1) {
|
69
69
|
this.end();
|
70
70
|
} else if (this.settings.timer > 0) {
|
@@ -78,7 +78,7 @@
|
|
78
78
|
}
|
79
79
|
},
|
80
80
|
|
81
|
-
go_prev : function() {
|
81
|
+
go_prev : function () {
|
82
82
|
if (this.settings.$li.prev().length < 1) {
|
83
83
|
// Do nothing if there are no prev element
|
84
84
|
} else if (this.settings.timer > 0) {
|
@@ -111,10 +111,12 @@
|
|
111
111
|
this.end(this.settings.abort_on_close);
|
112
112
|
}.bind(this))
|
113
113
|
|
114
|
-
.on('keyup.fndtn.joyride', function(e) {
|
114
|
+
.on('keyup.fndtn.joyride', function (e) {
|
115
115
|
// Don't do anything if keystrokes are disabled
|
116
116
|
// or if the joyride is not being shown
|
117
|
-
if (!this.settings.keyboard || !this.settings.riding)
|
117
|
+
if (!this.settings.keyboard || !this.settings.riding) {
|
118
|
+
return;
|
119
|
+
}
|
118
120
|
|
119
121
|
switch (e.which) {
|
120
122
|
case 39: // right arrow
|
@@ -160,9 +162,13 @@
|
|
160
162
|
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
|
161
163
|
int_settings_count = integer_settings.length;
|
162
164
|
|
163
|
-
if (!$this.length > 0)
|
165
|
+
if (!$this.length > 0) {
|
166
|
+
return;
|
167
|
+
}
|
164
168
|
|
165
|
-
if (!this.settings.init)
|
169
|
+
if (!this.settings.init) {
|
170
|
+
this.events();
|
171
|
+
}
|
166
172
|
|
167
173
|
this.settings = $this.data(this.attr_name(true) + '-init');
|
168
174
|
|
@@ -255,10 +261,11 @@
|
|
255
261
|
txt = $.trim(txt) || 'Previous';
|
256
262
|
|
257
263
|
// Add the disabled class to the button if it's the first element
|
258
|
-
if (idx == 0)
|
264
|
+
if (idx == 0) {
|
259
265
|
txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
|
260
|
-
else
|
266
|
+
} else {
|
261
267
|
txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
|
268
|
+
}
|
262
269
|
} else {
|
263
270
|
txt = '';
|
264
271
|
}
|
@@ -267,10 +274,8 @@
|
|
267
274
|
|
268
275
|
create : function (opts) {
|
269
276
|
this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
|
270
|
-
var buttonText = opts.$li.attr(this.add_namespace('data-button'))
|
271
|
-
|
272
|
-
prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev'))
|
273
|
-
|| opts.$li.attr(this.add_namespace('data-prev-text')),
|
277
|
+
var buttonText = opts.$li.attr(this.add_namespace('data-button')) || opts.$li.attr(this.add_namespace('data-text')),
|
278
|
+
prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev')) || opts.$li.attr(this.add_namespace('data-prev-text')),
|
274
279
|
tipClass = opts.$li.attr('class'),
|
275
280
|
$tip_content = $(this.tip_template({
|
276
281
|
tip_class : tipClass,
|
@@ -287,8 +292,7 @@
|
|
287
292
|
var $timer = null;
|
288
293
|
|
289
294
|
// are we paused?
|
290
|
-
if (this.settings.$li === undefined
|
291
|
-
|| ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
|
295
|
+
if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
|
292
296
|
|
293
297
|
// don't go to the next li if the tour was paused
|
294
298
|
if (this.settings.paused) {
|
@@ -348,7 +352,7 @@
|
|
348
352
|
|
349
353
|
setTimeout(function () {
|
350
354
|
$timer.animate({
|
351
|
-
width: $timer.parent().width()
|
355
|
+
width : $timer.parent().width()
|
352
356
|
}, this.settings.timer, 'linear');
|
353
357
|
}.bind(this), this.settings.tip_animation_fade_speed);
|
354
358
|
|
@@ -357,7 +361,6 @@
|
|
357
361
|
|
358
362
|
}
|
359
363
|
|
360
|
-
|
361
364
|
} else if (/fade/i.test(this.settings.tip_animation)) {
|
362
365
|
|
363
366
|
$timer.width(0);
|
@@ -370,7 +373,7 @@
|
|
370
373
|
|
371
374
|
setTimeout(function () {
|
372
375
|
$timer.animate({
|
373
|
-
width: $timer.parent().width()
|
376
|
+
width : $timer.parent().width()
|
374
377
|
}, this.settings.timer, 'linear');
|
375
378
|
}.bind(this), this.settings.tip_animation_fade_speed);
|
376
379
|
|
@@ -415,7 +418,7 @@
|
|
415
418
|
|
416
419
|
// Prevent scroll bouncing...wait to remove from layout
|
417
420
|
this.settings.$current_tip.css('visibility', 'hidden');
|
418
|
-
setTimeout($.proxy(function() {
|
421
|
+
setTimeout($.proxy(function () {
|
419
422
|
this.hide();
|
420
423
|
this.css('visibility', 'visible');
|
421
424
|
}, this.settings.$current_tip), 0);
|
@@ -429,10 +432,11 @@
|
|
429
432
|
this.set_next_tip();
|
430
433
|
this.settings.$current_tip = this.settings.$next_tip;
|
431
434
|
} else {
|
432
|
-
if (is_prev)
|
435
|
+
if (is_prev) {
|
433
436
|
this.settings.$li = this.settings.$li.prev();
|
434
|
-
else
|
437
|
+
} else {
|
435
438
|
this.settings.$li = this.settings.$li.next();
|
439
|
+
}
|
436
440
|
this.set_next_tip();
|
437
441
|
}
|
438
442
|
|
@@ -468,7 +472,7 @@
|
|
468
472
|
|
469
473
|
if (tipOffset != 0) {
|
470
474
|
$('html, body').stop().animate({
|
471
|
-
scrollTop: tipOffset
|
475
|
+
scrollTop : tipOffset
|
472
476
|
}, this.settings.scroll_speed, 'swing');
|
473
477
|
}
|
474
478
|
},
|
@@ -502,12 +506,12 @@
|
|
502
506
|
if (this.bottom()) {
|
503
507
|
if (this.rtl) {
|
504
508
|
this.settings.$next_tip.css({
|
505
|
-
top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
506
|
-
left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
|
509
|
+
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
510
|
+
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
|
507
511
|
} else {
|
508
512
|
this.settings.$next_tip.css({
|
509
|
-
top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
510
|
-
left: this.settings.$target.offset().left + leftAdjustment});
|
513
|
+
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
514
|
+
left : this.settings.$target.offset().left + leftAdjustment});
|
511
515
|
}
|
512
516
|
|
513
517
|
this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
|
@@ -515,12 +519,12 @@
|
|
515
519
|
} else if (this.top()) {
|
516
520
|
if (this.rtl) {
|
517
521
|
this.settings.$next_tip.css({
|
518
|
-
top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
519
|
-
left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
|
522
|
+
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
523
|
+
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
|
520
524
|
} else {
|
521
525
|
this.settings.$next_tip.css({
|
522
|
-
top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
523
|
-
left: this.settings.$target.offset().left + leftAdjustment});
|
526
|
+
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
527
|
+
left : this.settings.$target.offset().left + leftAdjustment});
|
524
528
|
}
|
525
529
|
|
526
530
|
this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
|
@@ -528,16 +532,16 @@
|
|
528
532
|
} else if (this.right()) {
|
529
533
|
|
530
534
|
this.settings.$next_tip.css({
|
531
|
-
top: this.settings.$target.offset().top + topAdjustment,
|
532
|
-
left: (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
|
535
|
+
top : this.settings.$target.offset().top + topAdjustment,
|
536
|
+
left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
|
533
537
|
|
534
538
|
this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
|
535
539
|
|
536
540
|
} else if (this.left()) {
|
537
541
|
|
538
542
|
this.settings.$next_tip.css({
|
539
|
-
top: this.settings.$target.offset().top + topAdjustment,
|
540
|
-
left: (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
|
543
|
+
top : this.settings.$target.offset().top + topAdjustment,
|
544
|
+
left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
|
541
545
|
|
542
546
|
this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
|
543
547
|
|
@@ -593,12 +597,12 @@
|
|
593
597
|
|
594
598
|
if (this.top()) {
|
595
599
|
|
596
|
-
this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height});
|
600
|
+
this.settings.$next_tip.offset({top : this.settings.$target.offset().top - tip_height - nub_height});
|
597
601
|
$nub.addClass('bottom');
|
598
602
|
|
599
603
|
} else {
|
600
604
|
|
601
|
-
this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height});
|
605
|
+
this.settings.$next_tip.offset({top : this.settings.$target.offset().top + target_height + nub_height});
|
602
606
|
$nub.addClass('top');
|
603
607
|
|
604
608
|
}
|
@@ -646,14 +650,14 @@
|
|
646
650
|
|
647
651
|
if (arguments.length > 0 && arguments[0] instanceof $) {
|
648
652
|
el = arguments[0];
|
649
|
-
} else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
|
653
|
+
} else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
|
650
654
|
el = this.settings.$target;
|
651
|
-
}
|
655
|
+
} else {
|
652
656
|
return false;
|
653
657
|
}
|
654
658
|
|
655
|
-
if(el.length < 1){
|
656
|
-
if(window.console){
|
659
|
+
if (el.length < 1) {
|
660
|
+
if (window.console) {
|
657
661
|
console.error('element not valid', el);
|
658
662
|
}
|
659
663
|
return false;
|
@@ -662,39 +666,41 @@
|
|
662
666
|
expose = $(this.settings.template.expose);
|
663
667
|
this.settings.$body.append(expose);
|
664
668
|
expose.css({
|
665
|
-
top: el.offset().top,
|
666
|
-
left: el.offset().left,
|
667
|
-
width: el.outerWidth(true),
|
668
|
-
height: el.outerHeight(true)
|
669
|
+
top : el.offset().top,
|
670
|
+
left : el.offset().left,
|
671
|
+
width : el.outerWidth(true),
|
672
|
+
height : el.outerHeight(true)
|
669
673
|
});
|
670
674
|
|
671
675
|
exposeCover = $(this.settings.template.expose_cover);
|
672
676
|
|
673
677
|
origCSS = {
|
674
|
-
zIndex: el.css('z-index'),
|
675
|
-
position: el.css('position')
|
678
|
+
zIndex : el.css('z-index'),
|
679
|
+
position : el.css('position')
|
676
680
|
};
|
677
681
|
|
678
682
|
origClasses = el.attr('class') == null ? '' : el.attr('class');
|
679
683
|
|
680
|
-
el.css('z-index',parseInt(expose.css('z-index'))+1);
|
684
|
+
el.css('z-index', parseInt(expose.css('z-index')) + 1);
|
681
685
|
|
682
686
|
if (origCSS.position == 'static') {
|
683
|
-
el.css('position','relative');
|
687
|
+
el.css('position', 'relative');
|
684
688
|
}
|
685
689
|
|
686
|
-
el.data('expose-css',origCSS);
|
690
|
+
el.data('expose-css', origCSS);
|
687
691
|
el.data('orig-class', origClasses);
|
688
692
|
el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
|
689
693
|
|
690
694
|
exposeCover.css({
|
691
|
-
top: el.offset().top,
|
692
|
-
left: el.offset().left,
|
693
|
-
width: el.outerWidth(true),
|
694
|
-
height: el.outerHeight(true)
|
695
|
+
top : el.offset().top,
|
696
|
+
left : el.offset().left,
|
697
|
+
width : el.outerWidth(true),
|
698
|
+
height : el.outerHeight(true)
|
695
699
|
});
|
696
700
|
|
697
|
-
if (this.settings.modal)
|
701
|
+
if (this.settings.modal) {
|
702
|
+
this.show_modal();
|
703
|
+
}
|
698
704
|
|
699
705
|
this.settings.$body.append(exposeCover);
|
700
706
|
expose.addClass(randId);
|
@@ -707,20 +713,20 @@
|
|
707
713
|
un_expose : function () {
|
708
714
|
var exposeId,
|
709
715
|
el,
|
710
|
-
expose
|
716
|
+
expose,
|
711
717
|
origCSS,
|
712
718
|
origClasses,
|
713
719
|
clearAll = false;
|
714
720
|
|
715
721
|
if (arguments.length > 0 && arguments[0] instanceof $) {
|
716
722
|
el = arguments[0];
|
717
|
-
} else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
|
723
|
+
} else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
|
718
724
|
el = this.settings.$target;
|
719
|
-
}
|
725
|
+
} else {
|
720
726
|
return false;
|
721
727
|
}
|
722
728
|
|
723
|
-
if(el.length < 1){
|
729
|
+
if (el.length < 1) {
|
724
730
|
if (window.console) {
|
725
731
|
console.error('element not valid', el);
|
726
732
|
}
|
@@ -749,7 +755,7 @@
|
|
749
755
|
}
|
750
756
|
|
751
757
|
if (origCSS.position != el.css('position')) {
|
752
|
-
if(origCSS.position == 'static') {// this is default, no need to set it.
|
758
|
+
if (origCSS.position == 'static') {// this is default, no need to set it.
|
753
759
|
el.css('position', '');
|
754
760
|
} else {
|
755
761
|
el.css('position', origCSS.position);
|
@@ -765,7 +771,7 @@
|
|
765
771
|
this.remove_exposed(el);
|
766
772
|
},
|
767
773
|
|
768
|
-
add_exposed: function(el){
|
774
|
+
add_exposed : function (el) {
|
769
775
|
this.settings.exposed = this.settings.exposed || [];
|
770
776
|
if (el instanceof $ || typeof el === 'object') {
|
771
777
|
this.settings.exposed.push(el[0]);
|
@@ -774,11 +780,11 @@
|
|
774
780
|
}
|
775
781
|
},
|
776
782
|
|
777
|
-
remove_exposed: function(el){
|
783
|
+
remove_exposed : function (el) {
|
778
784
|
var search, i;
|
779
785
|
if (el instanceof $) {
|
780
786
|
search = el[0]
|
781
|
-
} else if (typeof el == 'string'){
|
787
|
+
} else if (typeof el == 'string') {
|
782
788
|
search = el;
|
783
789
|
}
|
784
790
|
|
@@ -854,7 +860,9 @@
|
|
854
860
|
var i = hidden_corners.length;
|
855
861
|
|
856
862
|
while (i--) {
|
857
|
-
if (hidden_corners[i])
|
863
|
+
if (hidden_corners[i]) {
|
864
|
+
return false;
|
865
|
+
}
|
858
866
|
}
|
859
867
|
|
860
868
|
return true;
|
@@ -882,7 +890,7 @@
|
|
882
890
|
|
883
891
|
end : function (abort) {
|
884
892
|
if (this.settings.cookie_monster) {
|
885
|
-
$.cookie(this.settings.cookie_name, 'ridden', {
|
893
|
+
$.cookie(this.settings.cookie_name, 'ridden', {expires : this.settings.cookie_expires, domain : this.settings.cookie_domain});
|
886
894
|
}
|
887
895
|
|
888
896
|
if (this.settings.timer > 0) {
|
@@ -14,7 +14,7 @@
|
|
14
14
|
var head = $('head');
|
15
15
|
|
16
16
|
while (i--) {
|
17
|
-
if(head.has('.' + class_array[i]).length === 0) {
|
17
|
+
if (head.has('.' + class_array[i]).length === 0) {
|
18
18
|
head.append('<meta class="' + class_array[i] + '" />');
|
19
19
|
}
|
20
20
|
}
|
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
// Enable FastClick if present
|
36
36
|
|
37
|
-
$(function() {
|
37
|
+
$(function () {
|
38
38
|
if (typeof FastClick !== 'undefined') {
|
39
39
|
// Don't attach to body if undefined
|
40
40
|
if (typeof document.body !== 'undefined') {
|
@@ -52,7 +52,9 @@
|
|
52
52
|
var cont;
|
53
53
|
if (context.jquery) {
|
54
54
|
cont = context[0];
|
55
|
-
if (!cont)
|
55
|
+
if (!cont) {
|
56
|
+
return context;
|
57
|
+
}
|
56
58
|
} else {
|
57
59
|
cont = context;
|
58
60
|
}
|
@@ -69,8 +71,12 @@
|
|
69
71
|
|
70
72
|
var attr_name = function (init) {
|
71
73
|
var arr = [];
|
72
|
-
if (!init)
|
73
|
-
|
74
|
+
if (!init) {
|
75
|
+
arr.push('data');
|
76
|
+
}
|
77
|
+
if (this.namespace.length > 0) {
|
78
|
+
arr.push(this.namespace);
|
79
|
+
}
|
74
80
|
arr.push(this.name);
|
75
81
|
|
76
82
|
return arr.join('-');
|
@@ -100,24 +106,20 @@
|
|
100
106
|
|
101
107
|
var bindings = function (method, options) {
|
102
108
|
var self = this,
|
103
|
-
|
109
|
+
bind = function(){
|
110
|
+
var $this = S(this),
|
111
|
+
should_bind_events = !$this.data(self.attr_name(true) + '-init');
|
112
|
+
$this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options($this)));
|
104
113
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
this.events(this.scope);
|
110
|
-
}
|
114
|
+
if (should_bind_events) {
|
115
|
+
self.events(this);
|
116
|
+
}
|
117
|
+
};
|
111
118
|
|
119
|
+
if (S(this.scope).is('[' + this.attr_name() +']')) {
|
120
|
+
bind.call(this.scope);
|
112
121
|
} else {
|
113
|
-
S('[' + this.attr_name() +']', this.scope).each(
|
114
|
-
var should_bind_events = !S(this).data(self.attr_name(true) + '-init');
|
115
|
-
S(this).data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options(S(this))));
|
116
|
-
|
117
|
-
if (should_bind_events) {
|
118
|
-
self.events(this);
|
119
|
-
}
|
120
|
-
});
|
122
|
+
S('[' + this.attr_name() +']', this.scope).each(bind);
|
121
123
|
}
|
122
124
|
// # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating.
|
123
125
|
if (typeof method === 'string') {
|
@@ -159,7 +161,7 @@
|
|
159
161
|
https://github.com/paulirish/matchMedia.js
|
160
162
|
*/
|
161
163
|
|
162
|
-
window.matchMedia = window.matchMedia || (function( doc ) {
|
164
|
+
window.matchMedia = window.matchMedia || (function ( doc ) {
|
163
165
|
|
164
166
|
'use strict';
|
165
167
|
|
@@ -184,8 +186,8 @@
|
|
184
186
|
docElem.removeChild( fakeBody );
|
185
187
|
|
186
188
|
return {
|
187
|
-
matches: bool,
|
188
|
-
media: q
|
189
|
+
matches : bool,
|
190
|
+
media : q
|
189
191
|
};
|
190
192
|
|
191
193
|
};
|
@@ -201,7 +203,8 @@
|
|
201
203
|
* Licensed under the MIT license.
|
202
204
|
*/
|
203
205
|
|
204
|
-
(function(
|
206
|
+
(function(jQuery) {
|
207
|
+
|
205
208
|
|
206
209
|
// requestAnimationFrame polyfill adapted from Erik Möller
|
207
210
|
// fixes from Paul Irish and Tino Zijdel
|
@@ -267,8 +270,7 @@
|
|
267
270
|
|
268
271
|
}
|
269
272
|
|
270
|
-
}(
|
271
|
-
|
273
|
+
}( $ ));
|
272
274
|
|
273
275
|
function removeQuotes (string) {
|
274
276
|
if (typeof string === 'string' || string instanceof String) {
|
@@ -281,7 +283,7 @@
|
|
281
283
|
window.Foundation = {
|
282
284
|
name : 'Foundation',
|
283
285
|
|
284
|
-
version : '5.5.
|
286
|
+
version : '5.5.1',
|
285
287
|
|
286
288
|
media_queries : {
|
287
289
|
'small' : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
@@ -297,8 +299,8 @@
|
|
297
299
|
|
298
300
|
stylesheet : $('<style></style>').appendTo('head')[0].sheet,
|
299
301
|
|
300
|
-
global: {
|
301
|
-
namespace: undefined
|
302
|
+
global : {
|
303
|
+
namespace : undefined
|
302
304
|
},
|
303
305
|
|
304
306
|
init : function (scope, libraries, method, options, response) {
|
@@ -323,7 +325,7 @@
|
|
323
325
|
}
|
324
326
|
}
|
325
327
|
|
326
|
-
S(window).load(function(){
|
328
|
+
S(window).load(function () {
|
327
329
|
S(window)
|
328
330
|
.trigger('resize.fndtn.clearing')
|
329
331
|
.trigger('resize.fndtn.dropdown')
|
@@ -345,8 +347,7 @@
|
|
345
347
|
if (args && args.hasOwnProperty(lib)) {
|
346
348
|
if (typeof this.libs[lib].settings !== 'undefined') {
|
347
349
|
$.extend(true, this.libs[lib].settings, args[lib]);
|
348
|
-
}
|
349
|
-
else if (typeof this.libs[lib].defaults !== 'undefined') {
|
350
|
+
} else if (typeof this.libs[lib].defaults !== 'undefined') {
|
350
351
|
$.extend(true, this.libs[lib].defaults, args[lib]);
|
351
352
|
}
|
352
353
|
return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]);
|
@@ -381,7 +382,7 @@
|
|
381
382
|
}
|
382
383
|
},
|
383
384
|
|
384
|
-
set_namespace: function () {
|
385
|
+
set_namespace : function () {
|
385
386
|
|
386
387
|
// Description:
|
387
388
|
// Don't bother reading the namespace out of the meta tag
|
@@ -469,12 +470,16 @@
|
|
469
470
|
var context = this, args = arguments;
|
470
471
|
var later = function () {
|
471
472
|
timeout = null;
|
472
|
-
if (!immediate)
|
473
|
+
if (!immediate) {
|
474
|
+
result = func.apply(context, args);
|
475
|
+
}
|
473
476
|
};
|
474
477
|
var callNow = immediate && !timeout;
|
475
478
|
clearTimeout(timeout);
|
476
479
|
timeout = setTimeout(later, delay);
|
477
|
-
if (callNow)
|
480
|
+
if (callNow) {
|
481
|
+
result = func.apply(context, args);
|
482
|
+
}
|
478
483
|
return result;
|
479
484
|
};
|
480
485
|
},
|
@@ -511,11 +516,13 @@
|
|
511
516
|
ii = opts_arr.length;
|
512
517
|
|
513
518
|
function isNumber (o) {
|
514
|
-
return !
|
519
|
+
return !isNaN (o - 0) && o !== null && o !== '' && o !== false && o !== true;
|
515
520
|
}
|
516
521
|
|
517
522
|
function trim (str) {
|
518
|
-
if (typeof str === 'string')
|
523
|
+
if (typeof str === 'string') {
|
524
|
+
return $.trim(str);
|
525
|
+
}
|
519
526
|
return str;
|
520
527
|
}
|
521
528
|
|
@@ -523,8 +530,12 @@
|
|
523
530
|
p = opts_arr[ii].split(':');
|
524
531
|
p = [p[0], p.slice(1).join(':')];
|
525
532
|
|
526
|
-
if (/true/i.test(p[1]))
|
527
|
-
|
533
|
+
if (/true/i.test(p[1])) {
|
534
|
+
p[1] = true;
|
535
|
+
}
|
536
|
+
if (/false/i.test(p[1])) {
|
537
|
+
p[1] = false;
|
538
|
+
}
|
528
539
|
if (isNumber(p[1])) {
|
529
540
|
if (p[1].indexOf('.') === -1) {
|
530
541
|
p[1] = parseInt(p[1], 10);
|
@@ -550,7 +561,7 @@
|
|
550
561
|
//
|
551
562
|
// Class (String): Class name for the generated <meta> tag
|
552
563
|
register_media : function (media, media_class) {
|
553
|
-
if(Foundation.media_queries[media] === undefined) {
|
564
|
+
if (Foundation.media_queries[media] === undefined) {
|
554
565
|
$('head').append('<meta class="' + media_class + '"/>');
|
555
566
|
Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family'));
|
556
567
|
}
|
@@ -612,7 +623,9 @@
|
|
612
623
|
// Returns:
|
613
624
|
// Rand (String): Pseudo-random, alphanumeric string.
|
614
625
|
random_str : function () {
|
615
|
-
if (!this.fidx)
|
626
|
+
if (!this.fidx) {
|
627
|
+
this.fidx = 0;
|
628
|
+
}
|
616
629
|
this.prefix = this.prefix || [(this.name || 'F'), (+new Date).toString(36)].join('-');
|
617
630
|
|
618
631
|
return this.prefix + (this.fidx++).toString(36);
|