foundation-rails 5.2.2.0 → 5.2.3.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/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/vendor/assets/javascripts/foundation/foundation.abide.js +5 -5
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +13 -8
- data/vendor/assets/javascripts/foundation/foundation.alert.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +36 -33
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +15 -10
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +12 -6
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +3 -3
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +9 -15
- data/vendor/assets/javascripts/foundation/foundation.js +30 -28
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +36 -31
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +72 -14
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +19 -15
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +26 -16
- data/vendor/assets/javascripts/foundation/foundation.slider.js +2 -3
- data/vendor/assets/javascripts/foundation/foundation.tab.js +8 -9
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +30 -4
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +22 -19
- data/vendor/assets/stylesheets/foundation/_settings.scss +50 -40
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +8 -7
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +8 -8
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +6 -6
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +7 -5
- data/vendor/assets/stylesheets/foundation/components/_global.scss +67 -3
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +1 -2
- data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +2 -1
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +3 -3
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +32 -58
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +39 -31
- data/vendor/assets/stylesheets/foundation/components/_pagination.scss +5 -5
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +4 -5
- data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +5 -5
- data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +26 -4
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +7 -7
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_switch.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +44 -12
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +9 -5
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +4 -4
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +30 -26
- data/vendor/assets/stylesheets/foundation/components/_type.scss +39 -21
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +64 -1
- data/vendor/assets/stylesheets/normalize.scss +20 -18
- metadata +2 -2
@@ -6,7 +6,7 @@
|
|
6
6
|
Foundation.libs.joyride = {
|
7
7
|
name : 'joyride',
|
8
8
|
|
9
|
-
version : '5.2.
|
9
|
+
version : '5.2.3',
|
10
10
|
|
11
11
|
defaults : {
|
12
12
|
expose : false, // turn on or off the expose feature
|
@@ -105,7 +105,7 @@
|
|
105
105
|
if (self.is_phone()) {
|
106
106
|
self.pos_phone();
|
107
107
|
} else {
|
108
|
-
self.pos_default(false
|
108
|
+
self.pos_default(false);
|
109
109
|
}
|
110
110
|
}
|
111
111
|
}, 100));
|
@@ -140,7 +140,7 @@
|
|
140
140
|
if (!this.settings.cookie_monster || this.settings.cookie_monster && !$.cookie(this.settings.cookie_name)) {
|
141
141
|
this.settings.$tip_content.each(function (index) {
|
142
142
|
var $this = $(this);
|
143
|
-
this.settings = $.extend({}, self.defaults, self.data_options($this))
|
143
|
+
this.settings = $.extend({}, self.defaults, self.data_options($this));
|
144
144
|
|
145
145
|
// Make sure that settings parsed from data_options are integers where necessary
|
146
146
|
var i = int_settings_count;
|
@@ -302,7 +302,7 @@
|
|
302
302
|
$timer.animate({
|
303
303
|
width: $timer.parent().width()
|
304
304
|
}, this.settings.timer, 'linear');
|
305
|
-
}.bind(this), this.settings.
|
305
|
+
}.bind(this), this.settings.tip_animation_fade_speed);
|
306
306
|
|
307
307
|
} else {
|
308
308
|
this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);
|
@@ -394,7 +394,7 @@
|
|
394
394
|
tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight());
|
395
395
|
|
396
396
|
if (tipOffset != 0) {
|
397
|
-
$('html, body').animate({
|
397
|
+
$('html, body').stop().animate({
|
398
398
|
scrollTop: tipOffset
|
399
399
|
}, this.settings.scroll_speed, 'swing');
|
400
400
|
}
|
@@ -410,10 +410,8 @@
|
|
410
410
|
this.show('init');
|
411
411
|
},
|
412
412
|
|
413
|
-
pos_default : function (init
|
414
|
-
var
|
415
|
-
tip_position = this.settings.$next_tip.offset(),
|
416
|
-
$nub = this.settings.$next_tip.find('.joyride-nub'),
|
413
|
+
pos_default : function (init) {
|
414
|
+
var $nub = this.settings.$next_tip.find('.joyride-nub'),
|
417
415
|
nub_width = Math.ceil($nub.outerWidth() / 2),
|
418
416
|
nub_height = Math.ceil($nub.outerHeight() / 2),
|
419
417
|
toggle = init || false;
|
@@ -424,10 +422,6 @@
|
|
424
422
|
this.settings.$next_tip.show();
|
425
423
|
}
|
426
424
|
|
427
|
-
if (typeof resizing === 'undefined') {
|
428
|
-
resizing = false;
|
429
|
-
}
|
430
|
-
|
431
425
|
if (!/body/i.test(this.settings.$target.selector)) {
|
432
426
|
if (this.bottom()) {
|
433
427
|
if (this.rtl) {
|
@@ -827,7 +821,7 @@
|
|
827
821
|
$('.joyride-modal-bg').hide();
|
828
822
|
this.settings.$current_tip.hide();
|
829
823
|
|
830
|
-
if (typeof abort === 'undefined') {
|
824
|
+
if (typeof abort === 'undefined' || abort === false) {
|
831
825
|
this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
|
832
826
|
this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
|
833
827
|
}
|
@@ -846,4 +840,4 @@
|
|
846
840
|
|
847
841
|
reflow : function () {}
|
848
842
|
};
|
849
|
-
}(jQuery,
|
843
|
+
}(jQuery, window, window.document));
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
while (i--) {
|
17
17
|
if(head.has('.' + class_array[i]).length === 0) {
|
18
|
-
|
18
|
+
head.append('<meta class="' + class_array[i] + '" />');
|
19
19
|
}
|
20
20
|
}
|
21
21
|
};
|
@@ -149,7 +149,7 @@
|
|
149
149
|
bindLoad.call(image);
|
150
150
|
}
|
151
151
|
};
|
152
|
-
|
152
|
+
|
153
153
|
/*
|
154
154
|
https://github.com/paulirish/matchMedia.js
|
155
155
|
*/
|
@@ -213,14 +213,14 @@
|
|
213
213
|
for (; lastTime < vendors.length && !requestAnimationFrame; lastTime++) {
|
214
214
|
requestAnimationFrame = window[ vendors[lastTime] + "RequestAnimationFrame" ];
|
215
215
|
cancelAnimationFrame = cancelAnimationFrame ||
|
216
|
-
window[ vendors[lastTime] + "CancelAnimationFrame" ] ||
|
216
|
+
window[ vendors[lastTime] + "CancelAnimationFrame" ] ||
|
217
217
|
window[ vendors[lastTime] + "CancelRequestAnimationFrame" ];
|
218
218
|
}
|
219
219
|
|
220
220
|
function raf() {
|
221
221
|
if (animating) {
|
222
222
|
requestAnimationFrame(raf);
|
223
|
-
|
223
|
+
|
224
224
|
if (jqueryFxAvailable) {
|
225
225
|
jQuery.fx.tick();
|
226
226
|
}
|
@@ -231,7 +231,7 @@
|
|
231
231
|
// use rAF
|
232
232
|
window.requestAnimationFrame = requestAnimationFrame;
|
233
233
|
window.cancelAnimationFrame = cancelAnimationFrame;
|
234
|
-
|
234
|
+
|
235
235
|
if (jqueryFxAvailable) {
|
236
236
|
jQuery.fx.timer = function (timer) {
|
237
237
|
if (timer() && jQuery.timers.push(timer) && !animating) {
|
@@ -276,7 +276,7 @@
|
|
276
276
|
window.Foundation = {
|
277
277
|
name : 'Foundation',
|
278
278
|
|
279
|
-
version : '5.2.
|
279
|
+
version : '5.2.3',
|
280
280
|
|
281
281
|
media_queries : {
|
282
282
|
small : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
@@ -366,18 +366,18 @@
|
|
366
366
|
// Don't bother reading the namespace out of the meta tag
|
367
367
|
// if the namespace has been set globally in javascript
|
368
368
|
//
|
369
|
-
// Example:
|
369
|
+
// Example:
|
370
370
|
// Foundation.global.namespace = 'my-namespace';
|
371
371
|
// or make it an empty string:
|
372
372
|
// Foundation.global.namespace = '';
|
373
373
|
//
|
374
374
|
//
|
375
375
|
|
376
|
-
// If the namespace has not been set (is undefined), try to read it out of the meta element.
|
376
|
+
// If the namespace has not been set (is undefined), try to read it out of the meta element.
|
377
377
|
// Otherwise use the globally defined namespace, even if it's empty ('')
|
378
378
|
var namespace = ( this.global.namespace === undefined ) ? $('.foundation-data-attribute-namespace').css('font-family') : this.global.namespace;
|
379
|
-
|
380
|
-
// Finally, if the namsepace is either undefined or false, set it to an empty string.
|
379
|
+
|
380
|
+
// Finally, if the namsepace is either undefined or false, set it to an empty string.
|
381
381
|
// Otherwise use the namespace value.
|
382
382
|
this.global.namespace = ( namespace === undefined || /false/i.test(namespace) ) ? '' : namespace;
|
383
383
|
},
|
@@ -388,23 +388,23 @@
|
|
388
388
|
utils : {
|
389
389
|
|
390
390
|
// Description:
|
391
|
-
// Fast Selector wrapper returns jQuery object. Only use where getElementById
|
391
|
+
// Fast Selector wrapper returns jQuery object. Only use where getElementById
|
392
392
|
// is not available.
|
393
393
|
//
|
394
394
|
// Arguments:
|
395
|
-
// Selector (String): CSS selector describing the element(s) to be
|
395
|
+
// Selector (String): CSS selector describing the element(s) to be
|
396
396
|
// returned as a jQuery object.
|
397
397
|
//
|
398
|
-
// Scope (String): CSS selector describing the area to be searched. Default
|
398
|
+
// Scope (String): CSS selector describing the area to be searched. Default
|
399
399
|
// is document.
|
400
400
|
//
|
401
401
|
// Returns:
|
402
|
-
// Element (jQuery Object): jQuery object containing elements matching the
|
402
|
+
// Element (jQuery Object): jQuery object containing elements matching the
|
403
403
|
// selector within the scope.
|
404
404
|
S : S,
|
405
405
|
|
406
406
|
// Description:
|
407
|
-
// Executes a function a max of once every n milliseconds
|
407
|
+
// Executes a function a max of once every n milliseconds
|
408
408
|
//
|
409
409
|
// Arguments:
|
410
410
|
// Func (Function): Function to be throttled.
|
@@ -436,8 +436,8 @@
|
|
436
436
|
// Func (Function): Function to be debounced.
|
437
437
|
//
|
438
438
|
// Delay (Integer): Function execution threshold in milliseconds.
|
439
|
-
//
|
440
|
-
// Immediate (Bool): Whether the function should be called at the beginning
|
439
|
+
//
|
440
|
+
// Immediate (Bool): Whether the function should be called at the beginning
|
441
441
|
// of the delay instead of the end. Default is false.
|
442
442
|
//
|
443
443
|
// Returns:
|
@@ -465,18 +465,19 @@
|
|
465
465
|
// El (jQuery Object): Element to be parsed.
|
466
466
|
//
|
467
467
|
// Returns:
|
468
|
-
// Options (Javascript Object): Contents of the element's data-options
|
468
|
+
// Options (Javascript Object): Contents of the element's data-options
|
469
469
|
// attribute.
|
470
|
-
data_options : function (el) {
|
470
|
+
data_options : function (el, data_attr_name) {
|
471
|
+
data_attr_name = data_attr_name || 'options';
|
471
472
|
var opts = {}, ii, p, opts_arr,
|
472
473
|
data_options = function (el) {
|
473
474
|
var namespace = Foundation.global.namespace;
|
474
475
|
|
475
476
|
if (namespace.length > 0) {
|
476
|
-
return el.data(namespace + '-
|
477
|
+
return el.data(namespace + '-' + data_attr_name);
|
477
478
|
}
|
478
479
|
|
479
|
-
return el.data(
|
480
|
+
return el.data(data_attr_name);
|
480
481
|
};
|
481
482
|
|
482
483
|
var cached_options = data_options(el);
|
@@ -499,6 +500,7 @@
|
|
499
500
|
|
500
501
|
while (ii--) {
|
501
502
|
p = opts_arr[ii].split(':');
|
503
|
+
p = [p[0], p.slice(1).join(':')];
|
502
504
|
|
503
505
|
if (/true/i.test(p[1])) p[1] = true;
|
504
506
|
if (/false/i.test(p[1])) p[1] = false;
|
@@ -522,7 +524,7 @@
|
|
522
524
|
// Adds JS-recognizable media queries
|
523
525
|
//
|
524
526
|
// Arguments:
|
525
|
-
// Media (String): Key string for the media query to be stored as in
|
527
|
+
// Media (String): Key string for the media query to be stored as in
|
526
528
|
// Foundation.media_queries
|
527
529
|
//
|
528
530
|
// Class (String): Class name for the generated <meta> tag
|
@@ -539,16 +541,16 @@
|
|
539
541
|
// Arguments:
|
540
542
|
// Rule (String): CSS rule to be appended to the document.
|
541
543
|
//
|
542
|
-
// Media (String): Optional media query string for the CSS rule to be
|
544
|
+
// Media (String): Optional media query string for the CSS rule to be
|
543
545
|
// nested under.
|
544
546
|
add_custom_rule : function (rule, media) {
|
545
|
-
if (media === undefined) {
|
547
|
+
if (media === undefined && Foundation.stylesheet) {
|
546
548
|
Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length);
|
547
549
|
} else {
|
548
550
|
var query = Foundation.media_queries[media];
|
549
551
|
|
550
552
|
if (query !== undefined) {
|
551
|
-
Foundation.stylesheet.insertRule('@media ' +
|
553
|
+
Foundation.stylesheet.insertRule('@media ' +
|
552
554
|
Foundation.media_queries[media] + '{ ' + rule + ' }');
|
553
555
|
}
|
554
556
|
}
|
@@ -560,7 +562,7 @@
|
|
560
562
|
// Arguments:
|
561
563
|
// Image (jQuery Object): Image(s) to check if loaded.
|
562
564
|
//
|
563
|
-
// Callback (Function):
|
565
|
+
// Callback (Function): Function to execute when image is fully loaded.
|
564
566
|
image_loaded : function (images, callback) {
|
565
567
|
var self = this,
|
566
568
|
unloaded = images.length;
|
@@ -583,7 +585,7 @@
|
|
583
585
|
// Returns a random, alphanumeric string
|
584
586
|
//
|
585
587
|
// Arguments:
|
586
|
-
// Length (Integer): Length of string to be generated. Defaults to random
|
588
|
+
// Length (Integer): Length of string to be generated. Defaults to random
|
587
589
|
// integer.
|
588
590
|
//
|
589
591
|
// Returns:
|
@@ -606,4 +608,4 @@
|
|
606
608
|
});
|
607
609
|
};
|
608
610
|
|
609
|
-
}(jQuery,
|
611
|
+
}(jQuery, window, window.document));
|
@@ -4,13 +4,14 @@
|
|
4
4
|
Foundation.libs['magellan-expedition'] = {
|
5
5
|
name : 'magellan-expedition',
|
6
6
|
|
7
|
-
version : '5.2.
|
7
|
+
version : '5.2.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
active_class: 'active',
|
11
11
|
threshold: 0, // pixels from the top of the expedition for it to become fixes
|
12
12
|
destination_threshold: 20, // pixels from the top of destination for it to be considered active
|
13
|
-
throttle_delay: 30 // calculation throttling to increase framerate
|
13
|
+
throttle_delay: 30, // calculation throttling to increase framerate
|
14
|
+
fixed_top: 0 // top distance in pixels assigend to the fixed element on scroll
|
14
15
|
},
|
15
16
|
|
16
17
|
init : function (scope, method, options) {
|
@@ -29,31 +30,35 @@
|
|
29
30
|
S(self.scope)
|
30
31
|
.off('.magellan')
|
31
32
|
.on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href^="#"]', function (e) {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
33
|
+
e.preventDefault();
|
34
|
+
var expedition = $(this).closest('[' + self.attr_name() + ']'),
|
35
|
+
settings = expedition.data('magellan-expedition-init'),
|
36
|
+
hash = this.hash.split('#').join(''),
|
37
|
+
target = $("a[name='"+hash+"']");
|
38
|
+
|
39
|
+
if (target.length === 0) {
|
40
|
+
target = $('#'+hash);
|
41
|
+
}
|
42
|
+
|
43
|
+
// Account for expedition height if fixed position
|
44
|
+
var scroll_top = target.offset().top;
|
45
|
+
scroll_top = scroll_top - expedition.outerHeight();
|
46
|
+
|
47
|
+
$('html, body').stop().animate({
|
48
|
+
'scrollTop': scroll_top
|
49
|
+
}, 700, 'swing', function () {
|
50
|
+
if(history.pushState) {
|
51
|
+
history.pushState(null, null, '#'+hash);
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
location.hash = '#'+hash;
|
55
|
+
}
|
56
|
+
});
|
54
57
|
})
|
55
|
-
.on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay))
|
56
|
-
|
58
|
+
.on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay));
|
59
|
+
|
60
|
+
$(window)
|
61
|
+
.on('resize.fndtn.magellan', self.throttle(this.set_expedition_position.bind(this), settings.throttle_delay));
|
57
62
|
},
|
58
63
|
|
59
64
|
check_for_arrivals : function() {
|
@@ -70,7 +75,7 @@
|
|
70
75
|
top_offset;
|
71
76
|
|
72
77
|
expedition.attr('style', '');
|
73
|
-
top_offset = expedition.offset().top;
|
78
|
+
top_offset = expedition.offset().top + self.settings.threshold;
|
74
79
|
|
75
80
|
expedition.data(self.data_attr('magellan-top-offset'), top_offset);
|
76
81
|
expedition.attr('style', styles);
|
@@ -95,10 +100,10 @@
|
|
95
100
|
placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');
|
96
101
|
expedition.before(placeholder);
|
97
102
|
}
|
98
|
-
expedition.css({position:'fixed', top:
|
103
|
+
expedition.css({position:'fixed', top: self.settings.fixed_top});
|
99
104
|
} else {
|
100
105
|
expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
|
101
|
-
expedition.attr('style','');
|
106
|
+
expedition.attr('style','').removeClass('fixed');
|
102
107
|
}
|
103
108
|
});
|
104
109
|
},
|
@@ -109,7 +114,7 @@
|
|
109
114
|
|
110
115
|
$('[' + this.attr_name() + ']', self.scope).each(function() {
|
111
116
|
var expedition = $(this),
|
112
|
-
settings =
|
117
|
+
settings = expedition.data(self.attr_name(true) + '-init'),
|
113
118
|
offsets = self.offsets(expedition, window_top_offset),
|
114
119
|
arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
|
115
120
|
active_item = false;
|
@@ -170,4 +175,4 @@
|
|
170
175
|
$('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
|
171
176
|
}
|
172
177
|
};
|
173
|
-
}(jQuery,
|
178
|
+
}(jQuery, window, window.document));
|
@@ -4,47 +4,105 @@
|
|
4
4
|
Foundation.libs.offcanvas = {
|
5
5
|
name : 'offcanvas',
|
6
6
|
|
7
|
-
version : '5.2.
|
7
|
+
version : '5.2.3',
|
8
8
|
|
9
|
-
settings : {
|
9
|
+
settings : {
|
10
|
+
open_method: 'move',
|
11
|
+
close_on_click: true
|
12
|
+
},
|
10
13
|
|
11
14
|
init : function (scope, method, options) {
|
12
|
-
this.
|
15
|
+
this.bindings(method, options);
|
13
16
|
},
|
14
17
|
|
15
18
|
events : function () {
|
16
19
|
var self = this,
|
17
|
-
S = self.S
|
20
|
+
S = self.S,
|
21
|
+
move_class = '',
|
22
|
+
right_postfix = '',
|
23
|
+
left_postfix = '';
|
24
|
+
|
25
|
+
if (this.settings.open_method === 'move') {
|
26
|
+
move_class = 'move-';
|
27
|
+
right_postfix = 'right';
|
28
|
+
left_postfix = 'left';
|
29
|
+
} else if (this.settings.open_method === 'overlap') {
|
30
|
+
move_class = 'offcanvas-overlap';
|
31
|
+
}
|
18
32
|
|
19
33
|
S(this.scope).off('.offcanvas')
|
20
34
|
.on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
|
21
|
-
self.click_toggle_class(e,
|
35
|
+
self.click_toggle_class(e, move_class + right_postfix);
|
22
36
|
})
|
23
37
|
.on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
|
24
|
-
|
38
|
+
var settings = self.get_settings(e);
|
39
|
+
if (settings.close_on_click) {
|
40
|
+
self.hide.call(self, move_class + right_postfix, self.get_wrapper(e));
|
41
|
+
}
|
25
42
|
})
|
26
43
|
.on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
|
27
|
-
self.click_toggle_class(e,
|
44
|
+
self.click_toggle_class(e, move_class + left_postfix);
|
28
45
|
})
|
29
46
|
.on('click.fndtn.offcanvas', '.right-off-canvas-menu a', function (e) {
|
30
|
-
|
47
|
+
var settings = self.get_settings(e);
|
48
|
+
if (settings.close_on_click) {
|
49
|
+
self.hide.call(self, move_class + left_postfix, self.get_wrapper(e));
|
50
|
+
}
|
31
51
|
})
|
32
52
|
.on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
|
33
|
-
self.click_remove_class(e,
|
34
|
-
self.click_remove_class(e,
|
35
|
-
})
|
53
|
+
self.click_remove_class(e, move_class + left_postfix);
|
54
|
+
if (right_postfix) self.click_remove_class(e, move_class + right_postfix);
|
55
|
+
});
|
56
|
+
|
57
|
+
},
|
58
|
+
|
59
|
+
toggle: function(class_name, $off_canvas) {
|
60
|
+
$off_canvas = $off_canvas || this.get_wrapper();
|
61
|
+
if ($off_canvas.is('.' + class_name)) {
|
62
|
+
this.hide(class_name, $off_canvas);
|
63
|
+
} else {
|
64
|
+
this.show(class_name, $off_canvas);
|
65
|
+
}
|
66
|
+
},
|
67
|
+
|
68
|
+
show: function(class_name, $off_canvas) {
|
69
|
+
$off_canvas = $off_canvas || this.get_wrapper();
|
70
|
+
$off_canvas.trigger('open');
|
71
|
+
$off_canvas.addClass(class_name);
|
72
|
+
},
|
73
|
+
|
74
|
+
hide: function(class_name, $off_canvas) {
|
75
|
+
$off_canvas = $off_canvas || this.get_wrapper();
|
76
|
+
$off_canvas.trigger('close');
|
77
|
+
$off_canvas.removeClass(class_name);
|
36
78
|
},
|
37
79
|
|
38
80
|
click_toggle_class: function(e, class_name) {
|
39
81
|
e.preventDefault();
|
40
|
-
this.
|
82
|
+
var $off_canvas = this.get_wrapper(e);
|
83
|
+
this.toggle(class_name, $off_canvas);
|
41
84
|
},
|
42
85
|
|
43
86
|
click_remove_class: function(e, class_name) {
|
44
87
|
e.preventDefault();
|
45
|
-
this.
|
88
|
+
var $off_canvas = this.get_wrapper(e);
|
89
|
+
this.hide(class_name, $off_canvas);
|
90
|
+
},
|
91
|
+
|
92
|
+
get_settings: function(e) {
|
93
|
+
var offcanvas = this.S(e.target).closest('[' + this.attr_name() + ']');
|
94
|
+
return offcanvas.data(this.attr_name(true) + '-init') || this.settings;
|
95
|
+
},
|
96
|
+
|
97
|
+
get_wrapper: function(e) {
|
98
|
+
var $off_canvas = this.S(e ? e.target : this.scope).closest('.off-canvas-wrap');
|
99
|
+
|
100
|
+
if ($off_canvas.length === 0) {
|
101
|
+
$off_canvas = this.S('.off-canvas-wrap');
|
102
|
+
}
|
103
|
+
return $off_canvas;
|
46
104
|
},
|
47
105
|
|
48
106
|
reflow : function () {}
|
49
107
|
};
|
50
|
-
}(jQuery,
|
108
|
+
}(jQuery, window, window.document));
|