foundation-rails 6.1.1.3 → 6.1.2.0
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.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/templates/_settings.scss +4 -2
- data/vendor/assets/js/foundation.abide.js +2 -2
- data/vendor/assets/js/foundation.accordion.js +16 -14
- data/vendor/assets/js/foundation.accordionMenu.js +20 -23
- data/vendor/assets/js/foundation.core.js +6 -8
- data/vendor/assets/js/foundation.drilldown.js +4 -4
- data/vendor/assets/js/foundation.dropdown.js +5 -3
- data/vendor/assets/js/foundation.dropdownMenu.js +8 -9
- data/vendor/assets/js/foundation.equalizer.js +6 -6
- data/vendor/assets/js/foundation.interchange.js +14 -5
- data/vendor/assets/js/foundation.magellan.js +25 -11
- data/vendor/assets/js/foundation.offcanvas.js +9 -4
- data/vendor/assets/js/foundation.orbit.js +306 -304
- data/vendor/assets/js/foundation.responsiveMenu.js +0 -6
- data/vendor/assets/js/foundation.reveal.js +63 -27
- data/vendor/assets/js/foundation.slider.js +65 -39
- data/vendor/assets/js/foundation.tabs.js +6 -7
- data/vendor/assets/js/foundation.tooltip.js +3 -3
- data/vendor/assets/js/foundation.util.nest.js +2 -3
- data/vendor/assets/js/foundation.util.timerAndImageLoader.js +4 -0
- data/vendor/assets/js/foundation.util.touch.js +17 -4
- data/vendor/assets/js/foundation.util.triggers.js +5 -3
- data/vendor/assets/scss/_global.scss +12 -2
- data/vendor/assets/scss/components/_accordion.scss +1 -5
- data/vendor/assets/scss/components/_button-group.scss +17 -2
- data/vendor/assets/scss/components/_button.scss +1 -8
- data/vendor/assets/scss/components/_drilldown.scss +4 -4
- data/vendor/assets/scss/components/_dropdown-menu.scss +88 -75
- data/vendor/assets/scss/components/_dropdown.scss +3 -2
- data/vendor/assets/scss/components/_media-object.scss +1 -1
- data/vendor/assets/scss/components/_menu.scss +7 -2
- data/vendor/assets/scss/components/_off-canvas.scss +0 -4
- data/vendor/assets/scss/components/_orbit.scss +1 -1
- data/vendor/assets/scss/components/_pagination.scss +6 -2
- data/vendor/assets/scss/components/_progress-bar.scss +14 -9
- data/vendor/assets/scss/components/_reveal.scss +8 -6
- data/vendor/assets/scss/components/_slider.scss +7 -0
- data/vendor/assets/scss/components/_table.scss +77 -64
- data/vendor/assets/scss/components/_title-bar.scss +4 -0
- data/vendor/assets/scss/components/_tooltip.scss +10 -2
- data/vendor/assets/scss/components/_top-bar.scss +13 -8
- data/vendor/assets/scss/forms/_error.scss +1 -1
- data/vendor/assets/scss/forms/_fieldset.scss +1 -0
- data/vendor/assets/scss/forms/_forms.scss +8 -9
- data/vendor/assets/scss/forms/_input-group.scss +1 -0
- data/vendor/assets/scss/forms/_select.scss +3 -1
- data/vendor/assets/scss/forms/_text.scss +1 -1
- data/vendor/assets/scss/foundation.scss +1 -1
- data/vendor/assets/scss/grid/_classes.scss +12 -2
- data/vendor/assets/scss/grid/_column.scss +1 -1
- data/vendor/assets/scss/grid/_flex-grid.scss +20 -3
- data/vendor/assets/scss/grid/_gutter.scss +1 -1
- data/vendor/assets/scss/grid/_position.scss +1 -0
- data/vendor/assets/scss/grid/_row.scss +1 -0
- data/vendor/assets/scss/settings/_settings.scss +4 -2
- data/vendor/assets/scss/util/_breakpoint.scss +10 -10
- data/vendor/assets/scss/util/_mixins.scss +6 -2
- data/vendor/assets/scss/util/_unit.scss +1 -1
- metadata +2 -2
@@ -106,11 +106,17 @@
|
|
106
106
|
*/
|
107
107
|
overlay: true,
|
108
108
|
/**
|
109
|
-
* Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api.
|
109
|
+
* Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background.
|
110
110
|
* @option
|
111
111
|
* @example false
|
112
112
|
*/
|
113
|
-
resetOnClose: false
|
113
|
+
resetOnClose: false,
|
114
|
+
/**
|
115
|
+
* Allows the modal to alter the url on open/close, and allows the use of the `back` button to close modals. ALSO, allows a modal to auto-maniacally open on page load IF the hash === the modal's user-set id.
|
116
|
+
* @option
|
117
|
+
* @example false
|
118
|
+
*/
|
119
|
+
deepLink: false
|
114
120
|
};
|
115
121
|
|
116
122
|
/**
|
@@ -152,6 +158,9 @@
|
|
152
158
|
});
|
153
159
|
|
154
160
|
this._events();
|
161
|
+
if(this.options.deepLink && window.location.hash === ( '#' + this.id)){
|
162
|
+
$(window).one('load.zf.reveal', this.open.bind(this));
|
163
|
+
}
|
155
164
|
};
|
156
165
|
|
157
166
|
/**
|
@@ -203,6 +212,17 @@
|
|
203
212
|
if(this.options.closeOnClick && this.options.overlay){
|
204
213
|
this.$overlay.off('.zf.reveal').on('click.zf.reveal', this.close.bind(this));
|
205
214
|
}
|
215
|
+
if(this.options.deepLink){
|
216
|
+
$(window).on('popstate.zf.reveal:' + this.id, this._handleState.bind(this));
|
217
|
+
}
|
218
|
+
};
|
219
|
+
/**
|
220
|
+
* Handles modal methods on back/forward button clicks or any other event that triggers popstate.
|
221
|
+
* @private
|
222
|
+
*/
|
223
|
+
Reveal.prototype._handleState = function(e){
|
224
|
+
if(window.location.hash === ( '#' + this.id) && !this.isActive){ this.open(); }
|
225
|
+
else{ this.close(); }
|
206
226
|
};
|
207
227
|
/**
|
208
228
|
* Sets the position of the modal before opening
|
@@ -250,6 +270,16 @@
|
|
250
270
|
* @fires Reveal#open
|
251
271
|
*/
|
252
272
|
Reveal.prototype.open = function(){
|
273
|
+
if(this.options.deepLink){
|
274
|
+
var hash = '#' + this.id;
|
275
|
+
|
276
|
+
if(window.history.pushState){
|
277
|
+
window.history.pushState(null, null, hash);
|
278
|
+
}else{
|
279
|
+
window.location.hash = hash;
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
253
283
|
var _this = this;
|
254
284
|
this.isActive = true;
|
255
285
|
//make element invisible, but remove display: none so we can get size and positioning
|
@@ -307,7 +337,6 @@
|
|
307
337
|
.attr({'aria-hidden': (this.options.overlay || this.options.fullScreen) ? true : false});
|
308
338
|
setTimeout(function(){
|
309
339
|
_this._extraHandlers();
|
310
|
-
// Foundation.reflow();
|
311
340
|
}, 0);
|
312
341
|
};
|
313
342
|
|
@@ -321,8 +350,8 @@
|
|
321
350
|
|
322
351
|
if(!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen){
|
323
352
|
$('body').on('click.zf.reveal', function(e){
|
324
|
-
|
325
|
-
|
353
|
+
if(e.target === _this.$element[0] || $.contains(_this.$element[0], e.target)){ return; }
|
354
|
+
_this.close();
|
326
355
|
});
|
327
356
|
}
|
328
357
|
if(this.options.closeOnEsc){
|
@@ -392,16 +421,14 @@
|
|
392
421
|
if(this.options.animationOut){
|
393
422
|
Foundation.Motion.animateOut(this.$element, this.options.animationOut, function(){
|
394
423
|
if(_this.options.overlay){
|
395
|
-
Foundation.Motion.animateOut(_this.$overlay, 'fade-out',
|
396
|
-
|
397
|
-
}
|
424
|
+
Foundation.Motion.animateOut(_this.$overlay, 'fade-out', finishUp);
|
425
|
+
}else{ finishUp(); }
|
398
426
|
});
|
399
427
|
}else{
|
400
428
|
this.$element.hide(_this.options.hideDelay, function(){
|
401
429
|
if(_this.options.overlay){
|
402
|
-
_this.$overlay.hide(0,
|
403
|
-
|
404
|
-
}
|
430
|
+
_this.$overlay.hide(0, finishUp);
|
431
|
+
}else{ finishUp(); }
|
405
432
|
});
|
406
433
|
}
|
407
434
|
//conditionals to remove extra event listeners added on open
|
@@ -412,16 +439,23 @@
|
|
412
439
|
$('body').off('click.zf.reveal');
|
413
440
|
}
|
414
441
|
this.$element.off('keydown.zf.reveal');
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
442
|
+
function finishUp(){
|
443
|
+
//if the modal changed size, reset it
|
444
|
+
if(_this.changedSize){
|
445
|
+
_this.$element.css({
|
446
|
+
'height': '',
|
447
|
+
'width': ''
|
448
|
+
});
|
449
|
+
}
|
450
|
+
$('body').removeClass('is-reveal-open').attr({'aria-hidden': false, 'tabindex': ''});
|
451
|
+
_this.$element.attr({'aria-hidden': true})
|
452
|
+
/**
|
453
|
+
* Fires when the modal is done closing.
|
454
|
+
* @event Reveal#closed
|
455
|
+
*/
|
456
|
+
.trigger('closed.zf.reveal');
|
422
457
|
}
|
423
458
|
|
424
|
-
$('body').removeClass('is-reveal-open').attr({'aria-hidden': false, 'tabindex': ''});
|
425
459
|
|
426
460
|
/**
|
427
461
|
* Resets the modal content
|
@@ -432,12 +466,13 @@
|
|
432
466
|
}
|
433
467
|
|
434
468
|
this.isActive = false;
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
469
|
+
if(_this.options.deepLink){
|
470
|
+
if(window.history.replaceState){
|
471
|
+
window.history.replaceState("", document.title, window.location.pathname);
|
472
|
+
}else{
|
473
|
+
window.location.hash = '';
|
474
|
+
}
|
475
|
+
}
|
441
476
|
};
|
442
477
|
/**
|
443
478
|
* Toggles the open/closed state of a modal.
|
@@ -459,8 +494,9 @@
|
|
459
494
|
if(this.options.overlay){
|
460
495
|
this.$overlay.hide().off().remove();
|
461
496
|
}
|
462
|
-
this.$element.hide();
|
463
|
-
this.$anchor.off();
|
497
|
+
this.$element.hide().off();
|
498
|
+
this.$anchor.off('.zf');
|
499
|
+
$(window).off('.zf.reveal:' + this.id);
|
464
500
|
|
465
501
|
Foundation.unregisterPlugin(this);
|
466
502
|
};
|
@@ -133,7 +133,8 @@
|
|
133
133
|
* @option
|
134
134
|
* @example 'disabled'
|
135
135
|
*/
|
136
|
-
disabledClass: 'disabled'
|
136
|
+
disabledClass: 'disabled',
|
137
|
+
invertVertical: false
|
137
138
|
};
|
138
139
|
/**
|
139
140
|
* Initilizes the plugin by reading/setting attributes, creating collections and setting the initial position of the handle(s).
|
@@ -173,7 +174,7 @@
|
|
173
174
|
|
174
175
|
this._setHandlePos(this.$handle, this.options.initialStart, true, function(){
|
175
176
|
|
176
|
-
_this._setHandlePos(_this.$handle2, _this.options.initialEnd);
|
177
|
+
_this._setHandlePos(_this.$handle2, _this.options.initialEnd, true);
|
177
178
|
});
|
178
179
|
// this.$handle.triggerHandler('click.zf.slider');
|
179
180
|
this._setInitAttr(1);
|
@@ -196,14 +197,14 @@
|
|
196
197
|
Slider.prototype._setHandlePos = function($hndl, location, noInvert, cb){
|
197
198
|
//might need to alter that slightly for bars that will have odd number selections.
|
198
199
|
location = parseFloat(location);//on input change events, convert string to number...grumble.
|
199
|
-
|
200
|
+
|
201
|
+
// prevent slider from running out of bounds, if value exceeds the limits set through options, override the value to min/max
|
200
202
|
if(location < this.options.start){ location = this.options.start; }
|
201
203
|
else if(location > this.options.end){ location = this.options.end; }
|
202
204
|
|
203
|
-
var isDbl = this.options.doubleSided
|
204
|
-
callback = cb || null;
|
205
|
+
var isDbl = this.options.doubleSided;
|
205
206
|
|
206
|
-
if(isDbl){
|
207
|
+
if(isDbl){ //this block is to prevent 2 handles from crossing eachother. Could/should be improved.
|
207
208
|
if(this.handles.index($hndl) === 0){
|
208
209
|
var h2Val = parseFloat(this.$handle2.attr('aria-valuenow'));
|
209
210
|
location = location >= h2Val ? h2Val - this.options.step : location;
|
@@ -213,58 +214,82 @@
|
|
213
214
|
}
|
214
215
|
}
|
215
216
|
|
217
|
+
//this is for single-handled vertical sliders, it adjusts the value to account for the slider being "upside-down"
|
218
|
+
//for click and drag events, it's weird due to the scale(-1, 1) css property
|
216
219
|
if(this.options.vertical && !noInvert){
|
217
220
|
location = this.options.end - location;
|
218
221
|
}
|
222
|
+
|
219
223
|
var _this = this,
|
220
224
|
vert = this.options.vertical,
|
221
225
|
hOrW = vert ? 'height' : 'width',
|
222
226
|
lOrT = vert ? 'top' : 'left',
|
223
|
-
|
227
|
+
handleDim = $hndl[0].getBoundingClientRect()[hOrW],
|
224
228
|
elemDim = this.$element[0].getBoundingClientRect()[hOrW],
|
229
|
+
//percentage of bar min/max value based on click or drag point
|
225
230
|
pctOfBar = percent(location, this.options.end).toFixed(2),
|
226
|
-
|
231
|
+
//number of actual pixels to shift the handle, based on the percentage obtained above
|
232
|
+
pxToMove = (elemDim - handleDim) * pctOfBar,
|
233
|
+
//percentage of bar to shift the handle
|
227
234
|
movement = (percent(pxToMove, elemDim) * 100).toFixed(this.options.decimal),
|
228
|
-
|
229
|
-
|
235
|
+
//fixing the decimal value for the location number, is passed to other methods as a fixed floating-point value
|
236
|
+
location = parseFloat(location.toFixed(this.options.decimal)),
|
237
|
+
// declare empty object for css adjustments, only used with 2 handled-sliders
|
238
|
+
css = {};
|
230
239
|
|
231
240
|
this._setValues($hndl, location);
|
232
241
|
|
233
|
-
|
242
|
+
// TODO update to calculate based on values set to respective inputs??
|
243
|
+
if(isDbl){
|
234
244
|
var isLeftHndl = this.handles.index($hndl) === 0,
|
245
|
+
//empty variable, will be used for min-height/width for fill bar
|
235
246
|
dim,
|
236
|
-
|
237
|
-
|
247
|
+
//percentage w/h of the handle compared to the slider bar
|
248
|
+
handlePct = ~~(percent(handleDim, elemDim) * 100);
|
249
|
+
//if left handle, the math is slightly different than if it's the right handle, and the left/top property needs to be changed for the fill bar
|
238
250
|
if(isLeftHndl){
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
251
|
+
//left or top percentage value to apply to the fill bar.
|
252
|
+
css[lOrT] = movement + '%';
|
253
|
+
//calculate the new min-height/width for the fill bar.
|
254
|
+
dim = parseFloat(this.$handle2[0].style[lOrT]) - movement + handlePct;
|
255
|
+
//this callback is necessary to prevent errors and allow the proper placement and initialization of a 2-handled slider
|
256
|
+
//plus, it means we don't care if 'dim' isNaN on init, it won't be in the future.
|
257
|
+
if(cb && typeof cb === 'function'){ cb(); }//this is only needed for the initialization of 2 handled sliders
|
243
258
|
}else{
|
244
|
-
|
245
|
-
|
246
|
-
|
259
|
+
//just caching the value of the left/bottom handle's left/top property
|
260
|
+
var handlePos = parseFloat(this.$handle[0].style[lOrT]);
|
261
|
+
//calculate the new min-height/width for the fill bar. Use isNaN to prevent false positives for numbers <= 0
|
262
|
+
//based on the percentage of movement of the handle being manipulated, less the opposing handle's left/top position, plus the percentage w/h of the handle itself
|
263
|
+
dim = movement - (isNaN(handlePos) ? this.options.initialStart : handlePos) + handlePct;
|
247
264
|
}
|
265
|
+
// assign the min-height/width to our css object
|
266
|
+
css['min-' + hOrW] = dim + '%';
|
248
267
|
}
|
249
268
|
|
250
269
|
this.$element.one('finished.zf.animate', function(){
|
251
|
-
_this.animComplete = true;
|
252
270
|
/**
|
253
271
|
* Fires when the handle is done moving.
|
254
272
|
* @event Slider#moved
|
255
273
|
*/
|
256
274
|
_this.$element.trigger('moved.zf.slider', [$hndl]);
|
257
275
|
});
|
258
|
-
|
259
|
-
|
276
|
+
|
277
|
+
//because we don't know exactly how the handle will be moved, check the amount of time it should take to move.
|
278
|
+
var moveTime = this.$element.data('dragging') ? 1000/60 : this.options.moveTime;
|
279
|
+
|
280
|
+
Foundation.Move(moveTime, $hndl, function(){
|
281
|
+
//adjusting the left/top property of the handle, based on the percentage calculated above
|
260
282
|
$hndl.css(lOrT, movement + '%');
|
283
|
+
|
261
284
|
if(!_this.options.doubleSided){
|
285
|
+
//if single-handled, a simple method to expand the fill bar
|
262
286
|
_this.$fill.css(hOrW, pctOfBar * 100 + '%');
|
263
287
|
}else{
|
288
|
+
//otherwise, use the css object we created above
|
264
289
|
_this.$fill.css(css);
|
265
290
|
}
|
266
291
|
});
|
267
|
-
|
292
|
+
|
268
293
|
};
|
269
294
|
/**
|
270
295
|
* Sets the initial attribute for the slider element.
|
@@ -311,6 +336,7 @@
|
|
311
336
|
* @param {Object} e - the `event` object passed from the listener.
|
312
337
|
* @param {jQuery} $handle - the current handle to calculate for, if selected.
|
313
338
|
* @param {Number} val - floating point number for the new value of the slider.
|
339
|
+
* TODO clean this up, there's a lot of repeated code between this and the _setHandlePos fn.
|
314
340
|
*/
|
315
341
|
Slider.prototype._handleEvent = function(e, $handle, val){
|
316
342
|
var value, hasVal;
|
@@ -324,10 +350,13 @@
|
|
324
350
|
halfOfHandle = this.$handle[0].getBoundingClientRect()[param] / 2,
|
325
351
|
barDim = this.$element[0].getBoundingClientRect()[param],
|
326
352
|
barOffset = (this.$element.offset()[direction] - pageXY),
|
327
|
-
|
328
|
-
|
353
|
+
//if the cursor position is less than or greater than the elements bounding coordinates, set coordinates within those bounds
|
354
|
+
barXY = barOffset > 0 ? -halfOfHandle : (barOffset - halfOfHandle) < -barDim ? barDim : Math.abs(barOffset),
|
329
355
|
offsetPct = percent(barXY, barDim);
|
330
356
|
value = (this.options.end - this.options.start) * offsetPct;
|
357
|
+
// turn everything around for RTL, yay math!
|
358
|
+
if (Foundation.rtl() && !this.options.vertical) {value = this.options.end - value;}
|
359
|
+
//boolean flag for the setHandlePos fn, specifically for vertical sliders
|
331
360
|
hasVal = false;
|
332
361
|
|
333
362
|
if(!$handle){//figure out which handle it is, pass it to the next function.
|
@@ -364,7 +393,7 @@
|
|
364
393
|
if(this.options.clickSelect){
|
365
394
|
this.$element.off('click.zf.slider').on('click.zf.slider', function(e){
|
366
395
|
if(_this.$element.data('dragging')){ return false; }
|
367
|
-
|
396
|
+
|
368
397
|
if(_this.options.doubleSided){
|
369
398
|
_this._handleEvent(e);
|
370
399
|
}else{
|
@@ -375,8 +404,7 @@
|
|
375
404
|
|
376
405
|
if(this.options.draggable){
|
377
406
|
this.handles.addTouch();
|
378
|
-
|
379
|
-
// timer,
|
407
|
+
|
380
408
|
var $body = $('body');
|
381
409
|
$handle
|
382
410
|
.off('mousedown.zf.slider')
|
@@ -384,33 +412,31 @@
|
|
384
412
|
$handle.addClass('is-dragging');
|
385
413
|
_this.$fill.addClass('is-dragging');//
|
386
414
|
_this.$element.data('dragging', true);
|
387
|
-
|
415
|
+
|
388
416
|
curHandle = $(e.currentTarget);
|
389
417
|
|
390
418
|
$body.on('mousemove.zf.slider', function(e){
|
391
419
|
e.preventDefault();
|
392
420
|
|
393
|
-
// timer = setTimeout(function(){
|
394
421
|
_this._handleEvent(e, curHandle);
|
395
|
-
|
422
|
+
|
396
423
|
}).on('mouseup.zf.slider', function(e){
|
397
|
-
// clearTimeout(timer);
|
398
|
-
_this.animComplete = true;
|
399
424
|
_this._handleEvent(e, curHandle);
|
425
|
+
|
400
426
|
$handle.removeClass('is-dragging');
|
401
427
|
_this.$fill.removeClass('is-dragging');
|
402
428
|
_this.$element.data('dragging', false);
|
403
|
-
|
429
|
+
|
404
430
|
$body.off('mousemove.zf.slider mouseup.zf.slider');
|
405
431
|
});
|
406
432
|
});
|
407
433
|
}
|
408
434
|
$handle.off('keydown.zf.slider').on('keydown.zf.slider', function(e){
|
409
|
-
var
|
410
|
-
|
411
|
-
|
435
|
+
var _$handle = $(this),
|
436
|
+
idx = _this.options.doubleSided ? _this.handles.index(_$handle) : 0,
|
437
|
+
oldValue = parseFloat(_this.inputs.eq(idx).val()),
|
438
|
+
newValue;
|
412
439
|
|
413
|
-
var _$handle = $(this);
|
414
440
|
|
415
441
|
// handle keyboard event with keyboard util
|
416
442
|
Foundation.Keyboard.handleKey(e, 'Slider', {
|
@@ -88,9 +88,9 @@
|
|
88
88
|
var $elem = $(this),
|
89
89
|
$link = $elem.find('a'),
|
90
90
|
isActive = $elem.hasClass('is-active'),
|
91
|
-
hash = $link.
|
92
|
-
linkId = hash + '-label',
|
93
|
-
$tabContent = $(hash);
|
91
|
+
hash = $link[0].hash.slice(1),
|
92
|
+
linkId = $link[0].id ? $link[0].id : hash + '-label',
|
93
|
+
$tabContent = $('#' + hash);
|
94
94
|
|
95
95
|
$elem.attr({'role': 'presentation'});
|
96
96
|
|
@@ -209,14 +209,13 @@
|
|
209
209
|
*/
|
210
210
|
Tabs.prototype._handleTabChange = function($target){
|
211
211
|
var $tabLink = $target.find('[role="tab"]'),
|
212
|
-
hash = $tabLink.
|
212
|
+
hash = $tabLink[0].hash,
|
213
213
|
$targetContent = $(hash),
|
214
|
-
|
215
214
|
$oldTab = this.$element.find('.' + this.options.linkClass + '.is-active')
|
216
215
|
.removeClass('is-active').find('[role="tab"]')
|
217
|
-
.attr({'aria-selected': 'false'}).attr('
|
216
|
+
.attr({'aria-selected': 'false'}).attr('aria-controls');
|
218
217
|
|
219
|
-
$(
|
218
|
+
$('#'+$oldTab).removeClass('is-active').attr({'aria-hidden': 'true'});
|
220
219
|
|
221
220
|
$target.addClass('is-active');
|
222
221
|
|
@@ -152,7 +152,7 @@
|
|
152
152
|
Tooltip.prototype._getPositionClass = function(element){
|
153
153
|
if(!element){ return ''; }
|
154
154
|
// var position = element.attr('class').match(/top|left|right/g);
|
155
|
-
var position = element[0].className.match(
|
155
|
+
var position = element[0].className.match(/\b(top|left|right)\b/g);
|
156
156
|
position = position ? position[0] : '';
|
157
157
|
return position;
|
158
158
|
};
|
@@ -161,7 +161,7 @@
|
|
161
161
|
* @private
|
162
162
|
*/
|
163
163
|
Tooltip.prototype._buildTemplate = function(id){
|
164
|
-
var templateClasses = (this.options.tooltipClass + ' ' + this.options.positionClass).trim();
|
164
|
+
var templateClasses = (this.options.tooltipClass + ' ' + this.options.positionClass + ' ' + this.options.templateClasses).trim();
|
165
165
|
var $template = $('<div></div>').addClass(templateClasses).attr({
|
166
166
|
'role': 'tooltip',
|
167
167
|
'aria-hidden': true,
|
@@ -246,7 +246,7 @@
|
|
246
246
|
|
247
247
|
/**
|
248
248
|
* reveals the tooltip, and fires an event to close any other open tooltips on the page
|
249
|
-
* @fires
|
249
|
+
* @fires Tooltip#closeme
|
250
250
|
* @fires Tooltip#show
|
251
251
|
* @function
|
252
252
|
*/
|