gent_styleguide 2.9.2 → 2.12.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.
- package/.codeclimate.yml +51 -14
- package/CHANGELOG.md +15 -1
- package/CONTRIBUTING.md +8 -1
- package/README.md +23 -6
- package/build/styleguide/js/base-min.js +68 -1
- package/build/styleguide/js/breadcrumbs.binding-min.js +13 -1
- package/build/styleguide/js/breadcrumbs.functions-min.js +131 -1
- package/build/styleguide/js/button-drop-min.js +38 -1
- package/build/styleguide/js/button-drop.binding-min.js +13 -1
- package/build/styleguide/js/button-drop.functions-min.js +48 -1
- package/build/styleguide/js/gallery.binding-min.js +12 -1
- package/build/styleguide/js/gallery.functions-min.js +29 -1
- package/build/styleguide/js/hamburger-menu.binding-min.js +17 -1
- package/build/styleguide/js/hamburger-menu.functions-min.js +166 -1
- package/build/styleguide/js/header.binding-min.js +18 -1
- package/build/styleguide/js/header.functions-min.js +73 -1
- package/build/styleguide/js/input-date.binding-min.js +8 -1
- package/build/styleguide/js/input-date.functions-min.js +27 -1
- package/build/styleguide/js/input-multiselect-chosen.binding-min.js +31 -1
- package/build/styleguide/js/input-multiselect-chosen.functions-min.js +24 -1
- package/build/styleguide/js/teaser-collection.binding-min.js +14 -1
- package/build/styleguide/sass/00-settings/_vars.scss +2 -3
- package/build/styleguide/sass/01-mixins/grid/_default_classes.scss +8 -6
- package/build/styleguide/sass/01-mixins/grid/_mixins.scss +22 -20
- package/build/styleguide/sass/11-base/forms/_forms.scss +3 -0
- package/build/styleguide/sass/11-base/grid/_grid.scss +2 -2
- package/build/styleguide/sass/21-atoms/fieldset/_fieldset.scss +1 -1
- package/build/styleguide/sass/21-atoms/inputs/input-multiselect-chosen/_input-multiselect-chosen.scss +1 -1
- package/build/styleguide/sass/21-atoms/tag/_tag.scss +0 -5
- package/build/styleguide/sass/31-molecules/building-blocks/breadcrumbs/_breadcrumbs.scss +33 -37
- package/build/styleguide/sass/31-molecules/building-blocks/hamburger-menu/_hamburger-menu.scss +1 -1
- package/build/styleguide/sass/31-molecules/status-message/_status-message.scss +1 -0
- package/build/styleguide/sass/41-organisms/header/_header.scss +2 -2
- package/build/styleguide/sass/main_cli.scss +12 -11
- package/nbproject/private/private.properties +1 -0
- package/nbproject/private/private.xml +8 -0
- package/nbproject/project.properties +5 -0
- package/nbproject/project.xml +9 -0
- package/package.json +7 -9
- package/.github/ISSUE_TEMPLATE.md +0 -32
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -30
- package/.mdl.style.rb +0 -9
- package/.mdlrc +0 -1
- package/.travis.yml +0 -27
- package/build/styleguide/vendor/chosen-js/README.md +0 -47
- package/build/styleguide/vendor/chosen-js/chosen-sprite.png +0 -0
- package/build/styleguide/vendor/chosen-js/chosen-sprite@2x.png +0 -0
- package/build/styleguide/vendor/chosen-js/chosen.css +0 -490
- package/build/styleguide/vendor/chosen-js/chosen.jquery.js +0 -1349
- package/build/styleguide/vendor/chosen-js/chosen.jquery.min.js +0 -3
- package/build/styleguide/vendor/chosen-js/chosen.min.css +0 -11
- package/build/styleguide/vendor/chosen-js/chosen.proto.js +0 -1389
- package/build/styleguide/vendor/chosen-js/chosen.proto.min.js +0 -3
- package/build/styleguide/vendor/jquery/AUTHORS.txt +0 -301
- package/build/styleguide/vendor/jquery/LICENSE.txt +0 -36
- package/build/styleguide/vendor/jquery/README.md +0 -67
- package/build/styleguide/vendor/jquery/dist/core.js +0 -476
- package/build/styleguide/vendor/jquery/dist/jquery.js +0 -10253
- package/build/styleguide/vendor/jquery/dist/jquery.min.js +0 -4
- package/build/styleguide/vendor/jquery/dist/jquery.min.map +0 -1
- package/build/styleguide/vendor/jquery/dist/jquery.slim.js +0 -8160
- package/build/styleguide/vendor/jquery/dist/jquery.slim.min.js +0 -4
- package/build/styleguide/vendor/jquery/dist/jquery.slim.min.map +0 -1
- package/build/styleguide/vendor/jquery/external/sizzle/LICENSE.txt +0 -36
- package/build/styleguide/vendor/jquery/external/sizzle/dist/sizzle.js +0 -2272
- package/build/styleguide/vendor/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- package/build/styleguide/vendor/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- package/build/styleguide/vendor/jquery/package.json +0 -97
- package/build/styleguide/vendor/jquery/src/.eslintrc.json +0 -5
- package/build/styleguide/vendor/jquery/src/ajax/jsonp.js +0 -102
- package/build/styleguide/vendor/jquery/src/ajax/load.js +0 -76
- package/build/styleguide/vendor/jquery/src/ajax/parseXML.js +0 -30
- package/build/styleguide/vendor/jquery/src/ajax/script.js +0 -77
- package/build/styleguide/vendor/jquery/src/ajax/var/location.js +0 -5
- package/build/styleguide/vendor/jquery/src/ajax/var/nonce.js +0 -7
- package/build/styleguide/vendor/jquery/src/ajax/var/rquery.js +0 -5
- package/build/styleguide/vendor/jquery/src/ajax/xhr.js +0 -169
- package/build/styleguide/vendor/jquery/src/ajax.js +0 -855
- package/build/styleguide/vendor/jquery/src/attributes/attr.js +0 -141
- package/build/styleguide/vendor/jquery/src/attributes/classes.js +0 -174
- package/build/styleguide/vendor/jquery/src/attributes/prop.js +0 -143
- package/build/styleguide/vendor/jquery/src/attributes/support.js +0 -33
- package/build/styleguide/vendor/jquery/src/attributes/val.js +0 -190
- package/build/styleguide/vendor/jquery/src/attributes.js +0 -13
- package/build/styleguide/vendor/jquery/src/callbacks.js +0 -234
- package/build/styleguide/vendor/jquery/src/core/DOMEval.js +0 -16
- package/build/styleguide/vendor/jquery/src/core/access.js +0 -70
- package/build/styleguide/vendor/jquery/src/core/init.js +0 -128
- package/build/styleguide/vendor/jquery/src/core/nodeName.js +0 -13
- package/build/styleguide/vendor/jquery/src/core/parseHTML.js +0 -65
- package/build/styleguide/vendor/jquery/src/core/ready-no-deferred.js +0 -96
- package/build/styleguide/vendor/jquery/src/core/ready.js +0 -86
- package/build/styleguide/vendor/jquery/src/core/readyException.js +0 -13
- package/build/styleguide/vendor/jquery/src/core/stripAndCollapse.js +0 -14
- package/build/styleguide/vendor/jquery/src/core/support.js +0 -20
- package/build/styleguide/vendor/jquery/src/core/var/rsingleTag.js +0 -6
- package/build/styleguide/vendor/jquery/src/core.js +0 -476
- package/build/styleguide/vendor/jquery/src/css/addGetHookIf.js +0 -26
- package/build/styleguide/vendor/jquery/src/css/adjustCSS.js +0 -71
- package/build/styleguide/vendor/jquery/src/css/curCSS.js +0 -65
- package/build/styleguide/vendor/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- package/build/styleguide/vendor/jquery/src/css/showHide.js +0 -105
- package/build/styleguide/vendor/jquery/src/css/support.js +0 -89
- package/build/styleguide/vendor/jquery/src/css/var/cssExpand.js +0 -5
- package/build/styleguide/vendor/jquery/src/css/var/getStyles.js +0 -17
- package/build/styleguide/vendor/jquery/src/css/var/isHiddenWithinTree.js +0 -34
- package/build/styleguide/vendor/jquery/src/css/var/rmargin.js +0 -5
- package/build/styleguide/vendor/jquery/src/css/var/rnumnonpx.js +0 -7
- package/build/styleguide/vendor/jquery/src/css/var/swap.js +0 -26
- package/build/styleguide/vendor/jquery/src/css.js +0 -438
- package/build/styleguide/vendor/jquery/src/data/Data.js +0 -161
- package/build/styleguide/vendor/jquery/src/data/var/acceptData.js +0 -19
- package/build/styleguide/vendor/jquery/src/data/var/dataPriv.js +0 -7
- package/build/styleguide/vendor/jquery/src/data/var/dataUser.js +0 -7
- package/build/styleguide/vendor/jquery/src/data.js +0 -179
- package/build/styleguide/vendor/jquery/src/deferred/exceptionHook.js +0 -21
- package/build/styleguide/vendor/jquery/src/deferred.js +0 -391
- package/build/styleguide/vendor/jquery/src/deprecated.js +0 -40
- package/build/styleguide/vendor/jquery/src/dimensions.js +0 -56
- package/build/styleguide/vendor/jquery/src/effects/Tween.js +0 -123
- package/build/styleguide/vendor/jquery/src/effects/animatedSelector.js +0 -15
- package/build/styleguide/vendor/jquery/src/effects.js +0 -699
- package/build/styleguide/vendor/jquery/src/event/ajax.js +0 -22
- package/build/styleguide/vendor/jquery/src/event/alias.js +0 -29
- package/build/styleguide/vendor/jquery/src/event/focusin.js +0 -55
- package/build/styleguide/vendor/jquery/src/event/support.js +0 -11
- package/build/styleguide/vendor/jquery/src/event/trigger.js +0 -185
- package/build/styleguide/vendor/jquery/src/event.js +0 -746
- package/build/styleguide/vendor/jquery/src/exports/amd.js +0 -26
- package/build/styleguide/vendor/jquery/src/exports/global.js +0 -34
- package/build/styleguide/vendor/jquery/src/jquery.js +0 -41
- package/build/styleguide/vendor/jquery/src/manipulation/_evalUrl.js +0 -23
- package/build/styleguide/vendor/jquery/src/manipulation/buildFragment.js +0 -104
- package/build/styleguide/vendor/jquery/src/manipulation/getAll.js +0 -32
- package/build/styleguide/vendor/jquery/src/manipulation/setGlobalEval.js +0 -22
- package/build/styleguide/vendor/jquery/src/manipulation/support.js +0 -35
- package/build/styleguide/vendor/jquery/src/manipulation/var/rcheckableType.js +0 -5
- package/build/styleguide/vendor/jquery/src/manipulation/var/rscriptType.js +0 -5
- package/build/styleguide/vendor/jquery/src/manipulation/var/rtagName.js +0 -5
- package/build/styleguide/vendor/jquery/src/manipulation/wrapMap.js +0 -29
- package/build/styleguide/vendor/jquery/src/manipulation.js +0 -488
- package/build/styleguide/vendor/jquery/src/offset.js +0 -229
- package/build/styleguide/vendor/jquery/src/queue/delay.js +0 -24
- package/build/styleguide/vendor/jquery/src/queue.js +0 -145
- package/build/styleguide/vendor/jquery/src/selector-native.js +0 -237
- package/build/styleguide/vendor/jquery/src/selector-sizzle.js +0 -19
- package/build/styleguide/vendor/jquery/src/selector.js +0 -3
- package/build/styleguide/vendor/jquery/src/serialize.js +0 -130
- package/build/styleguide/vendor/jquery/src/traversing/findFilter.js +0 -106
- package/build/styleguide/vendor/jquery/src/traversing/var/dir.js +0 -22
- package/build/styleguide/vendor/jquery/src/traversing/var/rneedsContext.js +0 -8
- package/build/styleguide/vendor/jquery/src/traversing/var/siblings.js +0 -17
- package/build/styleguide/vendor/jquery/src/traversing.js +0 -191
- package/build/styleguide/vendor/jquery/src/var/ObjectFunctionString.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/arr.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/class2type.js +0 -6
- package/build/styleguide/vendor/jquery/src/var/concat.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/document.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/documentElement.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/fnToString.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/getProto.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/hasOwn.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/indexOf.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/pnum.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/push.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/rcssNum.js +0 -9
- package/build/styleguide/vendor/jquery/src/var/rnothtmlwhite.js +0 -8
- package/build/styleguide/vendor/jquery/src/var/slice.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/support.js +0 -6
- package/build/styleguide/vendor/jquery/src/var/toString.js +0 -7
- package/build/styleguide/vendor/jquery/src/wrap.js +0 -77
- package/build/styleguide/vendor/lightgallery/.editorconfig +0 -16
- package/build/styleguide/vendor/lightgallery/.gitattributes +0 -1
- package/build/styleguide/vendor/lightgallery/.jscsrc +0 -7
- package/build/styleguide/vendor/lightgallery/.jshintrc +0 -18
- package/build/styleguide/vendor/lightgallery/.travis.yml +0 -9
- package/build/styleguide/vendor/lightgallery/Gruntfile.js +0 -208
- package/build/styleguide/vendor/lightgallery/LICENSE.md +0 -686
- package/build/styleguide/vendor/lightgallery/README.md +0 -191
- package/build/styleguide/vendor/lightgallery/contributing.md +0 -34
- package/build/styleguide/vendor/lightgallery/demo/img/1-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/1-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/1-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/1.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-1.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-13.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-2.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-4.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/index.html +0 -162
- package/build/styleguide/vendor/lightgallery/dist/css/lg-fb-comment-box.css +0 -57
- package/build/styleguide/vendor/lightgallery/dist/css/lg-fb-comment-box.min.css +0 -1
- package/build/styleguide/vendor/lightgallery/dist/css/lg-transitions.css +0 -779
- package/build/styleguide/vendor/lightgallery/dist/css/lg-transitions.min.css +0 -1
- package/build/styleguide/vendor/lightgallery/dist/css/lightgallery.css +0 -982
- package/build/styleguide/vendor/lightgallery/dist/css/lightgallery.min.css +0 -1
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.eot +0 -0
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.svg +0 -47
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.ttf +0 -0
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.woff +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/loading.gif +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/video-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/vimeo-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/youtube-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery-all.js +0 -3331
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery-all.min.js +0 -5
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery.js +0 -1364
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/lib/jquery.mousewheel.min.js +0 -8
- package/build/styleguide/vendor/lightgallery/lib/lg.png +0 -0
- package/build/styleguide/vendor/lightgallery/lib/picturefill.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/lightGallery.jquery.json +0 -27
- package/build/styleguide/vendor/lightgallery/modules/lg-autoplay.js +0 -206
- package/build/styleguide/vendor/lightgallery/modules/lg-autoplay.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-fullscreen.js +0 -116
- package/build/styleguide/vendor/lightgallery/modules/lg-fullscreen.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-hash.js +0 -101
- package/build/styleguide/vendor/lightgallery/modules/lg-hash.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-pager.js +0 -105
- package/build/styleguide/vendor/lightgallery/modules/lg-pager.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-share.js +0 -107
- package/build/styleguide/vendor/lightgallery/modules/lg-share.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-thumbnail.js +0 -478
- package/build/styleguide/vendor/lightgallery/modules/lg-thumbnail.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-video.js +0 -317
- package/build/styleguide/vendor/lightgallery/modules/lg-video.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-zoom.js +0 -527
- package/build/styleguide/vendor/lightgallery/modules/lg-zoom.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/package.json +0 -60
- package/build/styleguide/vendor/lightgallery/selection.json +0 -407
- package/build/styleguide/vendor/lightgallery/src/css/lg-fb-comment-box.css +0 -54
- package/build/styleguide/vendor/lightgallery/src/css/lg-fb-comment-box.css.map +0 -7
- package/build/styleguide/vendor/lightgallery/src/css/lg-transitions.css +0 -776
- package/build/styleguide/vendor/lightgallery/src/css/lg-transitions.css.map +0 -7
- package/build/styleguide/vendor/lightgallery/src/css/lightgallery.css +0 -979
- package/build/styleguide/vendor/lightgallery/src/css/lightgallery.css.map +0 -7
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.eot +0 -0
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.svg +0 -47
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.ttf +0 -0
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.woff +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/loading.gif +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/video-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/vimeo-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/youtube-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/src/js/.jshintrc +0 -22
- package/build/styleguide/vendor/lightgallery/src/js/lightgallery.js +0 -1342
- package/build/styleguide/vendor/lightgallery/src/sass/lg-animations.scss +0 -714
- package/build/styleguide/vendor/lightgallery/src/sass/lg-autoplay.scss +0 -36
- package/build/styleguide/vendor/lightgallery/src/sass/lg-core.scss +0 -272
- package/build/styleguide/vendor/lightgallery/src/sass/lg-fb-comment-box.scss +0 -52
- package/build/styleguide/vendor/lightgallery/src/sass/lg-fonts.scss +0 -22
- package/build/styleguide/vendor/lightgallery/src/sass/lg-fullscreen.scss +0 -9
- package/build/styleguide/vendor/lightgallery/src/sass/lg-mixins.scss +0 -330
- package/build/styleguide/vendor/lightgallery/src/sass/lg-pager.scss +0 -89
- package/build/styleguide/vendor/lightgallery/src/sass/lg-share.scss +0 -135
- package/build/styleguide/vendor/lightgallery/src/sass/lg-theme-default.scss +0 -208
- package/build/styleguide/vendor/lightgallery/src/sass/lg-thumbnail.scss +0 -111
- package/build/styleguide/vendor/lightgallery/src/sass/lg-transitions.scss +0 -766
- package/build/styleguide/vendor/lightgallery/src/sass/lg-variables.scss +0 -57
- package/build/styleguide/vendor/lightgallery/src/sass/lg-video.scss +0 -110
- package/build/styleguide/vendor/lightgallery/src/sass/lg-zoom.scss +0 -69
- package/build/styleguide/vendor/lightgallery/src/sass/lightgallery.scss +0 -15
- package/build/styleguide/vendor/lightgallery/src/sass/prepros.cfg +0 -530
- package/build/styleguide/vendor/lightgallery/test/.jshintrc +0 -33
- package/build/styleguide/vendor/lightgallery/test/lightgallery.html +0 -27
- package/build/styleguide/vendor/lightgallery/test/lightgallery_test.js +0 -16
- package/build/styleguide/vendor/masonry-layout/README.md +0 -80
- package/build/styleguide/vendor/masonry-layout/dist/masonry.pkgd.js +0 -2499
- package/build/styleguide/vendor/masonry-layout/dist/masonry.pkgd.min.js +0 -9
- package/build/styleguide/vendor/masonry-layout/masonry.js +0 -239
- package/postinstall.sh +0 -76
- package/version_tag.sh +0 -99
- package/yarn.lock +0 -7827
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
/*! lg-thumbnail - v1.1.0 - 2017-08-08
|
|
2
|
-
* http://sachinchoolur.github.io/lightGallery
|
|
3
|
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
|
4
|
-
|
|
5
|
-
(function (root, factory) {
|
|
6
|
-
if (typeof define === 'function' && define.amd) {
|
|
7
|
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
|
8
|
-
define(['jquery'], function (a0) {
|
|
9
|
-
return (factory(a0));
|
|
10
|
-
});
|
|
11
|
-
} else if (typeof exports === 'object') {
|
|
12
|
-
// Node. Does not work with strict CommonJS, but
|
|
13
|
-
// only CommonJS-like environments that support module.exports,
|
|
14
|
-
// like Node.
|
|
15
|
-
module.exports = factory(require('jquery'));
|
|
16
|
-
} else {
|
|
17
|
-
factory(jQuery);
|
|
18
|
-
}
|
|
19
|
-
}(this, function ($) {
|
|
20
|
-
|
|
21
|
-
(function() {
|
|
22
|
-
|
|
23
|
-
'use strict';
|
|
24
|
-
|
|
25
|
-
var defaults = {
|
|
26
|
-
thumbnail: true,
|
|
27
|
-
|
|
28
|
-
animateThumb: true,
|
|
29
|
-
currentPagerPosition: 'middle',
|
|
30
|
-
|
|
31
|
-
thumbWidth: 100,
|
|
32
|
-
thumbHeight: '80px',
|
|
33
|
-
thumbContHeight: 100,
|
|
34
|
-
thumbMargin: 5,
|
|
35
|
-
|
|
36
|
-
exThumbImage: false,
|
|
37
|
-
showThumbByDefault: true,
|
|
38
|
-
toogleThumb: true,
|
|
39
|
-
pullCaptionUp: true,
|
|
40
|
-
|
|
41
|
-
enableThumbDrag: true,
|
|
42
|
-
enableThumbSwipe: true,
|
|
43
|
-
swipeThreshold: 50,
|
|
44
|
-
|
|
45
|
-
loadYoutubeThumbnail: true,
|
|
46
|
-
youtubeThumbSize: 1,
|
|
47
|
-
|
|
48
|
-
loadVimeoThumbnail: true,
|
|
49
|
-
vimeoThumbSize: 'thumbnail_small',
|
|
50
|
-
|
|
51
|
-
loadDailymotionThumbnail: true
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var Thumbnail = function(element) {
|
|
55
|
-
|
|
56
|
-
// get lightGallery core plugin data
|
|
57
|
-
this.core = $(element).data('lightGallery');
|
|
58
|
-
|
|
59
|
-
// extend module default settings with lightGallery core settings
|
|
60
|
-
this.core.s = $.extend({}, defaults, this.core.s);
|
|
61
|
-
|
|
62
|
-
this.$el = $(element);
|
|
63
|
-
this.$thumbOuter = null;
|
|
64
|
-
this.thumbOuterWidth = 0;
|
|
65
|
-
this.thumbTotalWidth = (this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin));
|
|
66
|
-
this.thumbIndex = this.core.index;
|
|
67
|
-
|
|
68
|
-
if (this.core.s.animateThumb) {
|
|
69
|
-
this.core.s.thumbHeight = '100%';
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Thumbnail animation value
|
|
73
|
-
this.left = 0;
|
|
74
|
-
|
|
75
|
-
this.init();
|
|
76
|
-
|
|
77
|
-
return this;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
Thumbnail.prototype.init = function() {
|
|
81
|
-
var _this = this;
|
|
82
|
-
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
|
83
|
-
if (this.core.s.showThumbByDefault) {
|
|
84
|
-
setTimeout(function(){
|
|
85
|
-
_this.core.$outer.addClass('lg-thumb-open');
|
|
86
|
-
}, 700);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (this.core.s.pullCaptionUp) {
|
|
90
|
-
this.core.$outer.addClass('lg-pull-caption-up');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
this.build();
|
|
94
|
-
if (this.core.s.animateThumb && this.core.doCss()) {
|
|
95
|
-
if (this.core.s.enableThumbDrag) {
|
|
96
|
-
this.enableThumbDrag();
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (this.core.s.enableThumbSwipe) {
|
|
100
|
-
this.enableThumbSwipe();
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
this.thumbClickable = false;
|
|
104
|
-
} else {
|
|
105
|
-
this.thumbClickable = true;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
this.toogle();
|
|
109
|
-
this.thumbkeyPress();
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
Thumbnail.prototype.build = function() {
|
|
114
|
-
var _this = this;
|
|
115
|
-
var thumbList = '';
|
|
116
|
-
var vimeoErrorThumbSize = '';
|
|
117
|
-
var $thumb;
|
|
118
|
-
var html = '<div class="lg-thumb-outer">' +
|
|
119
|
-
'<div class="lg-thumb lg-group">' +
|
|
120
|
-
'</div>' +
|
|
121
|
-
'</div>';
|
|
122
|
-
|
|
123
|
-
switch (this.core.s.vimeoThumbSize) {
|
|
124
|
-
case 'thumbnail_large':
|
|
125
|
-
vimeoErrorThumbSize = '640';
|
|
126
|
-
break;
|
|
127
|
-
case 'thumbnail_medium':
|
|
128
|
-
vimeoErrorThumbSize = '200x150';
|
|
129
|
-
break;
|
|
130
|
-
case 'thumbnail_small':
|
|
131
|
-
vimeoErrorThumbSize = '100x75';
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
_this.core.$outer.addClass('lg-has-thumb');
|
|
135
|
-
|
|
136
|
-
_this.core.$outer.find('.lg').append(html);
|
|
137
|
-
|
|
138
|
-
_this.$thumbOuter = _this.core.$outer.find('.lg-thumb-outer');
|
|
139
|
-
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
|
140
|
-
|
|
141
|
-
if (_this.core.s.animateThumb) {
|
|
142
|
-
_this.core.$outer.find('.lg-thumb').css({
|
|
143
|
-
width: _this.thumbTotalWidth + 'px',
|
|
144
|
-
position: 'relative'
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (this.core.s.animateThumb) {
|
|
149
|
-
_this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function getThumb(src, thumb, index) {
|
|
153
|
-
var isVideo = _this.core.isVideo(src, index) || {};
|
|
154
|
-
var thumbImg;
|
|
155
|
-
var vimeoId = '';
|
|
156
|
-
|
|
157
|
-
if (isVideo.youtube || isVideo.vimeo || isVideo.dailymotion) {
|
|
158
|
-
if (isVideo.youtube) {
|
|
159
|
-
if (_this.core.s.loadYoutubeThumbnail) {
|
|
160
|
-
thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
|
|
161
|
-
} else {
|
|
162
|
-
thumbImg = thumb;
|
|
163
|
-
}
|
|
164
|
-
} else if (isVideo.vimeo) {
|
|
165
|
-
if (_this.core.s.loadVimeoThumbnail) {
|
|
166
|
-
thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
|
|
167
|
-
vimeoId = isVideo.vimeo[1];
|
|
168
|
-
} else {
|
|
169
|
-
thumbImg = thumb;
|
|
170
|
-
}
|
|
171
|
-
} else if (isVideo.dailymotion) {
|
|
172
|
-
if (_this.core.s.loadDailymotionThumbnail) {
|
|
173
|
-
thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
|
|
174
|
-
} else {
|
|
175
|
-
thumbImg = thumb;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
} else {
|
|
179
|
-
thumbImg = thumb;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
thumbList += '<div data-vimeo-id="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; height: ' + _this.core.s.thumbHeight + '; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
|
|
183
|
-
vimeoId = '';
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
if (_this.core.s.dynamic) {
|
|
187
|
-
for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
|
|
188
|
-
getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
|
|
189
|
-
}
|
|
190
|
-
} else {
|
|
191
|
-
_this.core.$items.each(function(i) {
|
|
192
|
-
|
|
193
|
-
if (!_this.core.s.exThumbImage) {
|
|
194
|
-
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).find('img').attr('src'), i);
|
|
195
|
-
} else {
|
|
196
|
-
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
_this.core.$outer.find('.lg-thumb').html(thumbList);
|
|
203
|
-
|
|
204
|
-
$thumb = _this.core.$outer.find('.lg-thumb-item');
|
|
205
|
-
|
|
206
|
-
// Load vimeo thumbnails
|
|
207
|
-
$thumb.each(function() {
|
|
208
|
-
var $this = $(this);
|
|
209
|
-
var vimeoVideoId = $this.attr('data-vimeo-id');
|
|
210
|
-
|
|
211
|
-
if (vimeoVideoId) {
|
|
212
|
-
$.getJSON('//www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
|
|
213
|
-
format: 'json'
|
|
214
|
-
}, function(data) {
|
|
215
|
-
$this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
// manage active class for thumbnail
|
|
221
|
-
$thumb.eq(_this.core.index).addClass('active');
|
|
222
|
-
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
|
223
|
-
$thumb.removeClass('active');
|
|
224
|
-
$thumb.eq(_this.core.index).addClass('active');
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
$thumb.on('click.lg touchend.lg', function() {
|
|
228
|
-
var _$this = $(this);
|
|
229
|
-
setTimeout(function() {
|
|
230
|
-
|
|
231
|
-
// In IE9 and bellow touch does not support
|
|
232
|
-
// Go to slide if browser does not support css transitions
|
|
233
|
-
if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) {
|
|
234
|
-
_this.core.index = _$this.index();
|
|
235
|
-
_this.core.slide(_this.core.index, false, true, false);
|
|
236
|
-
}
|
|
237
|
-
}, 50);
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
|
241
|
-
_this.animateThumb(_this.core.index);
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
$(window).on('resize.lg.thumb orientationchange.lg.thumb', function() {
|
|
245
|
-
setTimeout(function() {
|
|
246
|
-
_this.animateThumb(_this.core.index);
|
|
247
|
-
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
|
248
|
-
}, 200);
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
Thumbnail.prototype.setTranslate = function(value) {
|
|
254
|
-
// jQuery supports Automatic CSS prefixing since jQuery 1.8.0
|
|
255
|
-
this.core.$outer.find('.lg-thumb').css({
|
|
256
|
-
transform: 'translate3d(-' + (value) + 'px, 0px, 0px)'
|
|
257
|
-
});
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
Thumbnail.prototype.animateThumb = function(index) {
|
|
261
|
-
var $thumb = this.core.$outer.find('.lg-thumb');
|
|
262
|
-
if (this.core.s.animateThumb) {
|
|
263
|
-
var position;
|
|
264
|
-
switch (this.core.s.currentPagerPosition) {
|
|
265
|
-
case 'left':
|
|
266
|
-
position = 0;
|
|
267
|
-
break;
|
|
268
|
-
case 'middle':
|
|
269
|
-
position = (this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2);
|
|
270
|
-
break;
|
|
271
|
-
case 'right':
|
|
272
|
-
position = this.thumbOuterWidth - this.core.s.thumbWidth;
|
|
273
|
-
}
|
|
274
|
-
this.left = ((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position;
|
|
275
|
-
if (this.left > (this.thumbTotalWidth - this.thumbOuterWidth)) {
|
|
276
|
-
this.left = this.thumbTotalWidth - this.thumbOuterWidth;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
if (this.left < 0) {
|
|
280
|
-
this.left = 0;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
if (this.core.lGalleryOn) {
|
|
284
|
-
if (!$thumb.hasClass('on')) {
|
|
285
|
-
this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms');
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
if (!this.core.doCss()) {
|
|
289
|
-
$thumb.animate({
|
|
290
|
-
left: -this.left + 'px'
|
|
291
|
-
}, this.core.s.speed);
|
|
292
|
-
}
|
|
293
|
-
} else {
|
|
294
|
-
if (!this.core.doCss()) {
|
|
295
|
-
$thumb.css('left', -this.left + 'px');
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
this.setTranslate(this.left);
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
// Enable thumbnail dragging and swiping
|
|
305
|
-
Thumbnail.prototype.enableThumbDrag = function() {
|
|
306
|
-
|
|
307
|
-
var _this = this;
|
|
308
|
-
var startCoords = 0;
|
|
309
|
-
var endCoords = 0;
|
|
310
|
-
var isDraging = false;
|
|
311
|
-
var isMoved = false;
|
|
312
|
-
var tempLeft = 0;
|
|
313
|
-
|
|
314
|
-
_this.$thumbOuter.addClass('lg-grab');
|
|
315
|
-
|
|
316
|
-
_this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e) {
|
|
317
|
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
|
318
|
-
// execute only on .lg-object
|
|
319
|
-
e.preventDefault();
|
|
320
|
-
startCoords = e.pageX;
|
|
321
|
-
isDraging = true;
|
|
322
|
-
|
|
323
|
-
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
|
324
|
-
_this.core.$outer.scrollLeft += 1;
|
|
325
|
-
_this.core.$outer.scrollLeft -= 1;
|
|
326
|
-
|
|
327
|
-
// *
|
|
328
|
-
_this.thumbClickable = false;
|
|
329
|
-
_this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
$(window).on('mousemove.lg.thumb', function(e) {
|
|
334
|
-
if (isDraging) {
|
|
335
|
-
tempLeft = _this.left;
|
|
336
|
-
isMoved = true;
|
|
337
|
-
endCoords = e.pageX;
|
|
338
|
-
|
|
339
|
-
_this.$thumbOuter.addClass('lg-dragging');
|
|
340
|
-
|
|
341
|
-
tempLeft = tempLeft - (endCoords - startCoords);
|
|
342
|
-
|
|
343
|
-
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
|
344
|
-
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
if (tempLeft < 0) {
|
|
348
|
-
tempLeft = 0;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
// move current slide
|
|
352
|
-
_this.setTranslate(tempLeft);
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
$(window).on('mouseup.lg.thumb', function() {
|
|
358
|
-
if (isMoved) {
|
|
359
|
-
isMoved = false;
|
|
360
|
-
_this.$thumbOuter.removeClass('lg-dragging');
|
|
361
|
-
|
|
362
|
-
_this.left = tempLeft;
|
|
363
|
-
|
|
364
|
-
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
|
365
|
-
_this.thumbClickable = true;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
} else {
|
|
369
|
-
_this.thumbClickable = true;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
if (isDraging) {
|
|
373
|
-
isDraging = false;
|
|
374
|
-
_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
Thumbnail.prototype.enableThumbSwipe = function() {
|
|
381
|
-
var _this = this;
|
|
382
|
-
var startCoords = 0;
|
|
383
|
-
var endCoords = 0;
|
|
384
|
-
var isMoved = false;
|
|
385
|
-
var tempLeft = 0;
|
|
386
|
-
|
|
387
|
-
_this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e) {
|
|
388
|
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
|
389
|
-
e.preventDefault();
|
|
390
|
-
startCoords = e.originalEvent.targetTouches[0].pageX;
|
|
391
|
-
_this.thumbClickable = false;
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
_this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e) {
|
|
396
|
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
|
397
|
-
e.preventDefault();
|
|
398
|
-
endCoords = e.originalEvent.targetTouches[0].pageX;
|
|
399
|
-
isMoved = true;
|
|
400
|
-
|
|
401
|
-
_this.$thumbOuter.addClass('lg-dragging');
|
|
402
|
-
|
|
403
|
-
tempLeft = _this.left;
|
|
404
|
-
|
|
405
|
-
tempLeft = tempLeft - (endCoords - startCoords);
|
|
406
|
-
|
|
407
|
-
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
|
408
|
-
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
if (tempLeft < 0) {
|
|
412
|
-
tempLeft = 0;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// move current slide
|
|
416
|
-
_this.setTranslate(tempLeft);
|
|
417
|
-
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
_this.core.$outer.find('.lg-thumb').on('touchend.lg', function() {
|
|
422
|
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
|
423
|
-
|
|
424
|
-
if (isMoved) {
|
|
425
|
-
isMoved = false;
|
|
426
|
-
_this.$thumbOuter.removeClass('lg-dragging');
|
|
427
|
-
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
|
428
|
-
_this.thumbClickable = true;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
_this.left = tempLeft;
|
|
432
|
-
} else {
|
|
433
|
-
_this.thumbClickable = true;
|
|
434
|
-
}
|
|
435
|
-
} else {
|
|
436
|
-
_this.thumbClickable = true;
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
Thumbnail.prototype.toogle = function() {
|
|
443
|
-
var _this = this;
|
|
444
|
-
if (_this.core.s.toogleThumb) {
|
|
445
|
-
_this.core.$outer.addClass('lg-can-toggle');
|
|
446
|
-
_this.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>');
|
|
447
|
-
_this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() {
|
|
448
|
-
_this.core.$outer.toggleClass('lg-thumb-open');
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
Thumbnail.prototype.thumbkeyPress = function() {
|
|
454
|
-
var _this = this;
|
|
455
|
-
$(window).on('keydown.lg.thumb', function(e) {
|
|
456
|
-
if (e.keyCode === 38) {
|
|
457
|
-
e.preventDefault();
|
|
458
|
-
_this.core.$outer.addClass('lg-thumb-open');
|
|
459
|
-
} else if (e.keyCode === 40) {
|
|
460
|
-
e.preventDefault();
|
|
461
|
-
_this.core.$outer.removeClass('lg-thumb-open');
|
|
462
|
-
}
|
|
463
|
-
});
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
Thumbnail.prototype.destroy = function() {
|
|
467
|
-
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
|
468
|
-
$(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb');
|
|
469
|
-
this.$thumbOuter.remove();
|
|
470
|
-
this.core.$outer.removeClass('lg-has-thumb');
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
|
|
474
|
-
$.fn.lightGallery.modules.Thumbnail = Thumbnail;
|
|
475
|
-
|
|
476
|
-
})();
|
|
477
|
-
|
|
478
|
-
}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! lg-thumbnail - v1.1.0 - 2017-08-08
|
|
2
|
-
* http://sachinchoolur.github.io/lightGallery
|
|
3
|
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
|
4
|
-
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:100,thumbHeight:"80px",thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toogleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.$el=a(c),this.$thumbOuter=null,this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin),this.thumbIndex=this.core.index,this.core.s.animateThumb&&(this.core.s.thumbHeight="100%"),this.left=0,this.init(),this};c.prototype.init=function(){var a=this;this.core.s.thumbnail&&this.core.$items.length>1&&(this.core.s.showThumbByDefault&&setTimeout(function(){a.core.$outer.addClass("lg-thumb-open")},700),this.core.s.pullCaptionUp&&this.core.$outer.addClass("lg-pull-caption-up"),this.build(),this.core.s.animateThumb&&this.core.doCss()?(this.core.s.enableThumbDrag&&this.enableThumbDrag(),this.core.s.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toogle(),this.thumbkeyPress())},c.prototype.build=function(){function b(a,b,c){var g,h=d.core.isVideo(a,c)||{},i="";h.youtube||h.vimeo||h.dailymotion?h.youtube?g=d.core.s.loadYoutubeThumbnail?"//img.youtube.com/vi/"+h.youtube[1]+"/"+d.core.s.youtubeThumbSize+".jpg":b:h.vimeo?d.core.s.loadVimeoThumbnail?(g="//i.vimeocdn.com/video/error_"+f+".jpg",i=h.vimeo[1]):g=b:h.dailymotion&&(g=d.core.s.loadDailymotionThumbnail?"//www.dailymotion.com/thumbnail/video/"+h.dailymotion[1]:b):g=b,e+='<div data-vimeo-id="'+i+'" class="lg-thumb-item" style="width:'+d.core.s.thumbWidth+"px; height: "+d.core.s.thumbHeight+"; margin-right: "+d.core.s.thumbMargin+'px"><img src="'+g+'" /></div>',i=""}var c,d=this,e="",f="",g='<div class="lg-thumb-outer"><div class="lg-thumb lg-group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":f="640";break;case"thumbnail_medium":f="200x150";break;case"thumbnail_small":f="100x75"}if(d.core.$outer.addClass("lg-has-thumb"),d.core.$outer.find(".lg").append(g),d.$thumbOuter=d.core.$outer.find(".lg-thumb-outer"),d.thumbOuterWidth=d.$thumbOuter.width(),d.core.s.animateThumb&&d.core.$outer.find(".lg-thumb").css({width:d.thumbTotalWidth+"px",position:"relative"}),this.core.s.animateThumb&&d.$thumbOuter.css("height",d.core.s.thumbContHeight+"px"),d.core.s.dynamic)for(var h=0;h<d.core.s.dynamicEl.length;h++)b(d.core.s.dynamicEl[h].src,d.core.s.dynamicEl[h].thumb,h);else d.core.$items.each(function(c){d.core.s.exThumbImage?b(a(this).attr("href")||a(this).attr("data-src"),a(this).attr(d.core.s.exThumbImage),c):b(a(this).attr("href")||a(this).attr("data-src"),a(this).find("img").attr("src"),c)});d.core.$outer.find(".lg-thumb").html(e),c=d.core.$outer.find(".lg-thumb-item"),c.each(function(){var b=a(this),c=b.attr("data-vimeo-id");c&&a.getJSON("//www.vimeo.com/api/v2/video/"+c+".json?callback=?",{format:"json"},function(a){b.find("img").attr("src",a[0][d.core.s.vimeoThumbSize])})}),c.eq(d.core.index).addClass("active"),d.core.$el.on("onBeforeSlide.lg.tm",function(){c.removeClass("active"),c.eq(d.core.index).addClass("active")}),c.on("click.lg touchend.lg",function(){var b=a(this);setTimeout(function(){(d.thumbClickable&&!d.core.lgBusy||!d.core.doCss())&&(d.core.index=b.index(),d.core.slide(d.core.index,!1,!0,!1))},50)}),d.core.$el.on("onBeforeSlide.lg.tm",function(){d.animateThumb(d.core.index)}),a(window).on("resize.lg.thumb orientationchange.lg.thumb",function(){setTimeout(function(){d.animateThumb(d.core.index),d.thumbOuterWidth=d.$thumbOuter.width()},200)})},c.prototype.setTranslate=function(a){this.core.$outer.find(".lg-thumb").css({transform:"translate3d(-"+a+"px, 0px, 0px)"})},c.prototype.animateThumb=function(a){var b=this.core.$outer.find(".lg-thumb");if(this.core.s.animateThumb){var c;switch(this.core.s.currentPagerPosition){case"left":c=0;break;case"middle":c=this.thumbOuterWidth/2-this.core.s.thumbWidth/2;break;case"right":c=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=(this.core.s.thumbWidth+this.core.s.thumbMargin)*a-1-c,this.left>this.thumbTotalWidth-this.thumbOuterWidth&&(this.left=this.thumbTotalWidth-this.thumbOuterWidth),this.left<0&&(this.left=0),this.core.lGalleryOn?(b.hasClass("on")||this.core.$outer.find(".lg-thumb").css("transition-duration",this.core.s.speed+"ms"),this.core.doCss()||b.animate({left:-this.left+"px"},this.core.s.speed)):this.core.doCss()||b.css("left",-this.left+"px"),this.setTranslate(this.left)}},c.prototype.enableThumbDrag=function(){var b=this,c=0,d=0,e=!1,f=!1,g=0;b.$thumbOuter.addClass("lg-grab"),b.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb",function(a){b.thumbTotalWidth>b.thumbOuterWidth&&(a.preventDefault(),c=a.pageX,e=!0,b.core.$outer.scrollLeft+=1,b.core.$outer.scrollLeft-=1,b.thumbClickable=!1,b.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.thumb",function(a){e&&(g=b.left,f=!0,d=a.pageX,b.$thumbOuter.addClass("lg-dragging"),g-=d-c,g>b.thumbTotalWidth-b.thumbOuterWidth&&(g=b.thumbTotalWidth-b.thumbOuterWidth),g<0&&(g=0),b.setTranslate(g))}),a(window).on("mouseup.lg.thumb",function(){f?(f=!1,b.$thumbOuter.removeClass("lg-dragging"),b.left=g,Math.abs(d-c)<b.core.s.swipeThreshold&&(b.thumbClickable=!0)):b.thumbClickable=!0,e&&(e=!1,b.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab"))})},c.prototype.enableThumbSwipe=function(){var a=this,b=0,c=0,d=!1,e=0;a.core.$outer.find(".lg-thumb").on("touchstart.lg",function(c){a.thumbTotalWidth>a.thumbOuterWidth&&(c.preventDefault(),b=c.originalEvent.targetTouches[0].pageX,a.thumbClickable=!1)}),a.core.$outer.find(".lg-thumb").on("touchmove.lg",function(f){a.thumbTotalWidth>a.thumbOuterWidth&&(f.preventDefault(),c=f.originalEvent.targetTouches[0].pageX,d=!0,a.$thumbOuter.addClass("lg-dragging"),e=a.left,e-=c-b,e>a.thumbTotalWidth-a.thumbOuterWidth&&(e=a.thumbTotalWidth-a.thumbOuterWidth),e<0&&(e=0),a.setTranslate(e))}),a.core.$outer.find(".lg-thumb").on("touchend.lg",function(){a.thumbTotalWidth>a.thumbOuterWidth&&d?(d=!1,a.$thumbOuter.removeClass("lg-dragging"),Math.abs(c-b)<a.core.s.swipeThreshold&&(a.thumbClickable=!0),a.left=e):a.thumbClickable=!0})},c.prototype.toogle=function(){var a=this;a.core.s.toogleThumb&&(a.core.$outer.addClass("lg-can-toggle"),a.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>'),a.core.$outer.find(".lg-toogle-thumb").on("click.lg",function(){a.core.$outer.toggleClass("lg-thumb-open")}))},c.prototype.thumbkeyPress=function(){var b=this;a(window).on("keydown.lg.thumb",function(a){38===a.keyCode?(a.preventDefault(),b.core.$outer.addClass("lg-thumb-open")):40===a.keyCode&&(a.preventDefault(),b.core.$outer.removeClass("lg-thumb-open"))})},c.prototype.destroy=function(){this.core.s.thumbnail&&this.core.$items.length>1&&(a(window).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb"),this.$thumbOuter.remove(),this.core.$outer.removeClass("lg-has-thumb"))},a.fn.lightGallery.modules.Thumbnail=c}()});
|