foundation-rails 5.4.5.0 → 5.5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bower.json +2 -2
- data/foundation-rails.gemspec +1 -1
- data/lib/foundation/rails/generators/install_generator.rb +4 -4
- data/lib/foundation/rails/templates/application.html.erb +3 -2
- data/lib/foundation/rails/templates/application.html.haml +1 -1
- data/lib/foundation/rails/templates/application.html.slim +1 -1
- data/lib/foundation/rails/version.rb +1 -1
- data/vendor/assets/_settings.scss +25 -21
- data/vendor/assets/javascripts/foundation/foundation.abide.js +28 -23
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +10 -8
- data/vendor/assets/javascripts/foundation/foundation.alert.js +4 -4
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +3 -3
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +139 -22
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +1 -2
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +14 -10
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +18 -9
- data/vendor/assets/javascripts/foundation/foundation.js +86 -21
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +15 -6
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +14 -14
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +3 -3
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +16 -11
- data/vendor/assets/javascripts/foundation/foundation.slider.js +56 -28
- data/vendor/assets/javascripts/foundation/foundation.tab.js +9 -9
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +1 -1
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +5 -5
- data/vendor/assets/stylesheets/foundation/_functions.scss +57 -12
- data/vendor/assets/stylesheets/foundation/_settings.scss +25 -21
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +2 -0
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +1 -2
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +4 -5
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +11 -10
- data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +1 -0
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +31 -32
- data/vendor/assets/stylesheets/foundation/components/_global.scss +53 -25
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +18 -4
- data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +51 -15
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +8 -6
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +11 -11
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +6 -0
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +6 -3
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +1 -3
- data/vendor/assets/stylesheets/foundation/components/_switches.scss +25 -13
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_toolbar.scss +3 -3
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +64 -53
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +7 -7
- data/vendor/assets/stylesheets/normalize.scss +5 -3
- metadata +8 -8
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.alert = {
|
5
5
|
name : 'alert',
|
6
6
|
|
7
|
-
version : '5.
|
7
|
+
version : '5.5.0',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
callback: function (){}
|
@@ -19,12 +19,12 @@
|
|
19
19
|
S = this.S;
|
20
20
|
|
21
21
|
$(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] .close', function (e) {
|
22
|
-
|
23
|
-
|
22
|
+
var alertBox = S(this).closest('[' + self.attr_name() + ']'),
|
23
|
+
settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
|
24
24
|
|
25
25
|
e.preventDefault();
|
26
26
|
if (Modernizr.csstransitions) {
|
27
|
-
alertBox.addClass(
|
27
|
+
alertBox.addClass('alert-close');
|
28
28
|
alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
|
29
29
|
S(this).trigger('close').trigger('close.fndtn.alert').remove();
|
30
30
|
settings.callback();
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.clearing = {
|
5
5
|
name : 'clearing',
|
6
6
|
|
7
|
-
version: '5.
|
7
|
+
version: '5.5.0',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
templates : {
|
@@ -389,10 +389,10 @@
|
|
389
389
|
load : function ($image) {
|
390
390
|
var href;
|
391
391
|
|
392
|
-
if ($image[0].nodeName ===
|
392
|
+
if ($image[0].nodeName === 'A') {
|
393
393
|
href = $image.attr('href');
|
394
394
|
} else {
|
395
|
-
href = $image.
|
395
|
+
href = $image.closest('a').attr('href');
|
396
396
|
}
|
397
397
|
|
398
398
|
this.preload($image);
|
@@ -4,13 +4,15 @@
|
|
4
4
|
Foundation.libs.dropdown = {
|
5
5
|
name : 'dropdown',
|
6
6
|
|
7
|
-
version : '5.
|
7
|
+
version : '5.5.0',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
active_class: 'open',
|
11
|
+
disabled_class: 'disabled',
|
11
12
|
mega_class: 'mega',
|
12
13
|
align: 'bottom',
|
13
14
|
is_hover: false,
|
15
|
+
hover_timeout: 150,
|
14
16
|
opened: function(){},
|
15
17
|
closed: function(){}
|
16
18
|
},
|
@@ -18,6 +20,7 @@
|
|
18
20
|
init : function (scope, method, options) {
|
19
21
|
Foundation.inherit(this, 'throttle');
|
20
22
|
|
23
|
+
$.extend(true, this.settings, method, options);
|
21
24
|
this.bindings(method, options);
|
22
25
|
},
|
23
26
|
|
@@ -31,6 +34,9 @@
|
|
31
34
|
var settings = S(this).data(self.attr_name(true) + '-init') || self.settings;
|
32
35
|
if (!settings.is_hover || Modernizr.touch) {
|
33
36
|
e.preventDefault();
|
37
|
+
if (S(this).parent('[data-reveal-id]')) {
|
38
|
+
e.stopPropagation();
|
39
|
+
}
|
34
40
|
self.toggle($(this));
|
35
41
|
}
|
36
42
|
})
|
@@ -46,12 +52,12 @@
|
|
46
52
|
target = $this;
|
47
53
|
} else {
|
48
54
|
dropdown = $this;
|
49
|
-
target = S(
|
55
|
+
target = S('[' + self.attr_name() + '="' + dropdown.attr('id') + '"]');
|
50
56
|
}
|
51
57
|
|
52
58
|
var settings = target.data(self.attr_name(true) + '-init') || self.settings;
|
53
59
|
|
54
|
-
if(S(e.
|
60
|
+
if(S(e.currentTarget).data(self.data_attr()) && settings.is_hover) {
|
55
61
|
self.closeall.call(self);
|
56
62
|
}
|
57
63
|
|
@@ -59,23 +65,36 @@
|
|
59
65
|
})
|
60
66
|
.on('mouseleave.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
|
61
67
|
var $this = S(this);
|
68
|
+
var settings;
|
69
|
+
|
70
|
+
if ($this.data(self.data_attr())) {
|
71
|
+
settings = $this.data(self.data_attr(true) + '-init') || self.settings;
|
72
|
+
}
|
73
|
+
else {
|
74
|
+
var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'),
|
75
|
+
settings = target.data(self.attr_name(true) + '-init') || self.settings;
|
76
|
+
}
|
77
|
+
|
62
78
|
self.timeout = setTimeout(function () {
|
63
79
|
if ($this.data(self.data_attr())) {
|
64
|
-
var settings = $this.data(self.data_attr(true) + '-init') || self.settings;
|
65
80
|
if (settings.is_hover) self.close.call(self, S('#' + $this.data(self.data_attr())));
|
66
81
|
} else {
|
67
|
-
var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'),
|
68
|
-
settings = target.data(self.attr_name(true) + '-init') || self.settings;
|
69
82
|
if (settings.is_hover) self.close.call(self, $this);
|
70
83
|
}
|
71
|
-
}.bind(this),
|
84
|
+
}.bind(this), settings.hover_timeout);
|
72
85
|
})
|
73
86
|
.on('click.fndtn.dropdown', function (e) {
|
74
87
|
var parent = S(e.target).closest('[' + self.attr_name() + '-content]');
|
88
|
+
var links = parent.find('a');
|
89
|
+
|
90
|
+
if (links.length > 0 && parent.attr('aria-autoclose') !== "false") {
|
91
|
+
self.close.call(self, S('[' + self.attr_name() + '-content]'));
|
92
|
+
}
|
75
93
|
|
76
94
|
if (S(e.target).closest('[' + self.attr_name() + ']').length > 0) {
|
77
95
|
return;
|
78
96
|
}
|
97
|
+
|
79
98
|
if (!(S(e.target).data('revealId')) &&
|
80
99
|
(parent.length > 0 && (S(e.target).is('[' + self.attr_name() + '-content]') ||
|
81
100
|
$.contains(parent.first()[0], e.target)))) {
|
@@ -86,10 +105,10 @@
|
|
86
105
|
self.close.call(self, S('[' + self.attr_name() + '-content]'));
|
87
106
|
})
|
88
107
|
.on('opened.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
|
89
|
-
|
108
|
+
self.settings.opened.call(this);
|
90
109
|
})
|
91
110
|
.on('closed.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
|
92
|
-
|
111
|
+
self.settings.closed.call(this);
|
93
112
|
});
|
94
113
|
|
95
114
|
S(window)
|
@@ -105,11 +124,11 @@
|
|
105
124
|
var self = this;
|
106
125
|
dropdown.each(function () {
|
107
126
|
var original_target = $('[' + self.attr_name() + '=' + dropdown[0].id + ']') || $('aria-controls=' + dropdown[0].id+ ']');
|
108
|
-
original_target.attr('aria-expanded',
|
127
|
+
original_target.attr('aria-expanded', 'false');
|
109
128
|
if (self.S(this).hasClass(self.settings.active_class)) {
|
110
129
|
self.S(this)
|
111
130
|
.css(Foundation.rtl ? 'right':'left', '-99999px')
|
112
|
-
.attr('aria-hidden',
|
131
|
+
.attr('aria-hidden', 'true')
|
113
132
|
.removeClass(self.settings.active_class)
|
114
133
|
.prev('[' + self.attr_name() + ']')
|
115
134
|
.removeClass(self.settings.active_class)
|
@@ -118,24 +137,26 @@
|
|
118
137
|
self.S(this).trigger('closed').trigger('closed.fndtn.dropdown', [dropdown]);
|
119
138
|
}
|
120
139
|
});
|
140
|
+
dropdown.removeClass('f-open-' + this.attr_name(true));
|
121
141
|
},
|
122
142
|
|
123
143
|
closeall: function() {
|
124
144
|
var self = this;
|
125
|
-
$.each(self.S('
|
145
|
+
$.each(self.S('.f-open-' + this.attr_name(true)), function() {
|
126
146
|
self.close.call(self, self.S(this));
|
127
147
|
});
|
128
148
|
},
|
129
149
|
|
130
150
|
open: function (dropdown, target) {
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
151
|
+
this
|
152
|
+
.css(dropdown
|
153
|
+
.addClass(this.settings.active_class), target);
|
154
|
+
dropdown.prev('[' + this.attr_name() + ']').addClass(this.settings.active_class);
|
155
|
+
dropdown.data('target', target.get(0)).trigger('opened').trigger('opened.fndtn.dropdown', [dropdown, target]);
|
156
|
+
dropdown.attr('aria-hidden', 'false');
|
157
|
+
target.attr('aria-expanded', 'true');
|
158
|
+
dropdown.focus();
|
159
|
+
dropdown.addClass('f-open-' + this.attr_name(true));
|
139
160
|
},
|
140
161
|
|
141
162
|
data_attr: function () {
|
@@ -147,6 +168,9 @@
|
|
147
168
|
},
|
148
169
|
|
149
170
|
toggle : function (target) {
|
171
|
+
if (target.hasClass(this.settings.disabled_class)) {
|
172
|
+
return;
|
173
|
+
}
|
150
174
|
var dropdown = this.S('#' + target.data(this.data_attr()));
|
151
175
|
if (dropdown.length === 0) {
|
152
176
|
// No dropdown found, not continuing
|
@@ -166,7 +190,7 @@
|
|
166
190
|
|
167
191
|
resize : function () {
|
168
192
|
var dropdown = this.S('[' + this.attr_name() + '-content].open'),
|
169
|
-
target = this.S(
|
193
|
+
target = this.S('[' + this.attr_name() + '="' + dropdown.attr('id') + '"]');
|
170
194
|
|
171
195
|
if (dropdown.length && target.length) {
|
172
196
|
this.css(dropdown, target);
|
@@ -216,14 +240,63 @@
|
|
216
240
|
|
217
241
|
p.top -= o.top;
|
218
242
|
p.left -= o.left;
|
243
|
+
|
244
|
+
//set some flags on the p object to pass along
|
245
|
+
p.missRight = false;
|
246
|
+
p.missTop = false;
|
247
|
+
p.missLeft = false;
|
248
|
+
p.leftRightFlag = false;
|
249
|
+
|
250
|
+
//lets see if the panel will be off the screen
|
251
|
+
//get the actual width of the page and store it
|
252
|
+
var actualBodyWidth;
|
253
|
+
if (document.getElementsByClassName('row')[0]) {
|
254
|
+
actualBodyWidth = document.getElementsByClassName('row')[0].clientWidth;
|
255
|
+
} else {
|
256
|
+
actualBodyWidth = window.outerWidth;
|
257
|
+
}
|
258
|
+
|
259
|
+
var actualMarginWidth = (window.outerWidth - actualBodyWidth) / 2;
|
260
|
+
var actualBoundary = actualBodyWidth;
|
261
|
+
|
262
|
+
if (!this.hasClass('mega')) {
|
263
|
+
//miss top
|
264
|
+
if (t.offset().top <= this.outerHeight()) {
|
265
|
+
p.missTop = true;
|
266
|
+
actualBoundary = window.outerWidth - actualMarginWidth;
|
267
|
+
p.leftRightFlag = true;
|
268
|
+
}
|
269
|
+
|
270
|
+
//miss right
|
271
|
+
if (t.offset().left + this.outerWidth() > t.offset().left + actualMarginWidth && t.offset().left - actualMarginWidth > this.outerWidth()) {
|
272
|
+
p.missRight = true;
|
273
|
+
p.missLeft = false;
|
274
|
+
}
|
275
|
+
|
276
|
+
//miss left
|
277
|
+
if (t.offset().left - this.outerWidth() <= 0) {
|
278
|
+
p.missLeft = true;
|
279
|
+
p.missRight = false;
|
280
|
+
}
|
281
|
+
}
|
219
282
|
|
220
283
|
return p;
|
221
284
|
},
|
285
|
+
|
222
286
|
top: function (t, s) {
|
223
287
|
var self = Foundation.libs.dropdown,
|
224
288
|
p = self.dirs._base.call(this, t);
|
225
289
|
|
226
290
|
this.addClass('drop-top');
|
291
|
+
|
292
|
+
if (p.missTop == true) {
|
293
|
+
p.top = p.top + t.outerHeight() + this.outerHeight();
|
294
|
+
this.removeClass('drop-top');
|
295
|
+
}
|
296
|
+
|
297
|
+
if (p.missRight == true) {
|
298
|
+
p.left = p.left - this.outerWidth() + t.outerWidth();
|
299
|
+
}
|
227
300
|
|
228
301
|
if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
|
229
302
|
self.adjust_pip(this,t,s,p);
|
@@ -236,10 +309,15 @@
|
|
236
309
|
|
237
310
|
return {left: p.left, top: p.top - this.outerHeight()};
|
238
311
|
},
|
312
|
+
|
239
313
|
bottom: function (t,s) {
|
240
314
|
var self = Foundation.libs.dropdown,
|
241
315
|
p = self.dirs._base.call(this, t);
|
242
316
|
|
317
|
+
if (p.missRight == true) {
|
318
|
+
p.left = p.left - this.outerWidth() + t.outerWidth();
|
319
|
+
}
|
320
|
+
|
243
321
|
if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
|
244
322
|
self.adjust_pip(this,t,s,p);
|
245
323
|
}
|
@@ -250,17 +328,39 @@
|
|
250
328
|
|
251
329
|
return {left: p.left, top: p.top + t.outerHeight()};
|
252
330
|
},
|
331
|
+
|
253
332
|
left: function (t, s) {
|
254
333
|
var p = Foundation.libs.dropdown.dirs._base.call(this, t);
|
255
334
|
|
256
335
|
this.addClass('drop-left');
|
336
|
+
|
337
|
+
if (p.missLeft == true) {
|
338
|
+
p.left = p.left + this.outerWidth();
|
339
|
+
p.top = p.top + t.outerHeight();
|
340
|
+
this.removeClass('drop-left');
|
341
|
+
}
|
257
342
|
|
258
343
|
return {left: p.left - this.outerWidth(), top: p.top};
|
259
344
|
},
|
345
|
+
|
260
346
|
right: function (t, s) {
|
261
347
|
var p = Foundation.libs.dropdown.dirs._base.call(this, t);
|
262
348
|
|
263
349
|
this.addClass('drop-right');
|
350
|
+
|
351
|
+
if (p.missRight == true) {
|
352
|
+
p.left = p.left - this.outerWidth();
|
353
|
+
p.top = p.top + t.outerHeight();
|
354
|
+
this.removeClass('drop-right');
|
355
|
+
} else {
|
356
|
+
p.triggeredRight = true;
|
357
|
+
}
|
358
|
+
|
359
|
+
var self = Foundation.libs.dropdown;
|
360
|
+
|
361
|
+
if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
|
362
|
+
self.adjust_pip(this,t,s,p);
|
363
|
+
}
|
264
364
|
|
265
365
|
return {left: p.left + t.outerWidth(), top: p.top};
|
266
366
|
}
|
@@ -280,10 +380,27 @@
|
|
280
380
|
|
281
381
|
this.rule_idx = sheet.cssRules.length;
|
282
382
|
|
383
|
+
//default
|
283
384
|
var sel_before = '.f-dropdown.open:before',
|
284
385
|
sel_after = '.f-dropdown.open:after',
|
285
386
|
css_before = 'left: ' + pip_offset_base + 'px;',
|
286
387
|
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
|
388
|
+
|
389
|
+
if (position.missRight == true) {
|
390
|
+
pip_offset_base = dropdown.outerWidth() - 23;
|
391
|
+
sel_before = '.f-dropdown.open:before',
|
392
|
+
sel_after = '.f-dropdown.open:after',
|
393
|
+
css_before = 'left: ' + pip_offset_base + 'px;',
|
394
|
+
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
|
395
|
+
}
|
396
|
+
|
397
|
+
//just a case where right is fired, but its not missing right
|
398
|
+
if (position.triggeredRight == true) {
|
399
|
+
sel_before = '.f-dropdown.open:before',
|
400
|
+
sel_after = '.f-dropdown.open:after',
|
401
|
+
css_before = 'left:-12px;',
|
402
|
+
css_after = 'left:-14px;';
|
403
|
+
}
|
287
404
|
|
288
405
|
if (sheet.insertRule) {
|
289
406
|
sheet.insertRule([sel_before, '{', css_before, '}'].join(' '), this.rule_idx);
|
@@ -298,7 +415,7 @@
|
|
298
415
|
clear_idx : function () {
|
299
416
|
var sheet = Foundation.stylesheet;
|
300
417
|
|
301
|
-
if (this.rule_idx) {
|
418
|
+
if (typeof this.rule_idx !== 'undefined') {
|
302
419
|
sheet.deleteRule(this.rule_idx);
|
303
420
|
sheet.deleteRule(this.rule_idx);
|
304
421
|
delete this.rule_idx;
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.interchange = {
|
5
5
|
name : 'interchange',
|
6
6
|
|
7
|
-
version : '5.
|
7
|
+
version : '5.5.0',
|
8
8
|
|
9
9
|
cache : {},
|
10
10
|
|
@@ -15,15 +15,19 @@
|
|
15
15
|
load_attr : 'interchange',
|
16
16
|
|
17
17
|
named_queries : {
|
18
|
-
'default'
|
19
|
-
small
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
'default' : 'only screen',
|
19
|
+
'small' : Foundation.media_queries['small'],
|
20
|
+
'small-only' : Foundation.media_queries['small-only'],
|
21
|
+
'medium' : Foundation.media_queries['medium'],
|
22
|
+
'medium-only' : Foundation.media_queries['medium-only'],
|
23
|
+
'large' : Foundation.media_queries['large'],
|
24
|
+
'large-only' : Foundation.media_queries['large-only'],
|
25
|
+
'xlarge' : Foundation.media_queries['xlarge'],
|
26
|
+
'xlarge-only' : Foundation.media_queries['xlarge-only'],
|
27
|
+
'xxlarge' : Foundation.media_queries['xxlarge'],
|
28
|
+
'landscape' : 'only screen and (orientation: landscape)',
|
29
|
+
'portrait' : 'only screen and (orientation: portrait)',
|
30
|
+
'retina' : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
|
27
31
|
'only screen and (min--moz-device-pixel-ratio: 2),' +
|
28
32
|
'only screen and (-o-min-device-pixel-ratio: 2/1),' +
|
29
33
|
'only screen and (min-device-pixel-ratio: 2),' +
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Foundation.libs.joyride = {
|
7
7
|
name : 'joyride',
|
8
8
|
|
9
|
-
version : '5.
|
9
|
+
version : '5.5.0',
|
10
10
|
|
11
11
|
defaults : {
|
12
12
|
expose : false, // turn on or off the expose feature
|
@@ -111,8 +111,10 @@
|
|
111
111
|
this.end(this.settings.abort_on_close);
|
112
112
|
}.bind(this))
|
113
113
|
|
114
|
-
.on(
|
115
|
-
if
|
114
|
+
.on('keyup.fndtn.joyride', function(e) {
|
115
|
+
// Don't do anything if keystrokes are disabled
|
116
|
+
// or if the joyride is not being shown
|
117
|
+
if (!this.settings.keyboard || !this.settings.riding) return;
|
116
118
|
|
117
119
|
switch (e.which) {
|
118
120
|
case 39: // right arrow
|
@@ -317,8 +319,14 @@
|
|
317
319
|
|
318
320
|
this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
|
319
321
|
|
320
|
-
// scroll if not modal
|
322
|
+
// scroll and hide bg if not modal
|
321
323
|
if (!/body/i.test(this.settings.$target.selector)) {
|
324
|
+
var joyridemodalbg = $('.joyride-modal-bg');
|
325
|
+
if (/pop/i.test(this.settings.tipAnimation)) {
|
326
|
+
joyridemodalbg.hide();
|
327
|
+
} else {
|
328
|
+
joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);
|
329
|
+
}
|
322
330
|
this.scroll_to();
|
323
331
|
}
|
324
332
|
|
@@ -376,7 +384,7 @@
|
|
376
384
|
// skip non-existant targets
|
377
385
|
} else if (this.settings.$li && this.settings.$target.length < 1) {
|
378
386
|
|
379
|
-
this.show();
|
387
|
+
this.show(init, is_prev);
|
380
388
|
|
381
389
|
} else {
|
382
390
|
|
@@ -432,7 +440,7 @@
|
|
432
440
|
},
|
433
441
|
|
434
442
|
set_next_tip : function () {
|
435
|
-
this.settings.$next_tip = $(
|
443
|
+
this.settings.$next_tip = $('.joyride-tip-guide').eq(this.settings.$li.index());
|
436
444
|
this.settings.$next_tip.data('closed', '');
|
437
445
|
},
|
438
446
|
|
@@ -488,8 +496,8 @@
|
|
488
496
|
}
|
489
497
|
|
490
498
|
if (!/body/i.test(this.settings.$target.selector)) {
|
491
|
-
|
492
|
-
|
499
|
+
var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
|
500
|
+
leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
|
493
501
|
|
494
502
|
if (this.bottom()) {
|
495
503
|
if (this.rtl) {
|
@@ -616,7 +624,8 @@
|
|
616
624
|
if (!this.settings.$next_tip.data('closed')) {
|
617
625
|
var joyridemodalbg = $('.joyride-modal-bg');
|
618
626
|
if (joyridemodalbg.length < 1) {
|
619
|
-
$(
|
627
|
+
var joyridemodalbg = $(this.settings.template.modal);
|
628
|
+
joyridemodalbg.appendTo('body');
|
620
629
|
}
|
621
630
|
|
622
631
|
if (/pop/i.test(this.settings.tip_animation)) {
|