foundation-rails 6.6.1.0 → 6.6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/vendor/assets/js/foundation.cjs.js +164 -127
- data/vendor/assets/js/foundation.cjs.js.map +1 -1
- data/vendor/assets/js/foundation.es6.js +135 -102
- data/vendor/assets/js/foundation.es6.js.map +1 -1
- data/vendor/assets/js/foundation.esm.js +164 -127
- data/vendor/assets/js/foundation.esm.js.map +1 -1
- data/vendor/assets/js/foundation.js +159 -155
- data/vendor/assets/js/foundation.js.map +1 -1
- data/vendor/assets/js/foundation.min.js +1 -1
- data/vendor/assets/js/foundation.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.js +60 -44
- data/vendor/assets/js/plugins/foundation.abide.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.js +12 -6
- data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.js +1 -3
- data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.js +9 -13
- data/vendor/assets/js/plugins/foundation.core.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.js +2 -2
- data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.js +5 -8
- data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js +7 -5
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.js +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.js +320 -6
- data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.js +2 -7
- data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.js +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +4 -14
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.js +2 -2
- data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.js +4 -8
- data/vendor/assets/js/plugins/foundation.slider.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.js +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.js +1 -2
- data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.js +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.js +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.js +2 -4
- data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.js +61 -63
- data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.js +5 -1
- data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.js +5 -2
- data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.js +1 -1
- data/vendor/assets/scss/_global.scss +2 -2
- data/vendor/assets/scss/components/_accordion.scss +2 -2
- data/vendor/assets/scss/components/_badge.scss +2 -2
- data/vendor/assets/scss/components/_breadcrumbs.scss +2 -2
- data/vendor/assets/scss/components/_button-group.scss +11 -6
- data/vendor/assets/scss/components/_button.scss +2 -2
- data/vendor/assets/scss/components/_callout.scss +2 -2
- data/vendor/assets/scss/components/_card.scss +2 -2
- data/vendor/assets/scss/components/_close-button.scss +2 -2
- data/vendor/assets/scss/components/_drilldown.scss +2 -2
- data/vendor/assets/scss/components/_dropdown-menu.scss +2 -2
- data/vendor/assets/scss/components/_dropdown.scss +2 -2
- data/vendor/assets/scss/components/_flex.scss +2 -2
- data/vendor/assets/scss/components/_float.scss +2 -2
- data/vendor/assets/scss/components/_label.scss +2 -2
- data/vendor/assets/scss/components/_media-object.scss +2 -2
- data/vendor/assets/scss/components/_menu.scss +2 -2
- data/vendor/assets/scss/components/_off-canvas.scss +2 -2
- data/vendor/assets/scss/components/_orbit.scss +2 -2
- data/vendor/assets/scss/components/_pagination.scss +2 -2
- data/vendor/assets/scss/components/_progress-bar.scss +2 -2
- data/vendor/assets/scss/components/_responsive-embed.scss +2 -2
- data/vendor/assets/scss/components/_reveal.scss +2 -2
- data/vendor/assets/scss/components/_slider.scss +2 -2
- data/vendor/assets/scss/components/_sticky.scss +2 -2
- data/vendor/assets/scss/components/_switch.scss +2 -2
- data/vendor/assets/scss/components/_table.scss +2 -2
- data/vendor/assets/scss/components/_tabs.scss +2 -2
- data/vendor/assets/scss/components/_thumbnail.scss +2 -2
- data/vendor/assets/scss/components/_title-bar.scss +2 -2
- data/vendor/assets/scss/components/_tooltip.scss +2 -2
- data/vendor/assets/scss/components/_top-bar.scss +2 -2
- data/vendor/assets/scss/components/_visibility.scss +3 -3
- data/vendor/assets/scss/forms/_checkbox.scss +2 -2
- data/vendor/assets/scss/forms/_error.scss +2 -2
- data/vendor/assets/scss/forms/_fieldset.scss +2 -2
- data/vendor/assets/scss/forms/_forms.scss +2 -2
- data/vendor/assets/scss/forms/_help-text.scss +2 -2
- data/vendor/assets/scss/forms/_input-group.scss +2 -2
- data/vendor/assets/scss/forms/_label.scss +2 -2
- data/vendor/assets/scss/forms/_meter.scss +2 -2
- data/vendor/assets/scss/forms/_progress.scss +2 -2
- data/vendor/assets/scss/forms/_range.scss +2 -2
- data/vendor/assets/scss/forms/_select.scss +2 -2
- data/vendor/assets/scss/forms/_text.scss +2 -2
- data/vendor/assets/scss/foundation.scss +3 -3
- data/vendor/assets/scss/grid/_classes.scss +2 -2
- data/vendor/assets/scss/grid/_column.scss +2 -2
- data/vendor/assets/scss/grid/_flex-grid.scss +2 -2
- data/vendor/assets/scss/grid/_grid.scss +2 -2
- data/vendor/assets/scss/grid/_gutter.scss +2 -2
- data/vendor/assets/scss/grid/_layout.scss +2 -2
- data/vendor/assets/scss/grid/_position.scss +2 -2
- data/vendor/assets/scss/grid/_row.scss +2 -2
- data/vendor/assets/scss/grid/_size.scss +2 -2
- data/vendor/assets/scss/prototype/_arrow.scss +2 -2
- data/vendor/assets/scss/prototype/_border-box.scss +2 -2
- data/vendor/assets/scss/prototype/_border-none.scss +2 -2
- data/vendor/assets/scss/prototype/_bordered.scss +2 -2
- data/vendor/assets/scss/prototype/_box.scss +2 -2
- data/vendor/assets/scss/prototype/_display.scss +2 -2
- data/vendor/assets/scss/prototype/_font-styling.scss +2 -2
- data/vendor/assets/scss/prototype/_list-style-type.scss +2 -2
- data/vendor/assets/scss/prototype/_overflow.scss +2 -2
- data/vendor/assets/scss/prototype/_position.scss +2 -2
- data/vendor/assets/scss/prototype/_prototype.scss +2 -2
- data/vendor/assets/scss/prototype/_rotate.scss +2 -2
- data/vendor/assets/scss/prototype/_rounded.scss +2 -2
- data/vendor/assets/scss/prototype/_separator.scss +2 -2
- data/vendor/assets/scss/prototype/_shadow.scss +2 -2
- data/vendor/assets/scss/prototype/_sizing.scss +2 -2
- data/vendor/assets/scss/prototype/_spacing.scss +2 -2
- data/vendor/assets/scss/prototype/_text-decoration.scss +2 -2
- data/vendor/assets/scss/prototype/_text-transformation.scss +2 -2
- data/vendor/assets/scss/prototype/_text-utilities.scss +2 -2
- data/vendor/assets/scss/typography/_alignment.scss +2 -2
- data/vendor/assets/scss/typography/_base.scss +2 -2
- data/vendor/assets/scss/typography/_helpers.scss +2 -2
- data/vendor/assets/scss/typography/_print.scss +2 -2
- data/vendor/assets/scss/typography/_typography.scss +2 -2
- data/vendor/assets/scss/util/_breakpoint.scss +3 -3
- data/vendor/assets/scss/util/_color.scss +2 -2
- data/vendor/assets/scss/util/_direction.scss +2 -2
- data/vendor/assets/scss/util/_math.scss +2 -2
- data/vendor/assets/scss/util/_mixins.scss +2 -2
- data/vendor/assets/scss/util/_selector.scss +2 -2
- data/vendor/assets/scss/util/_typography.scss +2 -2
- data/vendor/assets/scss/util/_unit.scss +2 -2
- data/vendor/assets/scss/util/_util.scss +2 -2
- data/vendor/assets/scss/util/_value.scss +2 -2
- data/vendor/assets/scss/xy-grid/_cell.scss +2 -2
- data/vendor/assets/scss/xy-grid/_classes.scss +8 -8
- data/vendor/assets/scss/xy-grid/_collapse.scss +2 -2
- data/vendor/assets/scss/xy-grid/_grid.scss +2 -2
- data/vendor/assets/scss/xy-grid/_gutters.scss +2 -2
- data/vendor/assets/scss/xy-grid/_layout.scss +2 -2
- data/vendor/assets/scss/xy-grid/_position.scss +2 -2
- data/vendor/assets/scss/xy-grid/_xy-grid.scss +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1251e36f7d383333a633d14e60b87ae6d76730e1aeef182d1142ff1ccde8d0f
|
4
|
+
data.tar.gz: 4c186c2a357e496a77c95498fd47b3008b3138d42bdf3d632ba13e91265547b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89c7d2d10daaead74149bc2bc4336bd8df43f35314a7c1bd88fadc707b4dbcd4e573a57036a722e15ea0cf0c33895380e115e45c5c1d310831bf88e064e4c021
|
7
|
+
data.tar.gz: 9ee1323c2b9180cb02ae6d5935f4ac22f9ae587cf364e9c0391371ad2a2585d8a322cfc9a177f3a2060e7df03797de3ca30eb5911327118aef4dd84682cc37f0
|
data/Gemfile.lock
CHANGED
data/bower.json
CHANGED
@@ -211,16 +211,16 @@ function transitionend($elem) {
|
|
211
211
|
var elem = document.createElement('div'),
|
212
212
|
end;
|
213
213
|
|
214
|
-
for (var
|
215
|
-
if (typeof elem.style[
|
216
|
-
end = transitions[
|
214
|
+
for (var transition in transitions) {
|
215
|
+
if (typeof elem.style[transition] !== 'undefined') {
|
216
|
+
end = transitions[transition];
|
217
217
|
}
|
218
218
|
}
|
219
219
|
|
220
220
|
if (end) {
|
221
221
|
return end;
|
222
222
|
} else {
|
223
|
-
|
223
|
+
setTimeout(function () {
|
224
224
|
$elem.triggerHandler('transitionend', [$elem]);
|
225
225
|
}, 1);
|
226
226
|
return 'transitionend';
|
@@ -635,7 +635,7 @@ function parseStyleToObject(str) {
|
|
635
635
|
return styleObject;
|
636
636
|
}
|
637
637
|
|
638
|
-
var FOUNDATION_VERSION = '6.6.
|
638
|
+
var FOUNDATION_VERSION = '6.6.2'; // Global Foundation object
|
639
639
|
// This is attached to the window, or used as a module for AMD/Browserify
|
640
640
|
|
641
641
|
var Foundation = {
|
@@ -800,8 +800,8 @@ var Foundation = {
|
|
800
800
|
};
|
801
801
|
|
802
802
|
if ($el.attr('data-options')) {
|
803
|
-
|
804
|
-
var opt =
|
803
|
+
$el.attr('data-options').split(';').forEach(function (option, _index) {
|
804
|
+
var opt = option.split(':').map(function (el) {
|
805
805
|
return el.trim();
|
806
806
|
});
|
807
807
|
if (opt[0]) opts[opt[0]] = parseValue(opt[1]);
|
@@ -1110,63 +1110,66 @@ function GetDimensions(elem) {
|
|
1110
1110
|
function GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) {
|
1111
1111
|
var $eleDims = GetDimensions(element),
|
1112
1112
|
$anchorDims = anchor ? GetDimensions(anchor) : null;
|
1113
|
-
var topVal, leftVal;
|
1113
|
+
var topVal, leftVal;
|
1114
1114
|
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1115
|
+
if ($anchorDims !== null) {
|
1116
|
+
// set position related attribute
|
1117
|
+
switch (position) {
|
1118
|
+
case 'top':
|
1119
|
+
topVal = $anchorDims.offset.top - ($eleDims.height + vOffset);
|
1120
|
+
break;
|
1119
1121
|
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1122
|
+
case 'bottom':
|
1123
|
+
topVal = $anchorDims.offset.top + $anchorDims.height + vOffset;
|
1124
|
+
break;
|
1123
1125
|
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1126
|
+
case 'left':
|
1127
|
+
leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset);
|
1128
|
+
break;
|
1127
1129
|
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1130
|
+
case 'right':
|
1131
|
+
leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset;
|
1132
|
+
break;
|
1133
|
+
} // set alignment related attribute
|
1132
1134
|
|
1133
1135
|
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1136
|
+
switch (position) {
|
1137
|
+
case 'top':
|
1138
|
+
case 'bottom':
|
1139
|
+
switch (alignment) {
|
1140
|
+
case 'left':
|
1141
|
+
leftVal = $anchorDims.offset.left + hOffset;
|
1142
|
+
break;
|
1141
1143
|
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1144
|
+
case 'right':
|
1145
|
+
leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset;
|
1146
|
+
break;
|
1145
1147
|
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1148
|
+
case 'center':
|
1149
|
+
leftVal = isOverflow ? hOffset : $anchorDims.offset.left + $anchorDims.width / 2 - $eleDims.width / 2 + hOffset;
|
1150
|
+
break;
|
1151
|
+
}
|
1150
1152
|
|
1151
|
-
|
1153
|
+
break;
|
1152
1154
|
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1155
|
+
case 'right':
|
1156
|
+
case 'left':
|
1157
|
+
switch (alignment) {
|
1158
|
+
case 'bottom':
|
1159
|
+
topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height;
|
1160
|
+
break;
|
1159
1161
|
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1162
|
+
case 'top':
|
1163
|
+
topVal = $anchorDims.offset.top + vOffset;
|
1164
|
+
break;
|
1163
1165
|
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1166
|
+
case 'center':
|
1167
|
+
topVal = $anchorDims.offset.top + vOffset + $anchorDims.height / 2 - $eleDims.height / 2;
|
1168
|
+
break;
|
1169
|
+
}
|
1168
1170
|
|
1169
|
-
|
1171
|
+
break;
|
1172
|
+
}
|
1170
1173
|
}
|
1171
1174
|
|
1172
1175
|
return {
|
@@ -1444,6 +1447,10 @@ function animate(isIn, element, animation, cb) {
|
|
1444
1447
|
}); // Start the animation
|
1445
1448
|
|
1446
1449
|
requestAnimationFrame(function () {
|
1450
|
+
// will trigger the browser to synchronously calculate the style and layout
|
1451
|
+
// also called reflow or layout thrashing
|
1452
|
+
// see https://gist.github.com/paulirish/5d52fb081b3570c81e3a
|
1453
|
+
element[0].offsetWidth;
|
1447
1454
|
element.css('transition', '').addClass(activeClass);
|
1448
1455
|
}); // Clean up the animation when it finishes
|
1449
1456
|
|
@@ -1466,8 +1473,11 @@ var Nest = {
|
|
1466
1473
|
Feather: function Feather(menu) {
|
1467
1474
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zf';
|
1468
1475
|
menu.attr('role', 'menubar');
|
1469
|
-
|
1476
|
+
menu.find('a').attr({
|
1470
1477
|
'role': 'menuitem'
|
1478
|
+
});
|
1479
|
+
var items = menu.find('li').attr({
|
1480
|
+
'role': 'none'
|
1471
1481
|
}),
|
1472
1482
|
subMenuClass = "is-".concat(type, "-submenu"),
|
1473
1483
|
subItemClass = "".concat(subMenuClass, "-item"),
|
@@ -2071,11 +2081,7 @@ function hyphenate$1(str) {
|
|
2071
2081
|
}
|
2072
2082
|
|
2073
2083
|
function getPluginName(obj) {
|
2074
|
-
|
2075
|
-
return hyphenate$1(obj.constructor.name);
|
2076
|
-
} else {
|
2077
|
-
return hyphenate$1(obj.className);
|
2078
|
-
}
|
2084
|
+
return hyphenate$1(obj.className);
|
2079
2085
|
}
|
2080
2086
|
|
2081
2087
|
/**
|
@@ -2210,10 +2216,10 @@ function (_Plugin) {
|
|
2210
2216
|
} else if (typeof this.formnovalidate === 'boolean') {
|
2211
2217
|
// triggered by $submit
|
2212
2218
|
return this.formnovalidate;
|
2213
|
-
}
|
2214
|
-
|
2215
|
-
|
2216
|
-
|
2219
|
+
} // triggered by Enter in non-submit input
|
2220
|
+
|
2221
|
+
|
2222
|
+
return this.$submits.length ? this.$submits[0].getAttribute('formnovalidate') !== null : false;
|
2217
2223
|
}
|
2218
2224
|
/**
|
2219
2225
|
* Enables the whole validation
|
@@ -2273,12 +2279,15 @@ function (_Plugin) {
|
|
2273
2279
|
* This allows for multiple form errors per input, though if none are found, no form errors will be shown.
|
2274
2280
|
*
|
2275
2281
|
* @param {Object} $el - jQuery object to use as reference to find the form error selector.
|
2282
|
+
* @param {String[]} [failedValidators] - List of failed validators.
|
2276
2283
|
* @returns {Object} jQuery object with the selector.
|
2277
2284
|
*/
|
2278
2285
|
|
2279
2286
|
}, {
|
2280
2287
|
key: "findFormError",
|
2281
|
-
value: function findFormError($el) {
|
2288
|
+
value: function findFormError($el, failedValidators) {
|
2289
|
+
var _this4 = this;
|
2290
|
+
|
2282
2291
|
var id = $el.length ? $el[0].id : '';
|
2283
2292
|
var $error = $el.siblings(this.options.formErrorSelector);
|
2284
2293
|
|
@@ -2290,6 +2299,14 @@ function (_Plugin) {
|
|
2290
2299
|
$error = $error.add(this.$element.find("[data-form-error-for=\"".concat(id, "\"]")));
|
2291
2300
|
}
|
2292
2301
|
|
2302
|
+
if (!!failedValidators) {
|
2303
|
+
$error = $error.not('[data-form-error-on]');
|
2304
|
+
failedValidators.forEach(function (v) {
|
2305
|
+
$error = $error.add($el.siblings("[data-form-error-on=\"".concat(v, "\"]")));
|
2306
|
+
$error = $error.add(_this4.$element.find("[data-form-error-for=\"".concat(id, "\"][data-form-error-on=\"").concat(v, "\"]")));
|
2307
|
+
});
|
2308
|
+
}
|
2309
|
+
|
2293
2310
|
return $error;
|
2294
2311
|
}
|
2295
2312
|
/**
|
@@ -2325,12 +2342,12 @@ function (_Plugin) {
|
|
2325
2342
|
}, {
|
2326
2343
|
key: "findRadioLabels",
|
2327
2344
|
value: function findRadioLabels($els) {
|
2328
|
-
var
|
2345
|
+
var _this5 = this;
|
2329
2346
|
|
2330
2347
|
var labels = $els.map(function (i, el) {
|
2331
2348
|
var id = el.id;
|
2332
2349
|
|
2333
|
-
var $label =
|
2350
|
+
var $label = _this5.$element.find("label[for=\"".concat(id, "\"]"));
|
2334
2351
|
|
2335
2352
|
if (!$label.length) {
|
2336
2353
|
$label = $(el).closest('label');
|
@@ -2352,12 +2369,12 @@ function (_Plugin) {
|
|
2352
2369
|
}, {
|
2353
2370
|
key: "findCheckboxLabels",
|
2354
2371
|
value: function findCheckboxLabels($els) {
|
2355
|
-
var
|
2372
|
+
var _this6 = this;
|
2356
2373
|
|
2357
2374
|
var labels = $els.map(function (i, el) {
|
2358
2375
|
var id = el.id;
|
2359
2376
|
|
2360
|
-
var $label =
|
2377
|
+
var $label = _this6.$element.find("label[for=\"".concat(id, "\"]"));
|
2361
2378
|
|
2362
2379
|
if (!$label.length) {
|
2363
2380
|
$label = $(el).closest('label');
|
@@ -2370,13 +2387,14 @@ function (_Plugin) {
|
|
2370
2387
|
/**
|
2371
2388
|
* Adds the CSS error class as specified by the Abide settings to the label, input, and the form
|
2372
2389
|
* @param {Object} $el - jQuery object to add the class to
|
2390
|
+
* @param {String[]} [failedValidators] - List of failed validators.
|
2373
2391
|
*/
|
2374
2392
|
|
2375
2393
|
}, {
|
2376
2394
|
key: "addErrorClasses",
|
2377
|
-
value: function addErrorClasses($el) {
|
2395
|
+
value: function addErrorClasses($el, failedValidators) {
|
2378
2396
|
var $label = this.findLabel($el);
|
2379
|
-
var $formError = this.findFormError($el);
|
2397
|
+
var $formError = this.findFormError($el, failedValidators);
|
2380
2398
|
|
2381
2399
|
if ($label.length) {
|
2382
2400
|
$label.addClass(this.options.labelErrorClass);
|
@@ -2413,6 +2431,7 @@ function (_Plugin) {
|
|
2413
2431
|
errorId = GetYoDigits(6, 'abide-error');
|
2414
2432
|
$error.attr('id', errorId);
|
2415
2433
|
}
|
2434
|
+
|
2416
2435
|
$el.attr('aria-describedby', errorId);
|
2417
2436
|
}
|
2418
2437
|
|
@@ -2423,7 +2442,8 @@ function (_Plugin) {
|
|
2423
2442
|
if (typeof elemId === 'undefined') {
|
2424
2443
|
elemId = GetYoDigits(6, 'abide-input');
|
2425
2444
|
$el.attr('id', elemId);
|
2426
|
-
}
|
2445
|
+
} // For each label targeting $el, set [for] if it is not set.
|
2446
|
+
|
2427
2447
|
|
2428
2448
|
$labels.each(function (i, label) {
|
2429
2449
|
var $label = $(label);
|
@@ -2543,11 +2563,12 @@ function (_Plugin) {
|
|
2543
2563
|
}, {
|
2544
2564
|
key: "validateInput",
|
2545
2565
|
value: function validateInput($el) {
|
2566
|
+
var _this7 = this;
|
2567
|
+
|
2546
2568
|
var clearRequire = this.requiredCheck($el),
|
2547
|
-
validated = false,
|
2548
|
-
customValidator = true,
|
2549
2569
|
validator = $el.attr('data-validator'),
|
2550
|
-
|
2570
|
+
failedValidators = [],
|
2571
|
+
manageErrorClasses = true; // skip validation if disabled
|
2551
2572
|
|
2552
2573
|
if (this._validationIsDisabled()) {
|
2553
2574
|
return true;
|
@@ -2560,33 +2581,38 @@ function (_Plugin) {
|
|
2560
2581
|
|
2561
2582
|
switch ($el[0].type) {
|
2562
2583
|
case 'radio':
|
2563
|
-
|
2584
|
+
this.validateRadio($el.attr('name')) || failedValidators.push('required');
|
2564
2585
|
break;
|
2565
2586
|
|
2566
2587
|
case 'checkbox':
|
2567
|
-
|
2568
|
-
|
2588
|
+
this.validateCheckbox($el.attr('name')) || failedValidators.push('required'); // validateCheckbox() adds/removes error classes
|
2589
|
+
|
2590
|
+
manageErrorClasses = false;
|
2569
2591
|
break;
|
2570
2592
|
|
2571
2593
|
case 'select':
|
2572
2594
|
case 'select-one':
|
2573
2595
|
case 'select-multiple':
|
2574
|
-
|
2596
|
+
clearRequire || failedValidators.push('required');
|
2575
2597
|
break;
|
2576
2598
|
|
2577
2599
|
default:
|
2578
|
-
|
2600
|
+
clearRequire || failedValidators.push('required');
|
2601
|
+
this.validateText($el) || failedValidators.push('pattern');
|
2579
2602
|
}
|
2580
2603
|
|
2581
2604
|
if (validator) {
|
2582
|
-
|
2605
|
+
var required = $el.attr('required') ? true : false;
|
2606
|
+
validator.split(' ').forEach(function (v) {
|
2607
|
+
_this7.options.validators[v]($el, required, $el.parent()) || failedValidators.push(v);
|
2608
|
+
});
|
2583
2609
|
}
|
2584
2610
|
|
2585
2611
|
if ($el.attr('data-equalto')) {
|
2586
|
-
|
2612
|
+
this.options.validators.equalTo($el) || failedValidators.push('equalTo');
|
2587
2613
|
}
|
2588
2614
|
|
2589
|
-
var goodToGo =
|
2615
|
+
var goodToGo = failedValidators.length === 0;
|
2590
2616
|
var message = (goodToGo ? 'valid' : 'invalid') + '.zf.abide';
|
2591
2617
|
|
2592
2618
|
if (goodToGo) {
|
@@ -2604,7 +2630,13 @@ function (_Plugin) {
|
|
2604
2630
|
}
|
2605
2631
|
}
|
2606
2632
|
|
2607
|
-
|
2633
|
+
if (manageErrorClasses) {
|
2634
|
+
this.removeErrorClasses($el);
|
2635
|
+
|
2636
|
+
if (!goodToGo) {
|
2637
|
+
this.addErrorClasses($el, failedValidators);
|
2638
|
+
}
|
2639
|
+
}
|
2608
2640
|
/**
|
2609
2641
|
* Fires when the input is done checking for validation. Event trigger is either `valid.zf.abide` or `invalid.zf.abide`
|
2610
2642
|
* Trigger includes the DOM element of the input.
|
@@ -2612,6 +2644,7 @@ function (_Plugin) {
|
|
2612
2644
|
* @event Abide#invalid
|
2613
2645
|
*/
|
2614
2646
|
|
2647
|
+
|
2615
2648
|
$el.trigger(message, [$el]);
|
2616
2649
|
return goodToGo;
|
2617
2650
|
}
|
@@ -2625,7 +2658,7 @@ function (_Plugin) {
|
|
2625
2658
|
}, {
|
2626
2659
|
key: "validateForm",
|
2627
2660
|
value: function validateForm() {
|
2628
|
-
var
|
2661
|
+
var _this8 = this;
|
2629
2662
|
|
2630
2663
|
var acc = [];
|
2631
2664
|
|
@@ -2656,7 +2689,7 @@ function (_Plugin) {
|
|
2656
2689
|
this.$element.find('[data-abide-error]').each(function (i, elem) {
|
2657
2690
|
var $elem = $(elem); // Ensure a11y attributes are set
|
2658
2691
|
|
2659
|
-
if (
|
2692
|
+
if (_this8.options.a11yAttributes) _this8.addGlobalErrorA11yAttributes($elem); // Show or hide the error
|
2660
2693
|
|
2661
2694
|
$elem.css('display', noError ? 'none' : 'block');
|
2662
2695
|
});
|
@@ -2683,7 +2716,7 @@ function (_Plugin) {
|
|
2683
2716
|
// A pattern can be passed to this function, or it will be infered from the input's "pattern" attribute, or it's "type" attribute
|
2684
2717
|
pattern = pattern || $el.attr('data-pattern') || $el.attr('pattern') || $el.attr('type');
|
2685
2718
|
var inputText = $el.val();
|
2686
|
-
var valid =
|
2719
|
+
var valid = true;
|
2687
2720
|
|
2688
2721
|
if (inputText.length) {
|
2689
2722
|
// If the pattern attribute on the element is in Abide's list of patterns, then test that regexp
|
@@ -2692,13 +2725,8 @@ function (_Plugin) {
|
|
2692
2725
|
} // If the pattern name isn't also the type attribute of the field, then test it as a regexp
|
2693
2726
|
else if (pattern !== $el.attr('type')) {
|
2694
2727
|
valid = new RegExp(pattern).test(inputText);
|
2695
|
-
} else {
|
2696
|
-
valid = true;
|
2697
2728
|
}
|
2698
|
-
}
|
2699
|
-
else if (!$el.prop('required')) {
|
2700
|
-
valid = true;
|
2701
|
-
}
|
2729
|
+
}
|
2702
2730
|
|
2703
2731
|
return valid;
|
2704
2732
|
}
|
@@ -2732,6 +2760,7 @@ function (_Plugin) {
|
|
2732
2760
|
}
|
2733
2761
|
});
|
2734
2762
|
}
|
2763
|
+
|
2735
2764
|
return valid;
|
2736
2765
|
}
|
2737
2766
|
/**
|
@@ -2743,7 +2772,7 @@ function (_Plugin) {
|
|
2743
2772
|
}, {
|
2744
2773
|
key: "validateCheckbox",
|
2745
2774
|
value: function validateCheckbox(groupName) {
|
2746
|
-
var
|
2775
|
+
var _this9 = this;
|
2747
2776
|
|
2748
2777
|
// If at least one checkbox in the group has the `required` attribute, the group is considered required
|
2749
2778
|
// Per W3C spec, all checkboxes in a group should have `required`, but we're being nice
|
@@ -2776,7 +2805,8 @@ function (_Plugin) {
|
|
2776
2805
|
if (checked >= minRequired) {
|
2777
2806
|
valid = true;
|
2778
2807
|
}
|
2779
|
-
}
|
2808
|
+
} // Skip validation if more than 1 checkbox have to be checked AND if the form hasn't got submitted yet (otherwise it will already show an error during the first fill in)
|
2809
|
+
|
2780
2810
|
|
2781
2811
|
if (this.initialized !== true && minRequired > 1) {
|
2782
2812
|
return true;
|
@@ -2785,9 +2815,9 @@ function (_Plugin) {
|
|
2785
2815
|
|
2786
2816
|
$group.each(function (i, e) {
|
2787
2817
|
if (!valid) {
|
2788
|
-
|
2818
|
+
_this9.addErrorClasses($(e), ['required']);
|
2789
2819
|
} else {
|
2790
|
-
|
2820
|
+
_this9.removeErrorClasses($(e));
|
2791
2821
|
}
|
2792
2822
|
});
|
2793
2823
|
return valid;
|
@@ -2803,11 +2833,11 @@ function (_Plugin) {
|
|
2803
2833
|
}, {
|
2804
2834
|
key: "matchValidation",
|
2805
2835
|
value: function matchValidation($el, validators, required) {
|
2806
|
-
var
|
2836
|
+
var _this10 = this;
|
2807
2837
|
|
2808
2838
|
required = required ? true : false;
|
2809
2839
|
var clear = validators.split(' ').map(function (v) {
|
2810
|
-
return
|
2840
|
+
return _this10.options.validators[v]($el, required, $el.parent());
|
2811
2841
|
});
|
2812
2842
|
return clear.indexOf(false) === -1;
|
2813
2843
|
}
|
@@ -3118,7 +3148,7 @@ function (_Plugin) {
|
|
3118
3148
|
var offset = _this2.$element.offset();
|
3119
3149
|
|
3120
3150
|
$('html, body').animate({
|
3121
|
-
scrollTop: offset.top
|
3151
|
+
scrollTop: offset.top - _this2.options.deepLinkSmudgeOffset
|
3122
3152
|
}, _this2.options.deepLinkSmudgeDelay);
|
3123
3153
|
});
|
3124
3154
|
}
|
@@ -3306,7 +3336,7 @@ function (_Plugin) {
|
|
3306
3336
|
'aria-expanded': true,
|
3307
3337
|
'aria-selected': true
|
3308
3338
|
});
|
3309
|
-
$target.slideDown(this.options.slideSpeed, function () {
|
3339
|
+
$target.stop().slideDown(this.options.slideSpeed, function () {
|
3310
3340
|
/**
|
3311
3341
|
* Fires when the tab is done opening.
|
3312
3342
|
* @event Accordion#down
|
@@ -3335,7 +3365,7 @@ function (_Plugin) {
|
|
3335
3365
|
'aria-expanded': false,
|
3336
3366
|
'aria-selected': false
|
3337
3367
|
});
|
3338
|
-
$target.slideUp(this.options.slideSpeed, function () {
|
3368
|
+
$target.stop().slideUp(this.options.slideSpeed, function () {
|
3339
3369
|
/**
|
3340
3370
|
* Fires when the tab is done collapsing up.
|
3341
3371
|
* @event Accordion#up
|
@@ -3430,6 +3460,14 @@ Accordion.defaults = {
|
|
3430
3460
|
*/
|
3431
3461
|
deepLinkSmudgeDelay: 300,
|
3432
3462
|
|
3463
|
+
/**
|
3464
|
+
* If `deepLinkSmudge` is enabled, the offset for scrollToTtop to prevent overlap by a sticky element at the top of the page
|
3465
|
+
* @option
|
3466
|
+
* @type {number}
|
3467
|
+
* @default 0
|
3468
|
+
*/
|
3469
|
+
deepLinkSmudgeOffset: 0,
|
3470
|
+
|
3433
3471
|
/**
|
3434
3472
|
* If `deepLink` is enabled, update the browser history with the open accordion
|
3435
3473
|
* @option
|
@@ -3540,8 +3578,6 @@ function (_Plugin) {
|
|
3540
3578
|
var initPanes = this.$element.find('.is-active');
|
3541
3579
|
|
3542
3580
|
if (initPanes.length) {
|
3543
|
-
var _this = this;
|
3544
|
-
|
3545
3581
|
initPanes.each(function () {
|
3546
3582
|
_this.down($(this));
|
3547
3583
|
});
|
@@ -3932,7 +3968,7 @@ function (_Plugin) {
|
|
3932
3968
|
var $sub = $link.parent();
|
3933
3969
|
|
3934
3970
|
if (_this.options.parentLink) {
|
3935
|
-
$link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li data-is-parent-link class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="
|
3971
|
+
$link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li data-is-parent-link class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="none"></li>');
|
3936
3972
|
}
|
3937
3973
|
|
3938
3974
|
$link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0);
|
@@ -4884,6 +4920,7 @@ function (_Positionable) {
|
|
4884
4920
|
if (typeof this.$currentAnchor.attr('id') === 'undefined') {
|
4885
4921
|
this.$currentAnchor.attr('id', GetYoDigits(6, 'dd-anchor'));
|
4886
4922
|
}
|
4923
|
+
|
4887
4924
|
this.$element.attr('aria-labelledby', this.$currentAnchor.attr('id'));
|
4888
4925
|
}
|
4889
4926
|
|
@@ -4971,12 +5008,10 @@ function (_Positionable) {
|
|
4971
5008
|
this.$anchors.off('click.zf.trigger').on('click.zf.trigger', function (e) {
|
4972
5009
|
_this._setCurrentAnchor(this);
|
4973
5010
|
|
4974
|
-
if (
|
4975
|
-
|
4976
|
-
|
4977
|
-
|
4978
|
-
// if forceFollow true and hover option true, only prevent default action on 1st click
|
4979
|
-
// on 2nd click (dropown opened) the default action (e.g. follow a href) gets executed
|
5011
|
+
if ( // if forceFollow false, always prevent default action
|
5012
|
+
_this.options.forceFollow === false || // if forceFollow true and hover option true, only prevent default action on 1st click
|
5013
|
+
// on 2nd click (dropown opened) the default action (e.g. follow a href) gets executed
|
5014
|
+
hasTouch && _this.options.hover && _this.$element.hasClass('is-open') === false) {
|
4980
5015
|
e.preventDefault();
|
4981
5016
|
}
|
4982
5017
|
});
|
@@ -5355,8 +5390,8 @@ function (_Plugin) {
|
|
5355
5390
|
Nest.Feather(this.$element, 'dropdown');
|
5356
5391
|
var subs = this.$element.find('li.is-dropdown-submenu-parent');
|
5357
5392
|
this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub');
|
5358
|
-
this.$menuItems = this.$element.find('[role="
|
5359
|
-
this.$tabs = this.$element.children('[role="
|
5393
|
+
this.$menuItems = this.$element.find('li[role="none"]');
|
5394
|
+
this.$tabs = this.$element.children('li[role="none"]');
|
5360
5395
|
this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);
|
5361
5396
|
|
5362
5397
|
if (this.options.alignment === 'auto') {
|
@@ -5415,10 +5450,12 @@ function (_Plugin) {
|
|
5415
5450
|
return;
|
5416
5451
|
}
|
5417
5452
|
|
5453
|
+
e.stopImmediatePropagation();
|
5418
5454
|
e.preventDefault();
|
5419
5455
|
|
5420
5456
|
_this._hide($elem);
|
5421
5457
|
} else {
|
5458
|
+
e.stopImmediatePropagation();
|
5422
5459
|
e.preventDefault();
|
5423
5460
|
|
5424
5461
|
_this._show($sub);
|
@@ -5455,7 +5492,7 @@ function (_Plugin) {
|
|
5455
5492
|
_this._show($elem.children('.is-dropdown-submenu'));
|
5456
5493
|
}, _this.options.hoverDelay));
|
5457
5494
|
}
|
5458
|
-
}).on('mouseleave.zf.
|
5495
|
+
}).on('mouseleave.zf.dropdownMenu', ignoreMousedisappear(function (e) {
|
5459
5496
|
var $elem = $(this),
|
5460
5497
|
hasSub = $elem.hasClass(parClass);
|
5461
5498
|
|
@@ -5473,7 +5510,7 @@ function (_Plugin) {
|
|
5473
5510
|
}
|
5474
5511
|
|
5475
5512
|
this.$menuItems.on('keydown.zf.dropdownMenu', function (e) {
|
5476
|
-
var $element = $(e.target).parentsUntil('ul', '[role="
|
5513
|
+
var $element = $(e.target).parentsUntil('ul', '[role="none"]'),
|
5477
5514
|
isTab = _this.$tabs.index($element) > -1,
|
5478
5515
|
$elements = isTab ? _this.$tabs : $element.siblings('li').add($element),
|
5479
5516
|
$prevElement,
|
@@ -6257,6 +6294,9 @@ function (_Plugin) {
|
|
6257
6294
|
this.rules = [];
|
6258
6295
|
this.currentPath = '';
|
6259
6296
|
this.className = 'Interchange'; // ie9 back compat
|
6297
|
+
// Triggers init is idempotent, just need to make sure it is initialized
|
6298
|
+
|
6299
|
+
Triggers.init($);
|
6260
6300
|
|
6261
6301
|
this._init();
|
6262
6302
|
|
@@ -6751,12 +6791,7 @@ function (_Plugin) {
|
|
6751
6791
|
}, {
|
6752
6792
|
key: "_events",
|
6753
6793
|
value: function _events() {
|
6754
|
-
var _this = this
|
6755
|
-
$body = $('html, body'),
|
6756
|
-
opts = {
|
6757
|
-
duration: _this.options.animationDuration,
|
6758
|
-
easing: _this.options.animationEasing
|
6759
|
-
};
|
6794
|
+
var _this = this;
|
6760
6795
|
|
6761
6796
|
$(window).one('load', function () {
|
6762
6797
|
if (_this.options.deepLinking) {
|
@@ -9205,7 +9240,7 @@ function (_Plugin) {
|
|
9205
9240
|
function finishUp() {
|
9206
9241
|
// Get the current top before the modal is closed and restore the scroll after.
|
9207
9242
|
// TODO: use component properties instead of HTML properties
|
9208
|
-
// See https://github.com/
|
9243
|
+
// See https://github.com/foundation/foundation-sites/pull/10786
|
9209
9244
|
var scrollTop = parseInt($("html").css("top"));
|
9210
9245
|
|
9211
9246
|
if ($('.reveal:visible').length === 0) {
|
@@ -9526,7 +9561,8 @@ function (_Plugin) {
|
|
9526
9561
|
|
9527
9562
|
if (!this.inputs[1]) {
|
9528
9563
|
this.inputs = this.inputs.add(this.$input2);
|
9529
|
-
}
|
9564
|
+
} // this.$handle.triggerHandler('click.zf.slider');
|
9565
|
+
|
9530
9566
|
|
9531
9567
|
this._setInitAttr(1);
|
9532
9568
|
} // Set handle positions
|
@@ -9830,7 +9866,6 @@ function (_Plugin) {
|
|
9830
9866
|
param = vertical ? 'height' : 'width',
|
9831
9867
|
direction = vertical ? 'top' : 'left',
|
9832
9868
|
eventOffset = vertical ? e.pageY : e.pageX,
|
9833
|
-
halfOfHandle = this.$handle[0].getBoundingClientRect()[param] / 2,
|
9834
9869
|
barDim = this.$element[0].getBoundingClientRect()[param],
|
9835
9870
|
windowScroll = vertical ? $(window).scrollTop() : $(window).scrollLeft();
|
9836
9871
|
|
@@ -11645,16 +11680,14 @@ function (_Positionable) {
|
|
11645
11680
|
key: "_getDefaultPosition",
|
11646
11681
|
value: function _getDefaultPosition() {
|
11647
11682
|
// handle legacy classnames
|
11648
|
-
var position = this.$element[0].className.match(/\b(top|left|right|bottom)\b/g);
|
11649
11683
|
var elementClassName = this.$element[0].className;
|
11650
11684
|
|
11651
11685
|
if (this.$element[0] instanceof SVGElement) {
|
11652
11686
|
elementClassName = elementClassName.baseVal;
|
11653
11687
|
}
|
11654
11688
|
|
11689
|
+
var position = elementClassName.match(/\b(top|left|right|bottom)\b/g);
|
11655
11690
|
return position ? position[0] : 'top';
|
11656
|
-
var position = elementClassName.match(/\b(top|left|right)\b/g);
|
11657
|
-
position = position ? position[0] : 'tp';
|
11658
11691
|
}
|
11659
11692
|
}, {
|
11660
11693
|
key: "_getDefaultAlignment",
|
@@ -12279,6 +12312,7 @@ function (_Plugin) {
|
|
12279
12312
|
if (fromString === toSet) {
|
12280
12313
|
return;
|
12281
12314
|
}
|
12315
|
+
|
12282
12316
|
var tabsTitle = _this.allOptions.linkClass ? _this.allOptions.linkClass : 'tabs-title';
|
12283
12317
|
var tabsPanel = _this.allOptions.panelClass ? _this.allOptions.panelClass : 'tabs-panel';
|
12284
12318
|
this.$element.removeAttr('role');
|
@@ -12291,6 +12325,7 @@ function (_Plugin) {
|
|
12291
12325
|
} else {
|
12292
12326
|
$panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');
|
12293
12327
|
}
|
12328
|
+
|
12294
12329
|
$panels.css({
|
12295
12330
|
display: '',
|
12296
12331
|
visibility: ''
|
@@ -12319,6 +12354,7 @@ function (_Plugin) {
|
|
12319
12354
|
} else {
|
12320
12355
|
$tabsContent = $('<div class="tabs-content"></div>').insertAfter(_this.$element).attr('data-tabs-content', _this.$element.attr('id'));
|
12321
12356
|
}
|
12357
|
+
|
12322
12358
|
$panels.each(function (key, value) {
|
12323
12359
|
var tempValue = $(value).appendTo($tabsContent).addClass(tabsPanel);
|
12324
12360
|
var hash = $liHeadsA.get(key).hash.slice(1);
|
@@ -12333,6 +12369,7 @@ function (_Plugin) {
|
|
12333
12369
|
$($liHeadsA.get(key)).attr('href', $($liHeadsA.get(key)).attr('href').replace('#', '') + '#' + hash);
|
12334
12370
|
}
|
12335
12371
|
}
|
12372
|
+
|
12336
12373
|
var isActive = $($liHeads.get(key)).hasClass('is-active');
|
12337
12374
|
|
12338
12375
|
if (isActive) {
|
@@ -12352,7 +12389,7 @@ function (_Plugin) {
|
|
12352
12389
|
|
12353
12390
|
}, {
|
12354
12391
|
key: "open",
|
12355
|
-
value: function open(
|
12392
|
+
value: function open(_target) {
|
12356
12393
|
if (this.currentRule && typeof this.currentRule.open === 'function') {
|
12357
12394
|
var _this$currentRule;
|
12358
12395
|
|
@@ -12368,7 +12405,7 @@ function (_Plugin) {
|
|
12368
12405
|
|
12369
12406
|
}, {
|
12370
12407
|
key: "close",
|
12371
|
-
value: function close(
|
12408
|
+
value: function close(_target) {
|
12372
12409
|
if (this.currentRule && typeof this.currentRule.close === 'function') {
|
12373
12410
|
var _this$currentRule2;
|
12374
12411
|
|
@@ -12384,7 +12421,7 @@ function (_Plugin) {
|
|
12384
12421
|
|
12385
12422
|
}, {
|
12386
12423
|
key: "toggle",
|
12387
|
-
value: function toggle(
|
12424
|
+
value: function toggle(_target) {
|
12388
12425
|
if (this.currentRule && typeof this.currentRule.toggle === 'function') {
|
12389
12426
|
var _this$currentRule3;
|
12390
12427
|
|