mirror of
https://github.com/Hutchy68/pivot.git
synced 2025-12-19 15:27:03 +01:00
Update to Foundation.js
This commit is contained in:
parent
cd535df66e
commit
8ae56081c1
121
assets/scripts/foundation/foundation.joyride.js
vendored
121
assets/scripts/foundation/foundation.joyride.js
vendored
@@ -6,13 +6,13 @@
|
||||
Foundation.libs.joyride = {
|
||||
name : 'joyride',
|
||||
|
||||
version : '5.5.2',
|
||||
version : '5.5.3',
|
||||
|
||||
defaults : {
|
||||
expose : false, // turn on or off the expose feature
|
||||
modal : true, // Whether to cover page with modal during the tour
|
||||
keyboard : true, // enable left, right and esc keystrokes
|
||||
tip_location : 'bottom', // 'top' or 'bottom' in relation to parent
|
||||
tip_location : 'bottom', // 'top', 'bottom', 'left' or 'right' in relation to parent
|
||||
nub_position : 'auto', // override on a per tooltip bases
|
||||
scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
|
||||
scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
|
||||
@@ -323,8 +323,8 @@
|
||||
|
||||
this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
|
||||
|
||||
// scroll and hide bg if not modal
|
||||
if (!/body/i.test(this.settings.$target.selector)) {
|
||||
// scroll and hide bg if not modal and not expose
|
||||
if (!/body/i.test(this.settings.$target.selector) && !this.settings.expose) {
|
||||
var joyridemodalbg = $('.joyride-modal-bg');
|
||||
if (/pop/i.test(this.settings.tipAnimation)) {
|
||||
joyridemodalbg.hide();
|
||||
@@ -500,68 +500,68 @@
|
||||
}
|
||||
|
||||
if (!/body/i.test(this.settings.$target.selector)) {
|
||||
var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
|
||||
leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
|
||||
|
||||
if (this.bottom()) {
|
||||
if (this.rtl) {
|
||||
this.settings.$next_tip.css({
|
||||
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
||||
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
|
||||
} else {
|
||||
this.settings.$next_tip.css({
|
||||
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
||||
left : this.settings.$target.offset().left + leftAdjustment});
|
||||
}
|
||||
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
|
||||
|
||||
} else if (this.top()) {
|
||||
if (this.rtl) {
|
||||
this.settings.$next_tip.css({
|
||||
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
||||
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
|
||||
} else {
|
||||
this.settings.$next_tip.css({
|
||||
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
||||
left : this.settings.$target.offset().left + leftAdjustment});
|
||||
}
|
||||
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
|
||||
|
||||
} else if (this.right()) {
|
||||
var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
|
||||
leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
|
||||
|
||||
if (this.bottom()) {
|
||||
if (this.rtl) {
|
||||
this.settings.$next_tip.css({
|
||||
top : this.settings.$target.offset().top + topAdjustment,
|
||||
left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
|
||||
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
|
||||
|
||||
} else if (this.left()) {
|
||||
|
||||
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
||||
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
|
||||
} else {
|
||||
this.settings.$next_tip.css({
|
||||
top : this.settings.$target.offset().top + topAdjustment,
|
||||
left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
|
||||
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
|
||||
|
||||
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
|
||||
left : this.settings.$target.offset().left + leftAdjustment});
|
||||
}
|
||||
|
||||
if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
|
||||
|
||||
$nub.removeClass('bottom')
|
||||
.removeClass('top')
|
||||
.removeClass('right')
|
||||
.removeClass('left');
|
||||
|
||||
this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
|
||||
|
||||
this.settings.attempts++;
|
||||
|
||||
this.pos_default();
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
|
||||
|
||||
} else if (this.top()) {
|
||||
if (this.rtl) {
|
||||
this.settings.$next_tip.css({
|
||||
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
||||
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
|
||||
} else {
|
||||
this.settings.$next_tip.css({
|
||||
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
|
||||
left : this.settings.$target.offset().left + leftAdjustment});
|
||||
}
|
||||
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
|
||||
|
||||
} else if (this.right()) {
|
||||
|
||||
this.settings.$next_tip.css({
|
||||
top : this.settings.$target.offset().top + topAdjustment,
|
||||
left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
|
||||
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
|
||||
|
||||
} else if (this.left()) {
|
||||
|
||||
this.settings.$next_tip.css({
|
||||
top : this.settings.$target.offset().top + topAdjustment,
|
||||
left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
|
||||
|
||||
this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
|
||||
|
||||
}
|
||||
|
||||
if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
|
||||
|
||||
$nub.removeClass('bottom')
|
||||
.removeClass('top')
|
||||
.removeClass('right')
|
||||
.removeClass('left');
|
||||
|
||||
this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
|
||||
|
||||
this.settings.attempts++;
|
||||
|
||||
this.pos_default();
|
||||
|
||||
}
|
||||
|
||||
} else if (this.settings.$li.length) {
|
||||
|
||||
this.pos_modal($nub);
|
||||
@@ -827,6 +827,10 @@
|
||||
},
|
||||
|
||||
corners : function (el) {
|
||||
if (el.length === 0) {
|
||||
return [false, false, false, false];
|
||||
}
|
||||
|
||||
var w = $(window),
|
||||
window_half = w.height() / 2,
|
||||
//using this to calculate since scroll may not have finished yet.
|
||||
@@ -924,7 +928,6 @@
|
||||
$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
|
||||
$('.joyride-tip-guide, .joyride-modal-bg').remove();
|
||||
clearTimeout(this.settings.automate);
|
||||
this.settings = {};
|
||||
},
|
||||
|
||||
reflow : function () {}
|
||||
|
||||
Reference in New Issue
Block a user