j1m_lightbox 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +21 -0
  3. data/README.md +41 -0
  4. data/_data/modules/default/j1_lightbox-0.0.1/j1_colorbox.yml +106 -0
  5. data/_data/modules/default/j1_lightbox-0.0.1/j1_light_gallery.yml +162 -0
  6. data/_data/modules/default/j1_lightbox-0.0.1/j1_lightbox2.yml +168 -0
  7. data/_data/resources/default/j1_lightbox-0.0.1/resource.yml +84 -0
  8. data/assets/themes/j1/lightboxes/colorbox/css/theme_1/colorbox.css +93 -0
  9. data/assets/themes/j1/lightboxes/colorbox/css/theme_1/images/border.png +0 -0
  10. data/assets/themes/j1/lightboxes/colorbox/css/theme_1/images/controls.png +0 -0
  11. data/assets/themes/j1/lightboxes/colorbox/css/theme_1/images/loading.gif +0 -0
  12. data/assets/themes/j1/lightboxes/colorbox/css/theme_1/images/loading_background.png +0 -0
  13. data/assets/themes/j1/lightboxes/colorbox/css/theme_1/images/overlay.png +0 -0
  14. data/assets/themes/j1/lightboxes/colorbox/css/theme_2/colorbox.css +72 -0
  15. data/assets/themes/j1/lightboxes/colorbox/css/theme_2/images/controls.png +0 -0
  16. data/assets/themes/j1/lightboxes/colorbox/css/theme_2/images/loading.gif +0 -0
  17. data/assets/themes/j1/lightboxes/colorbox/css/theme_3/colorbox.css +68 -0
  18. data/assets/themes/j1/lightboxes/colorbox/css/theme_3/images/controls.png +0 -0
  19. data/assets/themes/j1/lightboxes/colorbox/css/theme_3/images/loading.gif +0 -0
  20. data/assets/themes/j1/lightboxes/colorbox/css/theme_4/colorbox.css +89 -0
  21. data/assets/themes/j1/lightboxes/colorbox/css/theme_4/images/border1.png +0 -0
  22. data/assets/themes/j1/lightboxes/colorbox/css/theme_4/images/border2.png +0 -0
  23. data/assets/themes/j1/lightboxes/colorbox/css/theme_4/images/loading.gif +0 -0
  24. data/assets/themes/j1/lightboxes/colorbox/css/theme_5/colorbox.css +81 -0
  25. data/assets/themes/j1/lightboxes/colorbox/css/theme_5/images/border.png +0 -0
  26. data/assets/themes/j1/lightboxes/colorbox/css/theme_5/images/controls.png +0 -0
  27. data/assets/themes/j1/lightboxes/colorbox/css/theme_5/images/loading.gif +0 -0
  28. data/assets/themes/j1/lightboxes/colorbox/css/theme_5/images/loading_background.png +0 -0
  29. data/assets/themes/j1/lightboxes/colorbox/js/jquery.colorbox.js +1105 -0
  30. data/assets/themes/j1/lightboxes/colorbox/js/jquery.colorbox.min.js +6 -0
  31. data/assets/themes/j1/lightboxes/light_gallery/css/lg-fb-comment-box.css +57 -0
  32. data/assets/themes/j1/lightboxes/light_gallery/css/lg-fb-comment-box.min.css +1 -0
  33. data/assets/themes/j1/lightboxes/light_gallery/css/lg-transitions.css +778 -0
  34. data/assets/themes/j1/lightboxes/light_gallery/css/lg-transitions.min.css +1 -0
  35. data/assets/themes/j1/lightboxes/light_gallery/css/lightgallery.css +967 -0
  36. data/assets/themes/j1/lightboxes/light_gallery/css/lightgallery.min.css +1 -0
  37. data/assets/themes/j1/lightboxes/light_gallery/css/theme/j1_template.css +290 -0
  38. data/assets/themes/j1/lightboxes/light_gallery/fonts/lg.eot +0 -0
  39. data/assets/themes/j1/lightboxes/light_gallery/fonts/lg.svg +47 -0
  40. data/assets/themes/j1/lightboxes/light_gallery/fonts/lg.ttf +0 -0
  41. data/assets/themes/j1/lightboxes/light_gallery/fonts/lg.woff +0 -0
  42. data/assets/themes/j1/lightboxes/light_gallery/img/icons/animation-w.png +0 -0
  43. data/assets/themes/j1/lightboxes/light_gallery/img/icons/customize-w.png +0 -0
  44. data/assets/themes/j1/lightboxes/light_gallery/img/icons/dynamic-w.png +0 -0
  45. data/assets/themes/j1/lightboxes/light_gallery/img/icons/facebook-icon.svg +10 -0
  46. data/assets/themes/j1/lightboxes/light_gallery/img/icons/googleplus-icon.svg +30 -0
  47. data/assets/themes/j1/lightboxes/light_gallery/img/icons/html5-w.png +0 -0
  48. data/assets/themes/j1/lightboxes/light_gallery/img/icons/linked-in.png +0 -0
  49. data/assets/themes/j1/lightboxes/light_gallery/img/icons/module-w.png +0 -0
  50. data/assets/themes/j1/lightboxes/light_gallery/img/icons/play-button.png +0 -0
  51. data/assets/themes/j1/lightboxes/light_gallery/img/icons/responsive-w.png +0 -0
  52. data/assets/themes/j1/lightboxes/light_gallery/img/icons/thumb-w.png +0 -0
  53. data/assets/themes/j1/lightboxes/light_gallery/img/icons/touch-w.png +0 -0
  54. data/assets/themes/j1/lightboxes/light_gallery/img/icons/twitter-icon.svg +15 -0
  55. data/assets/themes/j1/lightboxes/light_gallery/img/icons/twitter.png +0 -0
  56. data/assets/themes/j1/lightboxes/light_gallery/img/icons/video1-w.png +0 -0
  57. data/assets/themes/j1/lightboxes/light_gallery/img/icons/zoom-w.png +0 -0
  58. data/assets/themes/j1/lightboxes/light_gallery/img/icons/zoom.png +0 -0
  59. data/assets/themes/j1/lightboxes/light_gallery/img/loading.gif +0 -0
  60. data/assets/themes/j1/lightboxes/light_gallery/img/video-play.png +0 -0
  61. data/assets/themes/j1/lightboxes/light_gallery/img/vimeo-play.png +0 -0
  62. data/assets/themes/j1/lightboxes/light_gallery/img/youtube-play.png +0 -0
  63. data/assets/themes/j1/lightboxes/light_gallery/js/lg-autoplay.js +204 -0
  64. data/assets/themes/j1/lightboxes/light_gallery/js/lg-autoplay.min.js +4 -0
  65. data/assets/themes/j1/lightboxes/light_gallery/js/lg-fullscreen.js +116 -0
  66. data/assets/themes/j1/lightboxes/light_gallery/js/lg-fullscreen.min.js +4 -0
  67. data/assets/themes/j1/lightboxes/light_gallery/js/lg-hash.js +93 -0
  68. data/assets/themes/j1/lightboxes/light_gallery/js/lg-hash.min.js +4 -0
  69. data/assets/themes/j1/lightboxes/light_gallery/js/lg-pager.js +105 -0
  70. data/assets/themes/j1/lightboxes/light_gallery/js/lg-pager.min.js +4 -0
  71. data/assets/themes/j1/lightboxes/light_gallery/js/lg-share.js +92 -0
  72. data/assets/themes/j1/lightboxes/light_gallery/js/lg-share.min.js +4 -0
  73. data/assets/themes/j1/lightboxes/light_gallery/js/lg-thumbnail.js +473 -0
  74. data/assets/themes/j1/lightboxes/light_gallery/js/lg-thumbnail.min.js +4 -0
  75. data/assets/themes/j1/lightboxes/light_gallery/js/lg-video.js +312 -0
  76. data/assets/themes/j1/lightboxes/light_gallery/js/lg-video.min.js +4 -0
  77. data/assets/themes/j1/lightboxes/light_gallery/js/lg-zoom.js +497 -0
  78. data/assets/themes/j1/lightboxes/light_gallery/js/lg-zoom.min.js +4 -0
  79. data/assets/themes/j1/lightboxes/light_gallery/js/lightgallery.js +1340 -0
  80. data/assets/themes/j1/lightboxes/light_gallery/js/lightgallery.min.js +4 -0
  81. data/assets/themes/j1/lightboxes/lightbox2/css/lightbox.css +213 -0
  82. data/assets/themes/j1/lightboxes/lightbox2/css/lightbox.min.css +1 -0
  83. data/assets/themes/j1/lightboxes/lightbox2/images/close.png +0 -0
  84. data/assets/themes/j1/lightboxes/lightbox2/images/loading.gif +0 -0
  85. data/assets/themes/j1/lightboxes/lightbox2/images/next.png +0 -0
  86. data/assets/themes/j1/lightboxes/lightbox2/images/prev.png +0 -0
  87. data/assets/themes/j1/lightboxes/lightbox2/js/lightbox-plus-jquery.js +9719 -0
  88. data/assets/themes/j1/lightboxes/lightbox2/js/lightbox-plus-jquery.min.js +38 -0
  89. data/assets/themes/j1/lightboxes/lightbox2/js/lightbox-plus-jquery.min.map +1 -0
  90. data/assets/themes/j1/lightboxes/lightbox2/js/lightbox.js +508 -0
  91. data/assets/themes/j1/lightboxes/lightbox2/js/lightbox.min.js +13 -0
  92. data/assets/themes/j1/lightboxes/lightbox2/js/lightbox.min.map +1 -0
  93. data/exe/console +14 -0
  94. data/exe/setup +8 -0
  95. data/lib/j1m_lightbox.rb +5 -0
  96. data/lib/j1m_lightbox/version.rb +3 -0
  97. metadata +185 -0
