jquery-slick-rails 1.5.8.2 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/jquery.slick.js +46 -32
- data/lib/jquery-slick-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 386aa5168d6fc9c4e44fb1cde1a0a4afd57ab40e
|
4
|
+
data.tar.gz: f4930b9e0f2dbba5bd5f48d76da5dd3db3b61204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bb38664d174a24cc8e39da89c10e67f4877476998e4d55724d21406d3a928166f56a9e9b0a1343c7ed4f5d24a85505d3a4f6eaf929c8a2b2d2886bb25fad59f
|
7
|
+
data.tar.gz: 056464c8b55cbc86e134dce735fc527fa7d3f6663ce4bd37649f95ccbe95a95986f63d998bec12f7b87d7714cefe709b19118a31c758e28b12eb7d66e59fbd98
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|___/_|_|\___|_|\_(_)/ |___/
|
7
7
|
|__/
|
8
8
|
|
9
|
-
Version: 1.5.
|
9
|
+
Version: 1.5.9
|
10
10
|
Author: Ken Wheeler
|
11
11
|
Website: http://kenwheeler.github.io
|
12
12
|
Docs: http://kenwheeler.github.io/slick
|
@@ -81,6 +81,7 @@
|
|
81
81
|
touchMove: true,
|
82
82
|
touchThreshold: 5,
|
83
83
|
useCSS: true,
|
84
|
+
useTransform: false,
|
84
85
|
variableWidth: false,
|
85
86
|
vertical: false,
|
86
87
|
verticalSwiping: false,
|
@@ -500,8 +501,6 @@
|
|
500
501
|
.data('originalStyling', $(element).attr('style') || '');
|
501
502
|
});
|
502
503
|
|
503
|
-
_.$slidesCache = _.$slides;
|
504
|
-
|
505
504
|
_.$slider.addClass('slick-slider');
|
506
505
|
|
507
506
|
_.$slideTrack = (_.slideCount === 0) ?
|
@@ -967,6 +966,8 @@
|
|
967
966
|
|
968
967
|
if (filter !== null) {
|
969
968
|
|
969
|
+
_.$slidesCache = _.$slides;
|
970
|
+
|
970
971
|
_.unload();
|
971
972
|
|
972
973
|
_.$slideTrack.children(this.options.slide).detach();
|
@@ -997,7 +998,7 @@
|
|
997
998
|
if (_.options.infinite === true) {
|
998
999
|
while (breakPoint < _.slideCount) {
|
999
1000
|
++pagerQty;
|
1000
|
-
breakPoint = counter + _.options.
|
1001
|
+
breakPoint = counter + _.options.slidesToScroll;
|
1001
1002
|
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
1002
1003
|
}
|
1003
1004
|
} else if (_.options.centerMode === true) {
|
@@ -1005,7 +1006,7 @@
|
|
1005
1006
|
} else {
|
1006
1007
|
while (breakPoint < _.slideCount) {
|
1007
1008
|
++pagerQty;
|
1008
|
-
breakPoint = counter + _.options.
|
1009
|
+
breakPoint = counter + _.options.slidesToScroll;
|
1009
1010
|
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
1010
1011
|
}
|
1011
1012
|
}
|
@@ -1074,15 +1075,33 @@
|
|
1074
1075
|
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
|
1075
1076
|
}
|
1076
1077
|
|
1077
|
-
|
1078
|
+
if (_.options.rtl === true) {
|
1079
|
+
if (targetSlide[0]) {
|
1080
|
+
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
|
1081
|
+
} else {
|
1082
|
+
targetLeft = 0;
|
1083
|
+
}
|
1084
|
+
} else {
|
1085
|
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
1086
|
+
}
|
1078
1087
|
|
1079
1088
|
if (_.options.centerMode === true) {
|
1080
|
-
if (_.options.infinite === false) {
|
1089
|
+
if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
|
1081
1090
|
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
|
1082
1091
|
} else {
|
1083
1092
|
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
|
1084
1093
|
}
|
1085
|
-
|
1094
|
+
|
1095
|
+
if (_.options.rtl === true) {
|
1096
|
+
if (targetSlide[0]) {
|
1097
|
+
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
|
1098
|
+
} else {
|
1099
|
+
targetLeft = 0;
|
1100
|
+
}
|
1101
|
+
} else {
|
1102
|
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
1103
|
+
}
|
1104
|
+
|
1086
1105
|
targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
|
1087
1106
|
}
|
1088
1107
|
}
|
@@ -1494,14 +1513,15 @@
|
|
1494
1513
|
|
1495
1514
|
if (imgCount > 0) {
|
1496
1515
|
targetImage = $('img[data-lazy]', _.$slider).first();
|
1516
|
+
targetImage.attr('src', null);
|
1497
1517
|
targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
|
1498
|
-
|
1499
|
-
|
1518
|
+
targetImage.removeAttr('data-lazy');
|
1519
|
+
_.progressiveLazyLoad();
|
1500
1520
|
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1521
|
+
if (_.options.adaptiveHeight === true) {
|
1522
|
+
_.setPosition();
|
1523
|
+
}
|
1524
|
+
})
|
1505
1525
|
.error(function() {
|
1506
1526
|
targetImage.removeAttr('data-lazy');
|
1507
1527
|
_.progressiveLazyLoad();
|
@@ -1906,8 +1926,7 @@
|
|
1906
1926
|
_.transformType = 'transform';
|
1907
1927
|
_.transitionType = 'transition';
|
1908
1928
|
}
|
1909
|
-
_.transformsEnabled = (_.animType !== null && _.animType !== false);
|
1910
|
-
|
1929
|
+
_.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
|
1911
1930
|
};
|
1912
1931
|
|
1913
1932
|
|
@@ -2586,13 +2605,13 @@
|
|
2586
2605
|
|
2587
2606
|
if (_.$dots !== null) {
|
2588
2607
|
_.$dots.attr('role', 'tablist').find('li').each(function(i) {
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2608
|
+
$(this).attr({
|
2609
|
+
'role': 'presentation',
|
2610
|
+
'aria-selected': 'false',
|
2611
|
+
'aria-controls': 'navigation' + _.instanceUid + i + '',
|
2612
|
+
'id': 'slick-slide' + _.instanceUid + i + ''
|
2613
|
+
});
|
2614
|
+
})
|
2596
2615
|
.first().attr('aria-selected', 'true').end()
|
2597
2616
|
.find('button').attr('role', 'button').end()
|
2598
2617
|
.closest('div').attr('role', 'toolbar');
|
@@ -2602,19 +2621,14 @@
|
|
2602
2621
|
};
|
2603
2622
|
|
2604
2623
|
Slick.prototype.activateADA = function() {
|
2605
|
-
var _ = this
|
2606
|
-
_isSlideOnFocus =_.$slider.find('*').is(':focus');
|
2607
|
-
// _isSlideOnFocus = _.$slides.is(':focus') || _.$slides.find('*').is(':focus');
|
2624
|
+
var _ = this;
|
2608
2625
|
|
2609
2626
|
_.$slideTrack.find('.slick-active').attr({
|
2610
|
-
'aria-hidden': 'false'
|
2611
|
-
'tabindex': '0'
|
2627
|
+
'aria-hidden': 'false'
|
2612
2628
|
}).find('a, input, button, select').attr({
|
2613
2629
|
'tabindex': '0'
|
2614
2630
|
});
|
2615
2631
|
|
2616
|
-
(_isSlideOnFocus) && _.$slideTrack.find('.slick-active').focus();
|
2617
|
-
|
2618
2632
|
};
|
2619
2633
|
|
2620
2634
|
Slick.prototype.focusHandler = function() {
|
@@ -2641,9 +2655,9 @@
|
|
2641
2655
|
opt = arguments[0],
|
2642
2656
|
args = Array.prototype.slice.call(arguments, 1),
|
2643
2657
|
l = _.length,
|
2644
|
-
i
|
2658
|
+
i,
|
2645
2659
|
ret;
|
2646
|
-
for (i; i < l; i++) {
|
2660
|
+
for (i = 0; i < l; i++) {
|
2647
2661
|
if (typeof opt == 'object' || typeof opt == 'undefined')
|
2648
2662
|
_[i].slick = new Slick(_[i], opt);
|
2649
2663
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-slick-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Bodrov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|