foundation-rails 6.4.1.0 → 6.4.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Rakefile +5 -6
- data/lib/foundation/rails/version.rb +1 -1
- data/vendor/assets/js/foundation.abide.js +781 -0
- data/vendor/assets/js/foundation.accordion.js +511 -0
- data/vendor/assets/js/foundation.accordionMenu.js +527 -0
- data/vendor/assets/js/foundation.core.js +860 -0
- data/vendor/assets/js/foundation.drilldown.js +759 -0
- data/vendor/assets/js/foundation.dropdown.js +1131 -0
- data/vendor/assets/js/foundation.dropdownMenu.js +678 -0
- data/vendor/assets/js/foundation.equalizer.js +542 -0
- data/vendor/assets/js/foundation.interchange.js +399 -0
- data/vendor/assets/js/{foundation.js.es6 → foundation.js} +11 -12
- data/vendor/assets/js/foundation.magellan.js +449 -0
- data/vendor/assets/js/foundation.offcanvas.js +1052 -0
- data/vendor/assets/js/foundation.orbit.js +767 -0
- data/vendor/assets/js/foundation.responsiveAccordionTabs.js +440 -0
- data/vendor/assets/js/foundation.responsiveMenu.js +362 -0
- data/vendor/assets/js/foundation.responsiveToggle.js +336 -0
- data/vendor/assets/js/foundation.reveal.js +1066 -0
- data/vendor/assets/js/foundation.slider.js +1236 -0
- data/vendor/assets/js/foundation.smoothScroll.js +303 -0
- data/vendor/assets/js/foundation.sticky.js +1001 -0
- data/vendor/assets/js/foundation.tabs.js +678 -0
- data/vendor/assets/js/foundation.toggler.js +602 -0
- data/vendor/assets/js/foundation.tooltip.js +1195 -0
- data/vendor/assets/js/{foundation.util.box.js.es6 → foundation.util.box.js} +154 -41
- data/vendor/assets/js/foundation.util.imageLoader.js +163 -0
- data/vendor/assets/js/foundation.util.keyboard.js +298 -0
- data/vendor/assets/js/foundation.util.mediaQuery.js +353 -0
- data/vendor/assets/js/foundation.util.motion.js +231 -0
- data/vendor/assets/js/foundation.util.nest.js +181 -0
- data/vendor/assets/js/foundation.util.timer.js +170 -0
- data/vendor/assets/js/foundation.util.timerAndImageLoader.js +90 -0
- data/vendor/assets/js/foundation.util.touch.js +275 -0
- data/vendor/assets/js/foundation.util.triggers.js +399 -0
- data/vendor/assets/js/foundation.zf.responsiveAccordionTabs.js +262 -0
- metadata +37 -71
- data/vendor/assets/js/entries/foundation-plugins.js +0 -25
- data/vendor/assets/js/entries/foundation.js +0 -101
- data/vendor/assets/js/entries/plugins/foundation.abide.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.accordion.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.accordionMenu.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.core.js +0 -21
- data/vendor/assets/js/entries/plugins/foundation.drilldown.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.dropdown.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.dropdownMenu.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.equalizer.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.interchange.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.magellan.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.offcanvas.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.orbit.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.responsiveAccordionTabs.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.responsiveMenu.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.responsiveToggle.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.reveal.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.slider.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.smoothScroll.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.sticky.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.tabs.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.toggler.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.tooltip.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.box.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.imageLoader.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.keyboard.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.mediaQuery.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.motion.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.nest.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.timer.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.touch.js +0 -7
- data/vendor/assets/js/entries/plugins/foundation.util.triggers.js +0 -5
- data/vendor/assets/js/foundation.abide.js.es6 +0 -587
- data/vendor/assets/js/foundation.accordion.js.es6 +0 -329
- data/vendor/assets/js/foundation.accordionMenu.js.es6 +0 -328
- data/vendor/assets/js/foundation.core.js.es6 +0 -337
- data/vendor/assets/js/foundation.drilldown.js.es6 +0 -536
- data/vendor/assets/js/foundation.dropdown.js.es6 +0 -394
- data/vendor/assets/js/foundation.dropdownMenu.js.es6 +0 -458
- data/vendor/assets/js/foundation.equalizer.js.es6 +0 -318
- data/vendor/assets/js/foundation.interchange.js.es6 +0 -210
- data/vendor/assets/js/foundation.magellan.js.es6 +0 -257
- data/vendor/assets/js/foundation.offcanvas.js.es6 +0 -546
- data/vendor/assets/js/foundation.orbit.js.es6 +0 -531
- data/vendor/assets/js/foundation.plugin.js.es6 +0 -54
- data/vendor/assets/js/foundation.positionable.js.es6 +0 -206
- data/vendor/assets/js/foundation.responsiveAccordionTabs.js.es6 +0 -243
- data/vendor/assets/js/foundation.responsiveMenu.js.es6 +0 -155
- data/vendor/assets/js/foundation.responsiveToggle.js.es6 +0 -156
- data/vendor/assets/js/foundation.reveal.js.es6 +0 -585
- data/vendor/assets/js/foundation.slider.js.es6 +0 -712
- data/vendor/assets/js/foundation.smoothScroll.js.es6 +0 -135
- data/vendor/assets/js/foundation.sticky.js.es6 +0 -507
- data/vendor/assets/js/foundation.tabs.js.es6 +0 -498
- data/vendor/assets/js/foundation.toggler.js.es6 +0 -150
- data/vendor/assets/js/foundation.tooltip.js.es6 +0 -462
- data/vendor/assets/js/foundation.util.core.js.es6 +0 -52
- data/vendor/assets/js/foundation.util.imageLoader.js.es6 +0 -45
- data/vendor/assets/js/foundation.util.keyboard.js.es6 +0 -162
- data/vendor/assets/js/foundation.util.mediaQuery.js.es6 +0 -234
- data/vendor/assets/js/foundation.util.motion.js.es6 +0 -104
- data/vendor/assets/js/foundation.util.nest.js.es6 +0 -67
- data/vendor/assets/js/foundation.util.timer.js.es6 +0 -48
- data/vendor/assets/js/foundation.util.touch.js.es6 +0 -149
- data/vendor/assets/js/foundation.util.triggers.js.es6 +0 -268
@@ -0,0 +1,440 @@
|
|
1
|
+
/******/ (function(modules) { // webpackBootstrap
|
2
|
+
/******/ // The module cache
|
3
|
+
/******/ var installedModules = {};
|
4
|
+
/******/
|
5
|
+
/******/ // The require function
|
6
|
+
/******/ function __webpack_require__(moduleId) {
|
7
|
+
/******/
|
8
|
+
/******/ // Check if module is in cache
|
9
|
+
/******/ if(installedModules[moduleId]) {
|
10
|
+
/******/ return installedModules[moduleId].exports;
|
11
|
+
/******/ }
|
12
|
+
/******/ // Create a new module (and put it into the cache)
|
13
|
+
/******/ var module = installedModules[moduleId] = {
|
14
|
+
/******/ i: moduleId,
|
15
|
+
/******/ l: false,
|
16
|
+
/******/ exports: {}
|
17
|
+
/******/ };
|
18
|
+
/******/
|
19
|
+
/******/ // Execute the module function
|
20
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21
|
+
/******/
|
22
|
+
/******/ // Flag the module as loaded
|
23
|
+
/******/ module.l = true;
|
24
|
+
/******/
|
25
|
+
/******/ // Return the exports of the module
|
26
|
+
/******/ return module.exports;
|
27
|
+
/******/ }
|
28
|
+
/******/
|
29
|
+
/******/
|
30
|
+
/******/ // expose the modules object (__webpack_modules__)
|
31
|
+
/******/ __webpack_require__.m = modules;
|
32
|
+
/******/
|
33
|
+
/******/ // expose the module cache
|
34
|
+
/******/ __webpack_require__.c = installedModules;
|
35
|
+
/******/
|
36
|
+
/******/ // identity function for calling harmony imports with the correct context
|
37
|
+
/******/ __webpack_require__.i = function(value) { return value; };
|
38
|
+
/******/
|
39
|
+
/******/ // define getter function for harmony exports
|
40
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
41
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
42
|
+
/******/ Object.defineProperty(exports, name, {
|
43
|
+
/******/ configurable: false,
|
44
|
+
/******/ enumerable: true,
|
45
|
+
/******/ get: getter
|
46
|
+
/******/ });
|
47
|
+
/******/ }
|
48
|
+
/******/ };
|
49
|
+
/******/
|
50
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
51
|
+
/******/ __webpack_require__.n = function(module) {
|
52
|
+
/******/ var getter = module && module.__esModule ?
|
53
|
+
/******/ function getDefault() { return module['default']; } :
|
54
|
+
/******/ function getModuleExports() { return module; };
|
55
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
56
|
+
/******/ return getter;
|
57
|
+
/******/ };
|
58
|
+
/******/
|
59
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
60
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
61
|
+
/******/
|
62
|
+
/******/ // __webpack_public_path__
|
63
|
+
/******/ __webpack_require__.p = "";
|
64
|
+
/******/
|
65
|
+
/******/ // Load entry module and return exports
|
66
|
+
/******/ return __webpack_require__(__webpack_require__.s = 90);
|
67
|
+
/******/ })
|
68
|
+
/************************************************************************/
|
69
|
+
/******/ ({
|
70
|
+
|
71
|
+
/***/ 0:
|
72
|
+
/***/ (function(module, exports) {
|
73
|
+
|
74
|
+
module.exports = jQuery;
|
75
|
+
|
76
|
+
/***/ }),
|
77
|
+
|
78
|
+
/***/ 1:
|
79
|
+
/***/ (function(module, exports) {
|
80
|
+
|
81
|
+
module.exports = {Foundation: window.Foundation};
|
82
|
+
|
83
|
+
/***/ }),
|
84
|
+
|
85
|
+
/***/ 2:
|
86
|
+
/***/ (function(module, exports) {
|
87
|
+
|
88
|
+
module.exports = {Plugin: window.Foundation.Plugin};
|
89
|
+
|
90
|
+
/***/ }),
|
91
|
+
|
92
|
+
/***/ 24:
|
93
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
94
|
+
|
95
|
+
"use strict";
|
96
|
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
97
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
|
98
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
|
99
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_responsiveAccordionTabs__ = __webpack_require__(54);
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
__WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_responsiveAccordionTabs__["a" /* ResponsiveAccordionTabs */], 'ResponsiveAccordionTabs');
|
104
|
+
|
105
|
+
/***/ }),
|
106
|
+
|
107
|
+
/***/ 3:
|
108
|
+
/***/ (function(module, exports) {
|
109
|
+
|
110
|
+
module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
|
111
|
+
|
112
|
+
/***/ }),
|
113
|
+
|
114
|
+
/***/ 54:
|
115
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
116
|
+
|
117
|
+
"use strict";
|
118
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResponsiveAccordionTabs; });
|
119
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
120
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
121
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__ = __webpack_require__(6);
|
122
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__);
|
123
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(3);
|
124
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__);
|
125
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin__ = __webpack_require__(2);
|
126
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__);
|
127
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_accordion__ = __webpack_require__(72);
|
128
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_accordion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__foundation_accordion__);
|
129
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_tabs__ = __webpack_require__(77);
|
130
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_tabs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__foundation_tabs__);
|
131
|
+
|
132
|
+
|
133
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
134
|
+
|
135
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
136
|
+
|
137
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
138
|
+
|
139
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
// The plugin matches the plugin classes with these plugin instances.
|
150
|
+
var MenuPlugins = {
|
151
|
+
tabs: {
|
152
|
+
cssClass: 'tabs',
|
153
|
+
plugin: __WEBPACK_IMPORTED_MODULE_5__foundation_tabs__["Tabs"]
|
154
|
+
},
|
155
|
+
accordion: {
|
156
|
+
cssClass: 'accordion',
|
157
|
+
plugin: __WEBPACK_IMPORTED_MODULE_4__foundation_accordion__["Accordion"]
|
158
|
+
}
|
159
|
+
};
|
160
|
+
|
161
|
+
/**
|
162
|
+
* ResponsiveAccordionTabs module.
|
163
|
+
* @module foundation.responsiveAccordionTabs
|
164
|
+
* @requires foundation.util.motion
|
165
|
+
* @requires foundation.accordion
|
166
|
+
* @requires foundation.tabs
|
167
|
+
*/
|
168
|
+
|
169
|
+
var ResponsiveAccordionTabs = function (_Plugin) {
|
170
|
+
_inherits(ResponsiveAccordionTabs, _Plugin);
|
171
|
+
|
172
|
+
function ResponsiveAccordionTabs() {
|
173
|
+
_classCallCheck(this, ResponsiveAccordionTabs);
|
174
|
+
|
175
|
+
return _possibleConstructorReturn(this, (ResponsiveAccordionTabs.__proto__ || Object.getPrototypeOf(ResponsiveAccordionTabs)).apply(this, arguments));
|
176
|
+
}
|
177
|
+
|
178
|
+
_createClass(ResponsiveAccordionTabs, [{
|
179
|
+
key: '_setup',
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Creates a new instance of a responsive accordion tabs.
|
183
|
+
* @class
|
184
|
+
* @name ResponsiveAccordionTabs
|
185
|
+
* @fires ResponsiveAccordionTabs#init
|
186
|
+
* @param {jQuery} element - jQuery object to make into Responsive Accordion Tabs.
|
187
|
+
* @param {Object} options - Overrides to the default plugin settings.
|
188
|
+
*/
|
189
|
+
value: function _setup(element, options) {
|
190
|
+
this.$element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(element);
|
191
|
+
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, this.$element.data(), options);
|
192
|
+
this.rules = this.$element.data('responsive-accordion-tabs');
|
193
|
+
this.currentMq = null;
|
194
|
+
this.currentPlugin = null;
|
195
|
+
this.className = 'ResponsiveAccordionTabs'; // ie9 back compat
|
196
|
+
if (!this.$element.attr('id')) {
|
197
|
+
this.$element.attr('id', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["GetYoDigits"])(6, 'responsiveaccordiontabs'));
|
198
|
+
};
|
199
|
+
|
200
|
+
this._init();
|
201
|
+
this._events();
|
202
|
+
}
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element.
|
206
|
+
* @function
|
207
|
+
* @private
|
208
|
+
*/
|
209
|
+
|
210
|
+
}, {
|
211
|
+
key: '_init',
|
212
|
+
value: function _init() {
|
213
|
+
__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"]._init();
|
214
|
+
|
215
|
+
// The first time an Interchange plugin is initialized, this.rules is converted from a string of "classes" to an object of rules
|
216
|
+
if (typeof this.rules === 'string') {
|
217
|
+
var rulesTree = {};
|
218
|
+
|
219
|
+
// Parse rules from "classes" pulled from data attribute
|
220
|
+
var rules = this.rules.split(' ');
|
221
|
+
|
222
|
+
// Iterate through every rule found
|
223
|
+
for (var i = 0; i < rules.length; i++) {
|
224
|
+
var rule = rules[i].split('-');
|
225
|
+
var ruleSize = rule.length > 1 ? rule[0] : 'small';
|
226
|
+
var rulePlugin = rule.length > 1 ? rule[1] : rule[0];
|
227
|
+
|
228
|
+
if (MenuPlugins[rulePlugin] !== null) {
|
229
|
+
rulesTree[ruleSize] = MenuPlugins[rulePlugin];
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
233
|
+
this.rules = rulesTree;
|
234
|
+
}
|
235
|
+
|
236
|
+
this._getAllOptions();
|
237
|
+
|
238
|
+
if (!__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.isEmptyObject(this.rules)) {
|
239
|
+
this._checkMediaQueries();
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}, {
|
243
|
+
key: '_getAllOptions',
|
244
|
+
value: function _getAllOptions() {
|
245
|
+
//get all defaults and options
|
246
|
+
var _this = this;
|
247
|
+
_this.allOptions = {};
|
248
|
+
for (var key in MenuPlugins) {
|
249
|
+
if (MenuPlugins.hasOwnProperty(key)) {
|
250
|
+
var obj = MenuPlugins[key];
|
251
|
+
try {
|
252
|
+
var dummyPlugin = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('<ul></ul>');
|
253
|
+
var tmpPlugin = new obj.plugin(dummyPlugin, _this.options);
|
254
|
+
for (var keyKey in tmpPlugin.options) {
|
255
|
+
if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') {
|
256
|
+
var objObj = tmpPlugin.options[keyKey];
|
257
|
+
_this.allOptions[keyKey] = objObj;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
tmpPlugin.destroy();
|
261
|
+
} catch (e) {}
|
262
|
+
}
|
263
|
+
}
|
264
|
+
}
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Initializes events for the Menu.
|
268
|
+
* @function
|
269
|
+
* @private
|
270
|
+
*/
|
271
|
+
|
272
|
+
}, {
|
273
|
+
key: '_events',
|
274
|
+
value: function _events() {
|
275
|
+
var _this = this;
|
276
|
+
|
277
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).on('changed.zf.mediaquery', function () {
|
278
|
+
_this._checkMediaQueries();
|
279
|
+
});
|
280
|
+
}
|
281
|
+
|
282
|
+
/**
|
283
|
+
* Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.
|
284
|
+
* @function
|
285
|
+
* @private
|
286
|
+
*/
|
287
|
+
|
288
|
+
}, {
|
289
|
+
key: '_checkMediaQueries',
|
290
|
+
value: function _checkMediaQueries() {
|
291
|
+
var matchedMq,
|
292
|
+
_this = this;
|
293
|
+
// Iterate through each rule and find the last matching rule
|
294
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.each(this.rules, function (key) {
|
295
|
+
if (__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"].atLeast(key)) {
|
296
|
+
matchedMq = key;
|
297
|
+
}
|
298
|
+
});
|
299
|
+
|
300
|
+
// No match? No dice
|
301
|
+
if (!matchedMq) return;
|
302
|
+
|
303
|
+
// Plugin already initialized? We good
|
304
|
+
if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;
|
305
|
+
|
306
|
+
// Remove existing plugin-specific CSS classes
|
307
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.each(MenuPlugins, function (key, value) {
|
308
|
+
_this.$element.removeClass(value.cssClass);
|
309
|
+
});
|
310
|
+
|
311
|
+
// Add the CSS class for the new plugin
|
312
|
+
this.$element.addClass(this.rules[matchedMq].cssClass);
|
313
|
+
|
314
|
+
// Create an instance of the new plugin
|
315
|
+
if (this.currentPlugin) {
|
316
|
+
//don't know why but on nested elements data zfPlugin get's lost
|
317
|
+
if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin', this.storezfData);
|
318
|
+
this.currentPlugin.destroy();
|
319
|
+
}
|
320
|
+
this._handleMarkup(this.rules[matchedMq].cssClass);
|
321
|
+
this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});
|
322
|
+
this.storezfData = this.currentPlugin.$element.data('zfPlugin');
|
323
|
+
}
|
324
|
+
}, {
|
325
|
+
key: '_handleMarkup',
|
326
|
+
value: function _handleMarkup(toSet) {
|
327
|
+
var _this = this,
|
328
|
+
fromString = 'accordion';
|
329
|
+
var $panels = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-tabs-content=' + this.$element.attr('id') + ']');
|
330
|
+
if ($panels.length) fromString = 'tabs';
|
331
|
+
if (fromString === toSet) {
|
332
|
+
return;
|
333
|
+
};
|
334
|
+
|
335
|
+
var tabsTitle = _this.allOptions.linkClass ? _this.allOptions.linkClass : 'tabs-title';
|
336
|
+
var tabsPanel = _this.allOptions.panelClass ? _this.allOptions.panelClass : 'tabs-panel';
|
337
|
+
|
338
|
+
this.$element.removeAttr('role');
|
339
|
+
var $liHeads = this.$element.children('.' + tabsTitle + ',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item');
|
340
|
+
var $liHeadsA = $liHeads.children('a').removeClass('accordion-title');
|
341
|
+
|
342
|
+
if (fromString === 'tabs') {
|
343
|
+
$panels = $panels.children('.' + tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby');
|
344
|
+
$panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected');
|
345
|
+
} else {
|
346
|
+
$panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');
|
347
|
+
};
|
348
|
+
|
349
|
+
$panels.css({ display: '', visibility: '' });
|
350
|
+
$liHeads.css({ display: '', visibility: '' });
|
351
|
+
if (toSet === 'accordion') {
|
352
|
+
$panels.each(function (key, value) {
|
353
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content', '').removeClass('is-active').css({ height: '' });
|
354
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-tabs-content=' + _this.$element.attr('id') + ']').after('<div id="tabs-placeholder-' + _this.$element.attr('id') + '"></div>').detach();
|
355
|
+
$liHeads.addClass('accordion-item').attr('data-accordion-item', '');
|
356
|
+
$liHeadsA.addClass('accordion-title');
|
357
|
+
});
|
358
|
+
} else if (toSet === 'tabs') {
|
359
|
+
var $tabsContent = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-tabs-content=' + _this.$element.attr('id') + ']');
|
360
|
+
var $placeholder = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#tabs-placeholder-' + _this.$element.attr('id'));
|
361
|
+
if ($placeholder.length) {
|
362
|
+
$tabsContent = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('<div class="tabs-content"></div>').insertAfter($placeholder).attr('data-tabs-content', _this.$element.attr('id'));
|
363
|
+
$placeholder.remove();
|
364
|
+
} else {
|
365
|
+
$tabsContent = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('<div class="tabs-content"></div>').insertAfter(_this.$element).attr('data-tabs-content', _this.$element.attr('id'));
|
366
|
+
};
|
367
|
+
$panels.each(function (key, value) {
|
368
|
+
var tempValue = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(value).appendTo($tabsContent).addClass(tabsPanel);
|
369
|
+
var hash = $liHeadsA.get(key).hash.slice(1);
|
370
|
+
var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(value).attr('id') || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["GetYoDigits"])(6, 'accordion');
|
371
|
+
if (hash !== id) {
|
372
|
+
if (hash !== '') {
|
373
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(value).attr('id', hash);
|
374
|
+
} else {
|
375
|
+
hash = id;
|
376
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(value).attr('id', hash);
|
377
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()($liHeadsA.get(key)).attr('href', __WEBPACK_IMPORTED_MODULE_0_jquery___default()($liHeadsA.get(key)).attr('href').replace('#', '') + '#' + hash);
|
378
|
+
};
|
379
|
+
};
|
380
|
+
var isActive = __WEBPACK_IMPORTED_MODULE_0_jquery___default()($liHeads.get(key)).hasClass('is-active');
|
381
|
+
if (isActive) {
|
382
|
+
tempValue.addClass('is-active');
|
383
|
+
};
|
384
|
+
});
|
385
|
+
$liHeads.addClass(tabsTitle);
|
386
|
+
};
|
387
|
+
}
|
388
|
+
|
389
|
+
/**
|
390
|
+
* Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.
|
391
|
+
* @function
|
392
|
+
*/
|
393
|
+
|
394
|
+
}, {
|
395
|
+
key: '_destroy',
|
396
|
+
value: function _destroy() {
|
397
|
+
if (this.currentPlugin) this.currentPlugin.destroy();
|
398
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('.zf.ResponsiveAccordionTabs');
|
399
|
+
}
|
400
|
+
}]);
|
401
|
+
|
402
|
+
return ResponsiveAccordionTabs;
|
403
|
+
}(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__["Plugin"]);
|
404
|
+
|
405
|
+
ResponsiveAccordionTabs.defaults = {};
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
/***/ }),
|
410
|
+
|
411
|
+
/***/ 6:
|
412
|
+
/***/ (function(module, exports) {
|
413
|
+
|
414
|
+
module.exports = {MediaQuery: window.Foundation.MediaQuery};
|
415
|
+
|
416
|
+
/***/ }),
|
417
|
+
|
418
|
+
/***/ 72:
|
419
|
+
/***/ (function(module, exports) {
|
420
|
+
|
421
|
+
module.exports = {Accordion: window.Foundation.Accordion};
|
422
|
+
|
423
|
+
/***/ }),
|
424
|
+
|
425
|
+
/***/ 77:
|
426
|
+
/***/ (function(module, exports) {
|
427
|
+
|
428
|
+
module.exports = {Tabs: window.Foundation.Tabs};
|
429
|
+
|
430
|
+
/***/ }),
|
431
|
+
|
432
|
+
/***/ 90:
|
433
|
+
/***/ (function(module, exports, __webpack_require__) {
|
434
|
+
|
435
|
+
module.exports = __webpack_require__(24);
|
436
|
+
|
437
|
+
|
438
|
+
/***/ })
|
439
|
+
|
440
|
+
/******/ });
|
@@ -0,0 +1,362 @@
|
|
1
|
+
/******/ (function(modules) { // webpackBootstrap
|
2
|
+
/******/ // The module cache
|
3
|
+
/******/ var installedModules = {};
|
4
|
+
/******/
|
5
|
+
/******/ // The require function
|
6
|
+
/******/ function __webpack_require__(moduleId) {
|
7
|
+
/******/
|
8
|
+
/******/ // Check if module is in cache
|
9
|
+
/******/ if(installedModules[moduleId]) {
|
10
|
+
/******/ return installedModules[moduleId].exports;
|
11
|
+
/******/ }
|
12
|
+
/******/ // Create a new module (and put it into the cache)
|
13
|
+
/******/ var module = installedModules[moduleId] = {
|
14
|
+
/******/ i: moduleId,
|
15
|
+
/******/ l: false,
|
16
|
+
/******/ exports: {}
|
17
|
+
/******/ };
|
18
|
+
/******/
|
19
|
+
/******/ // Execute the module function
|
20
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21
|
+
/******/
|
22
|
+
/******/ // Flag the module as loaded
|
23
|
+
/******/ module.l = true;
|
24
|
+
/******/
|
25
|
+
/******/ // Return the exports of the module
|
26
|
+
/******/ return module.exports;
|
27
|
+
/******/ }
|
28
|
+
/******/
|
29
|
+
/******/
|
30
|
+
/******/ // expose the modules object (__webpack_modules__)
|
31
|
+
/******/ __webpack_require__.m = modules;
|
32
|
+
/******/
|
33
|
+
/******/ // expose the module cache
|
34
|
+
/******/ __webpack_require__.c = installedModules;
|
35
|
+
/******/
|
36
|
+
/******/ // identity function for calling harmony imports with the correct context
|
37
|
+
/******/ __webpack_require__.i = function(value) { return value; };
|
38
|
+
/******/
|
39
|
+
/******/ // define getter function for harmony exports
|
40
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
41
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
42
|
+
/******/ Object.defineProperty(exports, name, {
|
43
|
+
/******/ configurable: false,
|
44
|
+
/******/ enumerable: true,
|
45
|
+
/******/ get: getter
|
46
|
+
/******/ });
|
47
|
+
/******/ }
|
48
|
+
/******/ };
|
49
|
+
/******/
|
50
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
51
|
+
/******/ __webpack_require__.n = function(module) {
|
52
|
+
/******/ var getter = module && module.__esModule ?
|
53
|
+
/******/ function getDefault() { return module['default']; } :
|
54
|
+
/******/ function getModuleExports() { return module; };
|
55
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
56
|
+
/******/ return getter;
|
57
|
+
/******/ };
|
58
|
+
/******/
|
59
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
60
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
61
|
+
/******/
|
62
|
+
/******/ // __webpack_public_path__
|
63
|
+
/******/ __webpack_require__.p = "";
|
64
|
+
/******/
|
65
|
+
/******/ // Load entry module and return exports
|
66
|
+
/******/ return __webpack_require__(__webpack_require__.s = 91);
|
67
|
+
/******/ })
|
68
|
+
/************************************************************************/
|
69
|
+
/******/ ({
|
70
|
+
|
71
|
+
/***/ 0:
|
72
|
+
/***/ (function(module, exports) {
|
73
|
+
|
74
|
+
module.exports = jQuery;
|
75
|
+
|
76
|
+
/***/ }),
|
77
|
+
|
78
|
+
/***/ 1:
|
79
|
+
/***/ (function(module, exports) {
|
80
|
+
|
81
|
+
module.exports = {Foundation: window.Foundation};
|
82
|
+
|
83
|
+
/***/ }),
|
84
|
+
|
85
|
+
/***/ 2:
|
86
|
+
/***/ (function(module, exports) {
|
87
|
+
|
88
|
+
module.exports = {Plugin: window.Foundation.Plugin};
|
89
|
+
|
90
|
+
/***/ }),
|
91
|
+
|
92
|
+
/***/ 25:
|
93
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
94
|
+
|
95
|
+
"use strict";
|
96
|
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
97
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
|
98
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
|
99
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_responsiveMenu__ = __webpack_require__(55);
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
__WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_responsiveMenu__["a" /* ResponsiveMenu */], 'ResponsiveMenu');
|
104
|
+
|
105
|
+
/***/ }),
|
106
|
+
|
107
|
+
/***/ 3:
|
108
|
+
/***/ (function(module, exports) {
|
109
|
+
|
110
|
+
module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
|
111
|
+
|
112
|
+
/***/ }),
|
113
|
+
|
114
|
+
/***/ 55:
|
115
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
116
|
+
|
117
|
+
"use strict";
|
118
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResponsiveMenu; });
|
119
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
120
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
121
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__ = __webpack_require__(6);
|
122
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__);
|
123
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(3);
|
124
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__);
|
125
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin__ = __webpack_require__(2);
|
126
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__);
|
127
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_dropdownMenu__ = __webpack_require__(75);
|
128
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_dropdownMenu___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__foundation_dropdownMenu__);
|
129
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_drilldown__ = __webpack_require__(74);
|
130
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_drilldown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__foundation_drilldown__);
|
131
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__foundation_accordionMenu__ = __webpack_require__(73);
|
132
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__foundation_accordionMenu___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__foundation_accordionMenu__);
|
133
|
+
|
134
|
+
|
135
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
136
|
+
|
137
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
138
|
+
|
139
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
140
|
+
|
141
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
var MenuPlugins = {
|
154
|
+
dropdown: {
|
155
|
+
cssClass: 'dropdown',
|
156
|
+
plugin: __WEBPACK_IMPORTED_MODULE_4__foundation_dropdownMenu__["DropdownMenu"]
|
157
|
+
},
|
158
|
+
drilldown: {
|
159
|
+
cssClass: 'drilldown',
|
160
|
+
plugin: __WEBPACK_IMPORTED_MODULE_5__foundation_drilldown__["Drilldown"]
|
161
|
+
},
|
162
|
+
accordion: {
|
163
|
+
cssClass: 'accordion-menu',
|
164
|
+
plugin: __WEBPACK_IMPORTED_MODULE_6__foundation_accordionMenu__["AccordionMenu"]
|
165
|
+
}
|
166
|
+
};
|
167
|
+
|
168
|
+
// import "foundation.util.triggers.js";
|
169
|
+
|
170
|
+
|
171
|
+
/**
|
172
|
+
* ResponsiveMenu module.
|
173
|
+
* @module foundation.responsiveMenu
|
174
|
+
* @requires foundation.util.triggers
|
175
|
+
* @requires foundation.util.mediaQuery
|
176
|
+
*/
|
177
|
+
|
178
|
+
var ResponsiveMenu = function (_Plugin) {
|
179
|
+
_inherits(ResponsiveMenu, _Plugin);
|
180
|
+
|
181
|
+
function ResponsiveMenu() {
|
182
|
+
_classCallCheck(this, ResponsiveMenu);
|
183
|
+
|
184
|
+
return _possibleConstructorReturn(this, (ResponsiveMenu.__proto__ || Object.getPrototypeOf(ResponsiveMenu)).apply(this, arguments));
|
185
|
+
}
|
186
|
+
|
187
|
+
_createClass(ResponsiveMenu, [{
|
188
|
+
key: '_setup',
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Creates a new instance of a responsive menu.
|
192
|
+
* @class
|
193
|
+
* @name ResponsiveMenu
|
194
|
+
* @fires ResponsiveMenu#init
|
195
|
+
* @param {jQuery} element - jQuery object to make into a dropdown menu.
|
196
|
+
* @param {Object} options - Overrides to the default plugin settings.
|
197
|
+
*/
|
198
|
+
value: function _setup(element, options) {
|
199
|
+
this.$element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(element);
|
200
|
+
this.rules = this.$element.data('responsive-menu');
|
201
|
+
this.currentMq = null;
|
202
|
+
this.currentPlugin = null;
|
203
|
+
this.className = 'ResponsiveMenu'; // ie9 back compat
|
204
|
+
|
205
|
+
this._init();
|
206
|
+
this._events();
|
207
|
+
}
|
208
|
+
|
209
|
+
/**
|
210
|
+
* Initializes the Menu by parsing the classes from the 'data-ResponsiveMenu' attribute on the element.
|
211
|
+
* @function
|
212
|
+
* @private
|
213
|
+
*/
|
214
|
+
|
215
|
+
}, {
|
216
|
+
key: '_init',
|
217
|
+
value: function _init() {
|
218
|
+
|
219
|
+
__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"]._init();
|
220
|
+
// The first time an Interchange plugin is initialized, this.rules is converted from a string of "classes" to an object of rules
|
221
|
+
if (typeof this.rules === 'string') {
|
222
|
+
var rulesTree = {};
|
223
|
+
|
224
|
+
// Parse rules from "classes" pulled from data attribute
|
225
|
+
var rules = this.rules.split(' ');
|
226
|
+
|
227
|
+
// Iterate through every rule found
|
228
|
+
for (var i = 0; i < rules.length; i++) {
|
229
|
+
var rule = rules[i].split('-');
|
230
|
+
var ruleSize = rule.length > 1 ? rule[0] : 'small';
|
231
|
+
var rulePlugin = rule.length > 1 ? rule[1] : rule[0];
|
232
|
+
|
233
|
+
if (MenuPlugins[rulePlugin] !== null) {
|
234
|
+
rulesTree[ruleSize] = MenuPlugins[rulePlugin];
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
this.rules = rulesTree;
|
239
|
+
}
|
240
|
+
|
241
|
+
if (!__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.isEmptyObject(this.rules)) {
|
242
|
+
this._checkMediaQueries();
|
243
|
+
}
|
244
|
+
// Add data-mutate since children may need it.
|
245
|
+
this.$element.attr('data-mutate', this.$element.attr('data-mutate') || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["GetYoDigits"])(6, 'responsive-menu'));
|
246
|
+
}
|
247
|
+
|
248
|
+
/**
|
249
|
+
* Initializes events for the Menu.
|
250
|
+
* @function
|
251
|
+
* @private
|
252
|
+
*/
|
253
|
+
|
254
|
+
}, {
|
255
|
+
key: '_events',
|
256
|
+
value: function _events() {
|
257
|
+
var _this = this;
|
258
|
+
|
259
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).on('changed.zf.mediaquery', function () {
|
260
|
+
_this._checkMediaQueries();
|
261
|
+
});
|
262
|
+
// $(window).on('resize.zf.ResponsiveMenu', function() {
|
263
|
+
// _this._checkMediaQueries();
|
264
|
+
// });
|
265
|
+
}
|
266
|
+
|
267
|
+
/**
|
268
|
+
* Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.
|
269
|
+
* @function
|
270
|
+
* @private
|
271
|
+
*/
|
272
|
+
|
273
|
+
}, {
|
274
|
+
key: '_checkMediaQueries',
|
275
|
+
value: function _checkMediaQueries() {
|
276
|
+
var matchedMq,
|
277
|
+
_this = this;
|
278
|
+
// Iterate through each rule and find the last matching rule
|
279
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.each(this.rules, function (key) {
|
280
|
+
if (__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"].atLeast(key)) {
|
281
|
+
matchedMq = key;
|
282
|
+
}
|
283
|
+
});
|
284
|
+
|
285
|
+
// No match? No dice
|
286
|
+
if (!matchedMq) return;
|
287
|
+
|
288
|
+
// Plugin already initialized? We good
|
289
|
+
if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;
|
290
|
+
|
291
|
+
// Remove existing plugin-specific CSS classes
|
292
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.each(MenuPlugins, function (key, value) {
|
293
|
+
_this.$element.removeClass(value.cssClass);
|
294
|
+
});
|
295
|
+
|
296
|
+
// Add the CSS class for the new plugin
|
297
|
+
this.$element.addClass(this.rules[matchedMq].cssClass);
|
298
|
+
|
299
|
+
// Create an instance of the new plugin
|
300
|
+
if (this.currentPlugin) this.currentPlugin.destroy();
|
301
|
+
this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});
|
302
|
+
}
|
303
|
+
|
304
|
+
/**
|
305
|
+
* Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.
|
306
|
+
* @function
|
307
|
+
*/
|
308
|
+
|
309
|
+
}, {
|
310
|
+
key: '_destroy',
|
311
|
+
value: function _destroy() {
|
312
|
+
this.currentPlugin.destroy();
|
313
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('.zf.ResponsiveMenu');
|
314
|
+
}
|
315
|
+
}]);
|
316
|
+
|
317
|
+
return ResponsiveMenu;
|
318
|
+
}(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__["Plugin"]);
|
319
|
+
|
320
|
+
ResponsiveMenu.defaults = {};
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
/***/ }),
|
325
|
+
|
326
|
+
/***/ 6:
|
327
|
+
/***/ (function(module, exports) {
|
328
|
+
|
329
|
+
module.exports = {MediaQuery: window.Foundation.MediaQuery};
|
330
|
+
|
331
|
+
/***/ }),
|
332
|
+
|
333
|
+
/***/ 73:
|
334
|
+
/***/ (function(module, exports) {
|
335
|
+
|
336
|
+
module.exports = {AccordionMenu: window.Foundation.AccordionMenu};
|
337
|
+
|
338
|
+
/***/ }),
|
339
|
+
|
340
|
+
/***/ 74:
|
341
|
+
/***/ (function(module, exports) {
|
342
|
+
|
343
|
+
module.exports = {Drilldown: window.Foundation.Drilldown};
|
344
|
+
|
345
|
+
/***/ }),
|
346
|
+
|
347
|
+
/***/ 75:
|
348
|
+
/***/ (function(module, exports) {
|
349
|
+
|
350
|
+
module.exports = {DropdownMenu: window.Foundation.DropdownMenu};
|
351
|
+
|
352
|
+
/***/ }),
|
353
|
+
|
354
|
+
/***/ 91:
|
355
|
+
/***/ (function(module, exports, __webpack_require__) {
|
356
|
+
|
357
|
+
module.exports = __webpack_require__(25);
|
358
|
+
|
359
|
+
|
360
|
+
/***/ })
|
361
|
+
|
362
|
+
/******/ });
|