@@ -0,0 +1,204 @@
1
+ /*! lg-autoplay - v1.0.0 - 2016-09-20
2
+ * http://sachinchoolur.github.io/lightGallery
3
+ * Copyright (c) 2016 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([], function () {
9
+ return (factory());
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();
16
+ } else {
17
+ factory();
18
+ }
19
+ }(this, function () {
20
+
21
+
22
+ (function($, window, document, undefined) {
23
+
24
+ 'use strict';
25
+
26
+ var defaults = {
27
+ autoplay: false,
28
+ pause: 5000,
29
+ progressBar: true,
30
+ fourceAutoplay: false,
31
+ autoplayControls: true,
32
+ appendAutoplayControlsTo: '.lg-toolbar'
33
+ };
34
+
35
+ /**
36
+ * Creates the autoplay plugin.
37
+ * @param {object} element - lightGallery element
38
+ */
39
+ var Autoplay = function(element) {
40
+
41
+ this.core = $(element).data('lightGallery');
42
+
43
+ this.$el = $(element);
44
+
45
+ // Execute only if items are above 1
46
+ if (this.core.$items.length < 2) {
47
+ return false;
48
+ }
49
+
50
+ this.core.s = $.extend({}, defaults, this.core.s);
51
+ this.interval = false;
52
+
53
+ // Identify if slide happened from autoplay
54
+ this.fromAuto = true;
55
+
56
+ // Identify if autoplay canceled from touch/drag
57
+ this.canceledOnTouch = false;
58
+
59
+ // save fourceautoplay value
60
+ this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
61
+
62
+ // do not allow progress bar if browser does not support css3 transitions
63
+ if (!this.core.doCss()) {
64
+ this.core.s.progressBar = false;
65
+ }
66
+
67
+ this.init();
68
+
69
+ return this;
70
+ };
71
+
72
+ Autoplay.prototype.init = function() {
73
+ var _this = this;
74
+
75
+ // append autoplay controls
76
+ if (_this.core.s.autoplayControls) {
77
+ _this.controls();
78
+ }
79
+
80
+ // Create progress bar
81
+ if (_this.core.s.progressBar) {
82
+ _this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>');
83
+ }
84
+
85
+ // set progress
86
+ _this.progress();
87
+
88
+ // Start autoplay
89
+ if (_this.core.s.autoplay) {
90
+ _this.startlAuto();
91
+ }
92
+
93
+ // cancel interval on touchstart and dragstart
94
+ _this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
95
+ if (_this.interval) {
96
+ _this.cancelAuto();
97
+ _this.canceledOnTouch = true;
98
+ }
99
+ });
100
+
101
+ // restore autoplay if autoplay canceled from touchstart / dragstart
102
+ _this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
103
+ if (!_this.interval && _this.canceledOnTouch) {
104
+ _this.startlAuto();
105
+ _this.canceledOnTouch = false;
106
+ }
107
+ });
108
+
109
+ };
110
+
111
+ Autoplay.prototype.progress = function() {
112
+
113
+ var _this = this;
114
+ var _$progressBar;
115
+ var _$progress;
116
+
117
+ _this.$el.on('onBeforeSlide.lg.tm', function() {
118
+
119
+ // start progress bar animation
120
+ if (_this.core.s.progressBar && _this.fromAuto) {
121
+ _$progressBar = _this.core.$outer.find('.lg-progress-bar');
122
+ _$progress = _this.core.$outer.find('.lg-progress');
123
+ if (_this.interval) {
124
+ _$progress.removeAttr('style');
125
+ _$progressBar.removeClass('lg-start');
126
+ setTimeout(function() {
127
+ _$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
128
+ _$progressBar.addClass('lg-start');
129
+ }, 20);
130
+ }
131
+ }
132
+
133
+ // Remove setinterval if slide is triggered manually and fourceautoplay is false
134
+ if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
135
+ _this.cancelAuto();
136
+ }
137
+
138
+ _this.fromAuto = false;
139
+
140
+ });
141
+ };
142
+
143
+ // Manage autoplay via play/stop buttons
144
+ Autoplay.prototype.controls = function() {
145
+ var _this = this;
146
+ var _html = '<span class="lg-autoplay-button lg-icon"></span>';
147
+
148
+ // Append autoplay controls
149
+ $(this.core.s.appendAutoplayControlsTo).append(_html);
150
+
151
+ _this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
152
+ if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
153
+ _this.cancelAuto();
154
+ _this.core.s.fourceAutoplay = false;
155
+ } else {
156
+ if (!_this.interval) {
157
+ _this.startlAuto();
158
+ _this.core.s.fourceAutoplay = _this.fourceAutoplayTemp;
159
+ }
160
+ }
161
+ });
162
+ };
163
+
164
+ // Autostart gallery
165
+ Autoplay.prototype.startlAuto = function() {
166
+ var _this = this;
167
+
168
+ _this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
169
+ _this.core.$outer.addClass('lg-show-autoplay');
170
+ _this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
171
+
172
+ _this.interval = setInterval(function() {
173
+ if (_this.core.index + 1 < _this.core.$items.length) {
174
+ _this.core.index++;
175
+ } else {
176
+ _this.core.index = 0;
177
+ }
178
+
179
+ _this.fromAuto = true;
180
+ _this.core.slide(_this.core.index, false, false);
181
+ }, _this.core.s.speed + _this.core.s.pause);
182
+ };
183
+
184
+ // cancel Autostart
185
+ Autoplay.prototype.cancelAuto = function() {
186
+ clearInterval(this.interval);
187
+ this.interval = false;
188
+ this.core.$outer.find('.lg-progress').removeAttr('style');
189
+ this.core.$outer.removeClass('lg-show-autoplay');
190
+ this.core.$outer.find('.lg-progress-bar').removeClass('lg-start');
191
+ };
192
+
193
+ Autoplay.prototype.destroy = function() {
194
+
195
+ this.cancelAuto();
196
+ this.core.$outer.find('.lg-progress-bar').remove();
197
+ };
198
+
199
+ $.fn.lightGallery.modules.autoplay = Autoplay;
200
+
201
+ })(jQuery, window, document);
202
+
203
+
204
+ }));
@@ -0,0 +1,4 @@
1
+ /*! lg-autoplay - v1.0.0 - 2016-09-20
2
+ * http://sachinchoolur.github.io/lightGallery
3
+ * Copyright (c) 2016 Sachin N; Licensed GPLv3 */
4
+ !function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){!function(a,b,c,d){"use strict";var e={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),!(this.core.$items.length<2)&&(this.core.s=a.extend({},e,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};f.prototype.init=function(){var a=this;a.core.s.autoplayControls&&a.controls(),a.core.s.progressBar&&a.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),a.progress(),a.core.s.autoplay&&a.startlAuto(),a.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){a.interval&&(a.cancelAuto(),a.canceledOnTouch=!0)}),a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!a.interval&&a.canceledOnTouch&&(a.startlAuto(),a.canceledOnTouch=!1)})},f.prototype.progress=function(){var a,b,c=this;c.$el.on("onBeforeSlide.lg.tm",function(){c.core.s.progressBar&&c.fromAuto&&(a=c.core.$outer.find(".lg-progress-bar"),b=c.core.$outer.find(".lg-progress"),c.interval&&(b.removeAttr("style"),a.removeClass("lg-start"),setTimeout(function(){b.css("transition","width "+(c.core.s.speed+c.core.s.pause)+"ms ease 0s"),a.addClass("lg-start")},20))),c.fromAuto||c.core.s.fourceAutoplay||c.cancelAuto(),c.fromAuto=!1})},f.prototype.controls=function(){var b=this,c='<span class="lg-autoplay-button lg-icon"></span>';a(this.core.s.appendAutoplayControlsTo).append(c),b.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){a(b.core.$outer).hasClass("lg-show-autoplay")?(b.cancelAuto(),b.core.s.fourceAutoplay=!1):b.interval||(b.startlAuto(),b.core.s.fourceAutoplay=b.fourceAutoplayTemp)})},f.prototype.startlAuto=function(){var a=this;a.core.$outer.find(".lg-progress").css("transition","width "+(a.core.s.speed+a.core.s.pause)+"ms ease 0s"),a.core.$outer.addClass("lg-show-autoplay"),a.core.$outer.find(".lg-progress-bar").addClass("lg-start"),a.interval=setInterval(function(){a.core.index+1<a.core.$items.length?a.core.index++:a.core.index=0,a.fromAuto=!0,a.core.slide(a.core.index,!1,!1)},a.core.s.speed+a.core.s.pause)},f.prototype.cancelAuto=function(){clearInterval(this.interval),this.interval=!1,this.core.$outer.find(".lg-progress").removeAttr("style"),this.core.$outer.removeClass("lg-show-autoplay"),this.core.$outer.find(".lg-progress-bar").removeClass("lg-start")},f.prototype.destroy=function(){this.cancelAuto(),this.core.$outer.find(".lg-progress-bar").remove()},a.fn.lightGallery.modules.autoplay=f}(jQuery,window,document)});
@@ -0,0 +1,116 @@
1
+ /*! lg-fullscreen - v1.0.0 - 2016-09-20
2
+ * http://sachinchoolur.github.io/lightGallery
3
+ * Copyright (c) 2016 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([], function () {
9
+ return (factory());
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();
16
+ } else {
17
+ factory();
18
+ }
19
+ }(this, function () {
20
+
21
+ (function($, window, document, undefined) {
22
+
23
+ 'use strict';
24
+
25
+ var defaults = {
26
+ fullScreen: true
27
+ };
28
+
29
+ var Fullscreen = function(element) {
30
+
31
+ // get lightGallery core plugin data
32
+ this.core = $(element).data('lightGallery');
33
+
34
+ this.$el = $(element);
35
+
36
+ // extend module defalut settings with lightGallery core settings
37
+ this.core.s = $.extend({}, defaults, this.core.s);
38
+
39
+ this.init();
40
+
41
+ return this;
42
+ };
43
+
44
+ Fullscreen.prototype.init = function() {
45
+ var fullScreen = '';
46
+ if (this.core.s.fullScreen) {
47
+
48
+ // check for fullscreen browser support
49
+ if (!document.fullscreenEnabled && !document.webkitFullscreenEnabled &&
50
+ !document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
51
+ return;
52
+ } else {
53
+ fullScreen = '<span class="lg-fullscreen lg-icon"></span>';
54
+ this.core.$outer.find('.lg-toolbar').append(fullScreen);
55
+ this.fullScreen();
56
+ }
57
+ }
58
+ };
59
+
60
+ Fullscreen.prototype.requestFullscreen = function() {
61
+ var el = document.documentElement;
62
+ if (el.requestFullscreen) {
63
+ el.requestFullscreen();
64
+ } else if (el.msRequestFullscreen) {
65
+ el.msRequestFullscreen();
66
+ } else if (el.mozRequestFullScreen) {
67
+ el.mozRequestFullScreen();
68
+ } else if (el.webkitRequestFullscreen) {
69
+ el.webkitRequestFullscreen();
70
+ }
71
+ };
72
+
73
+ Fullscreen.prototype.exitFullscreen = function() {
74
+ if (document.exitFullscreen) {
75
+ document.exitFullscreen();
76
+ } else if (document.msExitFullscreen) {
77
+ document.msExitFullscreen();
78
+ } else if (document.mozCancelFullScreen) {
79
+ document.mozCancelFullScreen();
80
+ } else if (document.webkitExitFullscreen) {
81
+ document.webkitExitFullscreen();
82
+ }
83
+ };
84
+
85
+ // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
86
+ Fullscreen.prototype.fullScreen = function() {
87
+ var _this = this;
88
+
89
+ $(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', function() {
90
+ _this.core.$outer.toggleClass('lg-fullscreen-on');
91
+ });
92
+
93
+ this.core.$outer.find('.lg-fullscreen').on('click.lg', function() {
94
+ if (!document.fullscreenElement &&
95
+ !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
96
+ _this.requestFullscreen();
97
+ } else {
98
+ _this.exitFullscreen();
99
+ }
100
+ });
101
+
102
+ };
103
+
104
+ Fullscreen.prototype.destroy = function() {
105
+
106
+ // exit from fullscreen if activated
107
+ this.exitFullscreen();
108
+
109
+ $(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
110
+ };
111
+
112
+ $.fn.lightGallery.modules.fullscreen = Fullscreen;
113
+
114
+ })(jQuery, window, document);
115
+
116
+ }));
@@ -0,0 +1,4 @@
1
+ /*! lg-fullscreen - v1.0.0 - 2016-09-20
2
+ * http://sachinchoolur.github.io/lightGallery
3
+ * Copyright (c) 2016 Sachin N; Licensed GPLv3 */
4
+ !function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){!function(a,b,c,d){"use strict";var e={fullScreen:!0},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.init(),this};f.prototype.init=function(){var a="";if(this.core.s.fullScreen){if(!(c.fullscreenEnabled||c.webkitFullscreenEnabled||c.mozFullScreenEnabled||c.msFullscreenEnabled))return;a='<span class="lg-fullscreen lg-icon"></span>',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},f.prototype.requestFullscreen=function(){var a=c.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},f.prototype.exitFullscreen=function(){c.exitFullscreen?c.exitFullscreen():c.msExitFullscreen?c.msExitFullscreen():c.mozCancelFullScreen?c.mozCancelFullScreen():c.webkitExitFullscreen&&c.webkitExitFullscreen()},f.prototype.fullScreen=function(){var b=this;a(c).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){b.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement||c.msFullscreenElement?b.exitFullscreen():b.requestFullscreen()})},f.prototype.destroy=function(){this.exitFullscreen(),a(c).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=f}(jQuery,window,document)});
@@ -0,0 +1,93 @@
1
+ /*! lg-hash - v1.0.0 - 2016-09-20
2
+ * http://sachinchoolur.github.io/lightGallery
3
+ * Copyright (c) 2016 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([], function () {
9
+ return (factory());
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();
16
+ } else {
17
+ factory();
18
+ }
19
+ }(this, function () {
20
+
21
+ (function($, window, document, undefined) {
22
+
23
+ 'use strict';
24
+
25
+ var defaults = {
26
+ hash: true
27
+ };
28
+
29
+ var Hash = function(element) {
30
+
31
+ this.core = $(element).data('lightGallery');
32
+
33
+ this.core.s = $.extend({}, defaults, this.core.s);
34
+
35
+ if (this.core.s.hash) {
36
+ this.oldHash = window.location.hash;
37
+ this.init();
38
+ }
39
+
40
+ return this;
41
+ };
42
+
43
+ Hash.prototype.init = function() {
44
+ var _this = this;
45
+ var _hash;
46
+
47
+ // Change hash value on after each slide transition
48
+ _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
49
+ window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
50
+ });
51
+
52
+ // Listen hash change and change the slide according to slide value
53
+ $(window).on('hashchange.lg.hash', function() {
54
+ _hash = window.location.hash;
55
+ var _idx = parseInt(_hash.split('&slide=')[1], 10);
56
+
57
+ // it galleryId doesn't exist in the url close the gallery
58
+ if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
59
+ _this.core.slide(_idx, false, false);
60
+ } else if (_this.core.lGalleryOn) {
61
+ _this.core.destroy();
62
+ }
63
+
64
+ });
65
+ };
66
+
67
+ Hash.prototype.destroy = function() {
68
+
69
+ if (!this.core.s.hash) {
70
+ return;
71
+ }
72
+
73
+ // Reset to old hash value
74
+ if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
75
+ window.location.hash = this.oldHash;
76
+ } else {
77
+ if (history.pushState) {
78
+ history.pushState('', document.title, window.location.pathname + window.location.search);
79
+ } else {
80
+ window.location.hash = '';
81
+ }
82
+ }
83
+
84
+ this.core.$el.off('.lg.hash');
85
+
86
+ };
87
+
88
+ $.fn.lightGallery.modules.hash = Hash;
89
+
90
+ })(jQuery, window, document);
91
+
92
+
93
+ }));
@@ -0,0 +1,4 @@
1
+ /*! lg-hash - v1.0.0 - 2016-09-20
2
+ * http://sachinchoolur.github.io/lightGallery
3
+ * Copyright (c) 2016 Sachin N; Licensed GPLv3 */
4
+ !function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){!function(a,b,c,d){"use strict";var e={hash:!0},f=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},e,this.core.s),this.core.s.hash&&(this.oldHash=b.location.hash,this.init()),this};f.prototype.init=function(){var c,d=this;d.core.$el.on("onAfterSlide.lg.tm",function(a,c,e){b.location.hash="lg="+d.core.s.galleryId+"&slide="+e}),a(b).on("hashchange.lg.hash",function(){c=b.location.hash;var a=parseInt(c.split("&slide=")[1],10);c.indexOf("lg="+d.core.s.galleryId)>-1?d.core.slide(a,!1,!1):d.core.lGalleryOn&&d.core.destroy()})},f.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?b.location.hash=this.oldHash:history.pushState?history.pushState("",c.title,b.location.pathname+b.location.search):b.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightGallery.modules.hash=f}(jQuery,window,document)});
@@ -0,0 +1,105 @@
1
+ /*! lg-pager - v1.0.0 - 2016-09-20
2
+ * http://sachinchoolur.github.io/lightGallery
3
+ * Copyright (c) 2016 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([], function () {
9
+ return (factory());
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();
16
+ } else {
17
+ factory();
18
+ }
19
+ }(this, function () {
20
+
21
+ (function($, window, document, undefined) {
22
+
23
+ 'use strict';
24
+
25
+ var defaults = {
26
+ pager: false
27
+ };
28
+
29
+ var Pager = function(element) {
30
+
31
+ this.core = $(element).data('lightGallery');
32
+
33
+ this.$el = $(element);
34
+ this.core.s = $.extend({}, defaults, this.core.s);
35
+ if (this.core.s.pager && this.core.$items.length > 1) {
36
+ this.init();
37
+ }
38
+
39
+ return this;
40
+ };
41
+
42
+ Pager.prototype.init = function() {
43
+ var _this = this;
44
+ var pagerList = '';
45
+ var $pagerCont;
46
+ var $pagerOuter;
47
+ var timeout;
48
+
49
+ _this.core.$outer.find('.lg').append('<div class="lg-pager-outer"></div>');
50
+
51
+ if (_this.core.s.dynamic) {
52
+ for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
53
+ pagerList += '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + _this.core.s.dynamicEl[i].thumb + '" /></div></span>';
54
+ }
55
+ } else {
56
+ _this.core.$items.each(function() {
57
+
58
+ if (!_this.core.s.exThumbImage) {
59
+ pagerList += '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + $(this).find('img').attr('src') + '" /></div></span>';
60
+ } else {
61
+ pagerList += '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + $(this).attr(_this.core.s.exThumbImage) + '" /></div></span>';
62
+ }
63
+
64
+ });
65
+ }
66
+
67
+ $pagerOuter = _this.core.$outer.find('.lg-pager-outer');
68
+
69
+ $pagerOuter.html(pagerList);
70
+
71
+ $pagerCont = _this.core.$outer.find('.lg-pager-cont');
72
+ $pagerCont.on('click.lg touchend.lg', function() {
73
+ var _$this = $(this);
74
+ _this.core.index = _$this.index();
75
+ _this.core.slide(_this.core.index, false, false);
76
+ });
77
+
78
+ $pagerOuter.on('mouseover.lg', function() {
79
+ clearTimeout(timeout);
80
+ $pagerOuter.addClass('lg-pager-hover');
81
+ });
82
+
83
+ $pagerOuter.on('mouseout.lg', function() {
84
+ timeout = setTimeout(function() {
85
+ $pagerOuter.removeClass('lg-pager-hover');
86
+ });
87
+ });
88
+
89
+ _this.core.$el.on('onBeforeSlide.lg.tm', function(e, prevIndex, index) {
90
+ $pagerCont.removeClass('lg-pager-active');
91
+ $pagerCont.eq(index).addClass('lg-pager-active');
92
+ });
93
+
94
+ };
95
+
96
+ Pager.prototype.destroy = function() {
97
+
98
+ };
99
+
100
+ $.fn.lightGallery.modules.pager = Pager;
101
+
102
+ })(jQuery, window, document);
103
+
104
+
105
+ }));