Update js
-jquery -lightgallery
This commit is contained in:
@@ -1,191 +1,206 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
/**
|
||||
* Autoplay Plugin
|
||||
* @version 1.2.0
|
||||
* @author Sachin N - @sachinchoolur
|
||||
* @license MIT License (MIT)
|
||||
*/
|
||||
|
||||
(function($, window, document, undefined) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
autoplay: false,
|
||||
pause: 5000,
|
||||
progressBar: true,
|
||||
fourceAutoplay: false,
|
||||
autoplayControls: true,
|
||||
appendAutoplayControlsTo: '.lg-toolbar'
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates the autoplay plugin.
|
||||
* @param {object} element - lightGallery element
|
||||
*/
|
||||
var Autoplay = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
|
||||
// Execute only if items are above 1
|
||||
if (this.core.$items.length < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
this.interval = false;
|
||||
|
||||
// Identify if slide happened from autoplay
|
||||
this.fromAuto = true;
|
||||
|
||||
// Identify if autoplay canceled from touch/drag
|
||||
this.canceledOnTouch = false;
|
||||
|
||||
// save fourceautoplay value
|
||||
this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
|
||||
|
||||
// do not allow progress bar if browser does not support css3 transitions
|
||||
if (!this.core.doCss()) {
|
||||
this.core.s.progressBar = false;
|
||||
}
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Autoplay.prototype.init = function() {
|
||||
var _this = this;
|
||||
|
||||
// append autoplay controls
|
||||
if (_this.core.s.autoplayControls) {
|
||||
_this.controls();
|
||||
}
|
||||
|
||||
// Create progress bar
|
||||
if (_this.core.s.progressBar) {
|
||||
_this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>');
|
||||
}
|
||||
|
||||
// set progress
|
||||
_this.progress();
|
||||
|
||||
// Start autoplay
|
||||
if (_this.core.s.autoplay) {
|
||||
_this.startlAuto();
|
||||
}
|
||||
|
||||
// cancel interval on touchstart and dragstart
|
||||
_this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
|
||||
if (_this.interval) {
|
||||
_this.cancelAuto();
|
||||
_this.canceledOnTouch = true;
|
||||
}
|
||||
});
|
||||
|
||||
// restore autoplay if autoplay canceled from touchstart / dragstart
|
||||
_this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
|
||||
if (!_this.interval && _this.canceledOnTouch) {
|
||||
_this.startlAuto();
|
||||
_this.canceledOnTouch = false;
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Autoplay.prototype.progress = function() {
|
||||
|
||||
var _this = this;
|
||||
var _$progressBar;
|
||||
var _$progress;
|
||||
|
||||
_this.$el.on('onBeforeSlide.lg.tm', function() {
|
||||
|
||||
// start progress bar animation
|
||||
if (_this.core.s.progressBar && _this.fromAuto) {
|
||||
_$progressBar = _this.core.$outer.find('.lg-progress-bar');
|
||||
_$progress = _this.core.$outer.find('.lg-progress');
|
||||
if (_this.interval) {
|
||||
_$progress.removeAttr('style');
|
||||
_$progressBar.removeClass('lg-start');
|
||||
setTimeout(function() {
|
||||
_$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
|
||||
_$progressBar.addClass('lg-start');
|
||||
}, 20);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove setinterval if slide is triggered manually and fourceautoplay is false
|
||||
if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
|
||||
_this.cancelAuto();
|
||||
}
|
||||
|
||||
_this.fromAuto = false;
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
// Manage autoplay via play/stop buttons
|
||||
Autoplay.prototype.controls = function() {
|
||||
var _this = this;
|
||||
var _html = '<span class="lg-autoplay-button lg-icon"></span>';
|
||||
|
||||
// Append autoplay controls
|
||||
$(this.core.s.appendAutoplayControlsTo).append(_html);
|
||||
|
||||
_this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
|
||||
if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
|
||||
_this.cancelAuto();
|
||||
_this.core.s.fourceAutoplay = false;
|
||||
} else {
|
||||
if (!_this.interval) {
|
||||
_this.startlAuto();
|
||||
_this.core.s.fourceAutoplay = _this.fourceAutoplayTemp;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Autostart gallery
|
||||
Autoplay.prototype.startlAuto = function() {
|
||||
var _this = this;
|
||||
|
||||
_this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
|
||||
_this.core.$outer.addClass('lg-show-autoplay');
|
||||
_this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
|
||||
|
||||
_this.interval = setInterval(function() {
|
||||
if (_this.core.index + 1 < _this.core.$items.length) {
|
||||
_this.core.index = _this.core.index;
|
||||
} else {
|
||||
_this.core.index = -1;
|
||||
}
|
||||
|
||||
_this.core.index++;
|
||||
_this.fromAuto = true;
|
||||
_this.core.slide(_this.core.index, false, false);
|
||||
}, _this.core.s.speed + _this.core.s.pause);
|
||||
};
|
||||
|
||||
// cancel Autostart
|
||||
Autoplay.prototype.cancelAuto = function() {
|
||||
clearInterval(this.interval);
|
||||
this.interval = false;
|
||||
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');
|
||||
};
|
||||
|
||||
Autoplay.prototype.destroy = function() {
|
||||
|
||||
this.cancelAuto();
|
||||
this.core.$outer.find('.lg-progress-bar').remove();
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.autoplay = Autoplay;
|
||||
|
||||
})(jQuery, window, document);
|
||||
/*! lg-autoplay - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
autoplay: false,
|
||||
pause: 5000,
|
||||
progressBar: true,
|
||||
fourceAutoplay: false,
|
||||
autoplayControls: true,
|
||||
appendAutoplayControlsTo: '.lg-toolbar'
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates the autoplay plugin.
|
||||
* @param {object} element - lightGallery element
|
||||
*/
|
||||
var Autoplay = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
|
||||
// Execute only if items are above 1
|
||||
if (this.core.$items.length < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
this.interval = false;
|
||||
|
||||
// Identify if slide happened from autoplay
|
||||
this.fromAuto = true;
|
||||
|
||||
// Identify if autoplay canceled from touch/drag
|
||||
this.canceledOnTouch = false;
|
||||
|
||||
// save fourceautoplay value
|
||||
this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
|
||||
|
||||
// do not allow progress bar if browser does not support css3 transitions
|
||||
if (!this.core.doCss()) {
|
||||
this.core.s.progressBar = false;
|
||||
}
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Autoplay.prototype.init = function() {
|
||||
var _this = this;
|
||||
|
||||
// append autoplay controls
|
||||
if (_this.core.s.autoplayControls) {
|
||||
_this.controls();
|
||||
}
|
||||
|
||||
// Create progress bar
|
||||
if (_this.core.s.progressBar) {
|
||||
_this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>');
|
||||
}
|
||||
|
||||
// set progress
|
||||
_this.progress();
|
||||
|
||||
// Start autoplay
|
||||
if (_this.core.s.autoplay) {
|
||||
_this.$el.one('onSlideItemLoad.lg.tm', function() {
|
||||
_this.startlAuto();
|
||||
});
|
||||
}
|
||||
|
||||
// cancel interval on touchstart and dragstart
|
||||
_this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
|
||||
if (_this.interval) {
|
||||
_this.cancelAuto();
|
||||
_this.canceledOnTouch = true;
|
||||
}
|
||||
});
|
||||
|
||||
// restore autoplay if autoplay canceled from touchstart / dragstart
|
||||
_this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
|
||||
if (!_this.interval && _this.canceledOnTouch) {
|
||||
_this.startlAuto();
|
||||
_this.canceledOnTouch = false;
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Autoplay.prototype.progress = function() {
|
||||
|
||||
var _this = this;
|
||||
var _$progressBar;
|
||||
var _$progress;
|
||||
|
||||
_this.$el.on('onBeforeSlide.lg.tm', function() {
|
||||
|
||||
// start progress bar animation
|
||||
if (_this.core.s.progressBar && _this.fromAuto) {
|
||||
_$progressBar = _this.core.$outer.find('.lg-progress-bar');
|
||||
_$progress = _this.core.$outer.find('.lg-progress');
|
||||
if (_this.interval) {
|
||||
_$progress.removeAttr('style');
|
||||
_$progressBar.removeClass('lg-start');
|
||||
setTimeout(function() {
|
||||
_$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
|
||||
_$progressBar.addClass('lg-start');
|
||||
}, 20);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove setinterval if slide is triggered manually and fourceautoplay is false
|
||||
if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
|
||||
_this.cancelAuto();
|
||||
}
|
||||
|
||||
_this.fromAuto = false;
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
// Manage autoplay via play/stop buttons
|
||||
Autoplay.prototype.controls = function() {
|
||||
var _this = this;
|
||||
var _html = '<button type="button" aria-label="Toggle autoplay" class="lg-autoplay-button lg-icon"></button>';
|
||||
|
||||
// Append autoplay controls
|
||||
$(this.core.s.appendAutoplayControlsTo).append(_html);
|
||||
|
||||
_this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
|
||||
if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
|
||||
_this.cancelAuto();
|
||||
_this.core.s.fourceAutoplay = false;
|
||||
} else {
|
||||
if (!_this.interval) {
|
||||
_this.startlAuto();
|
||||
_this.core.s.fourceAutoplay = _this.fourceAutoplayTemp;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Autostart gallery
|
||||
Autoplay.prototype.startlAuto = function() {
|
||||
var _this = this;
|
||||
|
||||
_this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
|
||||
_this.core.$outer.addClass('lg-show-autoplay');
|
||||
_this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
|
||||
|
||||
_this.interval = setInterval(function() {
|
||||
if (_this.core.index + 1 < _this.core.$items.length) {
|
||||
_this.core.index++;
|
||||
} else {
|
||||
_this.core.index = 0;
|
||||
}
|
||||
|
||||
_this.fromAuto = true;
|
||||
_this.core.slide(_this.core.index, false, false, 'next');
|
||||
}, _this.core.s.speed + _this.core.s.pause);
|
||||
};
|
||||
|
||||
// cancel Autostart
|
||||
Autoplay.prototype.cancelAuto = function() {
|
||||
clearInterval(this.interval);
|
||||
this.interval = false;
|
||||
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');
|
||||
};
|
||||
|
||||
Autoplay.prototype.destroy = function() {
|
||||
|
||||
this.cancelAuto();
|
||||
this.core.$outer.find('.lg-progress-bar').remove();
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.autoplay = Autoplay;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!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?!1:(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:a.core.index=-1,a.core.index++,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);
|
||||
/*! lg-autoplay - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";var b={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),!(this.core.$items.length<2)&&(this.core.s=a.extend({},b,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)};c.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.$el.one("onSlideItemLoad.lg.tm",function(){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)})},c.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})},c.prototype.controls=function(){var b=this;a(this.core.s.appendAutoplayControlsTo).append('<button type="button" aria-label="Toggle autoplay" class="lg-autoplay-button lg-icon"></button>'),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)})},c.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,"next")},a.core.s.speed+a.core.s.pause)},c.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")},c.prototype.destroy=function(){this.cancelAuto(),this.core.$outer.find(".lg-progress-bar").remove()},a.fn.lightGallery.modules.autoplay=c}()});
|
||||
@@ -1,97 +1,126 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
fullScreen: true
|
||||
};
|
||||
|
||||
var Fullscreen = function(element) {
|
||||
|
||||
// get lightGallery core plugin data
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
|
||||
// extend module defalut settings with lightGallery core settings
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Fullscreen.prototype.init = function() {
|
||||
var fullScreen = '';
|
||||
if (this.core.s.fullScreen) {
|
||||
|
||||
// check for fullscreen browser support
|
||||
if (!document.fullscreenEnabled && !document.webkitFullscreenEnabled &&
|
||||
!document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
|
||||
return;
|
||||
} else {
|
||||
fullScreen = '<span class="lg-fullscreen lg-icon"></span>';
|
||||
this.core.$outer.find('.lg-toolbar').append(fullScreen);
|
||||
this.fullScreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Fullscreen.prototype.requestFullscreen = function() {
|
||||
var el = document.documentElement;
|
||||
if (el.requestFullscreen) {
|
||||
el.requestFullscreen();
|
||||
} else if (el.msRequestFullscreen) {
|
||||
el.msRequestFullscreen();
|
||||
} else if (el.mozRequestFullScreen) {
|
||||
el.mozRequestFullScreen();
|
||||
} else if (el.webkitRequestFullscreen) {
|
||||
el.webkitRequestFullscreen();
|
||||
}
|
||||
};
|
||||
|
||||
Fullscreen.prototype.exitFullscreen = function() {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
};
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
|
||||
Fullscreen.prototype.fullScreen = function() {
|
||||
var _this = this;
|
||||
|
||||
$(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', function() {
|
||||
_this.core.$outer.toggleClass('lg-fullscreen-on');
|
||||
});
|
||||
|
||||
this.core.$outer.find('.lg-fullscreen').on('click.lg', function() {
|
||||
if (!document.fullscreenElement &&
|
||||
!document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
|
||||
_this.requestFullscreen();
|
||||
} else {
|
||||
_this.exitFullscreen();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Fullscreen.prototype.destroy = function() {
|
||||
|
||||
// exit from fullscreen if activated
|
||||
this.exitFullscreen();
|
||||
|
||||
$(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.fullscreen = Fullscreen;
|
||||
|
||||
})(jQuery, window, document);
|
||||
/*! lg-fullscreen - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
fullScreen: true
|
||||
};
|
||||
|
||||
function isFullScreen() {
|
||||
return (
|
||||
document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.msFullscreenElement
|
||||
);
|
||||
}
|
||||
|
||||
var Fullscreen = function(element) {
|
||||
|
||||
// get lightGallery core plugin data
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
|
||||
// extend module defalut settings with lightGallery core settings
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Fullscreen.prototype.init = function() {
|
||||
var fullScreen = '';
|
||||
if (this.core.s.fullScreen) {
|
||||
|
||||
// check for fullscreen browser support
|
||||
if (!document.fullscreenEnabled && !document.webkitFullscreenEnabled &&
|
||||
!document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
|
||||
return;
|
||||
} else {
|
||||
fullScreen = '<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>';
|
||||
this.core.$outer.find('.lg-toolbar').append(fullScreen);
|
||||
this.fullScreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Fullscreen.prototype.requestFullscreen = function() {
|
||||
var el = document.documentElement;
|
||||
if (el.requestFullscreen) {
|
||||
el.requestFullscreen();
|
||||
} else if (el.msRequestFullscreen) {
|
||||
el.msRequestFullscreen();
|
||||
} else if (el.mozRequestFullScreen) {
|
||||
el.mozRequestFullScreen();
|
||||
} else if (el.webkitRequestFullscreen) {
|
||||
el.webkitRequestFullscreen();
|
||||
}
|
||||
};
|
||||
|
||||
Fullscreen.prototype.exitFullscreen = function() {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
};
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
|
||||
Fullscreen.prototype.fullScreen = function() {
|
||||
var _this = this;
|
||||
|
||||
$(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', function() {
|
||||
_this.core.$outer.toggleClass('lg-fullscreen-on');
|
||||
});
|
||||
|
||||
this.core.$outer.find('.lg-fullscreen').on('click.lg', function() {
|
||||
if (isFullScreen()) {
|
||||
_this.exitFullscreen();
|
||||
} else {
|
||||
_this.requestFullscreen();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Fullscreen.prototype.destroy = function() {
|
||||
|
||||
// exit from fullscreen if activated
|
||||
if(isFullScreen()) {
|
||||
this.exitFullscreen();
|
||||
}
|
||||
|
||||
$(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.fullscreen = Fullscreen;
|
||||
|
||||
})();
|
||||
|
||||
}));
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!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);
|
||||
/*! lg-fullscreen - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}var c={fullScreen:!0},d=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},c,this.core.s),this.init(),this};d.prototype.init=function(){var a="";if(this.core.s.fullScreen){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))return;a='<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},d.prototype.requestFullscreen=function(){var a=document.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},d.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},d.prototype.fullScreen=function(){var c=this;a(document).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){c.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){b()?c.exitFullscreen():c.requestFullscreen()})},d.prototype.destroy=function(){b()&&this.exitFullscreen(),a(document).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=d}()});
|
||||
@@ -1,67 +1,101 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
hash: true
|
||||
};
|
||||
|
||||
var Hash = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
|
||||
if (this.core.s.hash) {
|
||||
this.oldHash = window.location.hash;
|
||||
this.init();
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Hash.prototype.init = function() {
|
||||
var _this = this;
|
||||
var _hash;
|
||||
|
||||
// Change hash value on after each slide transition
|
||||
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
|
||||
window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
|
||||
});
|
||||
|
||||
// Listen hash change and change the slide according to slide value
|
||||
$(window).on('hashchange', function() {
|
||||
_hash = window.location.hash;
|
||||
var _idx = parseInt(_hash.split('&slide=')[1], 10);
|
||||
|
||||
// it galleryId doesn't exist in the url close the gallery
|
||||
if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
|
||||
_this.core.slide(_idx);
|
||||
} else if (_this.core.lGalleryOn) {
|
||||
_this.core.destroy();
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
Hash.prototype.destroy = function() {
|
||||
|
||||
// Reset to old hash value
|
||||
if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
|
||||
window.location.hash = this.oldHash;
|
||||
} else {
|
||||
if (history.pushState) {
|
||||
history.pushState('', document.title, window.location.pathname + window.location.search);
|
||||
} else {
|
||||
window.location.hash = '';
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.hash = Hash;
|
||||
|
||||
})(jQuery, window, document);
|
||||
/*! lg-hash - v1.0.4 - 2017-12-20
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
hash: true
|
||||
};
|
||||
|
||||
var Hash = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
|
||||
if (this.core.s.hash) {
|
||||
this.oldHash = window.location.hash;
|
||||
this.init();
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Hash.prototype.init = function() {
|
||||
var _this = this;
|
||||
var _hash;
|
||||
|
||||
// Change hash value on after each slide transition
|
||||
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
|
||||
if (history.replaceState) {
|
||||
history.replaceState(null, null, window.location.pathname + window.location.search + '#lg=' + _this.core.s.galleryId + '&slide=' + index);
|
||||
} else {
|
||||
window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
|
||||
}
|
||||
});
|
||||
|
||||
// Listen hash change and change the slide according to slide value
|
||||
$(window).on('hashchange.lg.hash', function() {
|
||||
_hash = window.location.hash;
|
||||
var _idx = parseInt(_hash.split('&slide=')[1], 10);
|
||||
|
||||
// it galleryId doesn't exist in the url close the gallery
|
||||
if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
|
||||
_this.core.slide(_idx, false, false);
|
||||
} else if (_this.core.lGalleryOn) {
|
||||
_this.core.destroy();
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
Hash.prototype.destroy = function() {
|
||||
|
||||
if (!this.core.s.hash) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset to old hash value
|
||||
if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
|
||||
if (history.replaceState) {
|
||||
history.replaceState(null, null, this.oldHash);
|
||||
} else {
|
||||
window.location.hash = this.oldHash;
|
||||
}
|
||||
} else {
|
||||
if (history.replaceState) {
|
||||
history.replaceState(null, document.title, window.location.pathname + window.location.search);
|
||||
} else {
|
||||
window.location.hash = '';
|
||||
}
|
||||
}
|
||||
|
||||
this.core.$el.off('.lg.hash');
|
||||
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.hash = Hash;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!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",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):d.core.lGalleryOn&&d.core.destroy()})},f.prototype.destroy=function(){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=""},a.fn.lightGallery.modules.hash=f}(jQuery,window,document);
|
||||
/*! lg-hash - v1.0.4 - 2017-12-20
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
!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={hash:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.hash&&(this.oldHash=window.location.hash,this.init()),this};c.prototype.init=function(){var b,c=this;c.core.$el.on("onAfterSlide.lg.tm",function(a,b,d){history.replaceState?history.replaceState(null,null,window.location.pathname+window.location.search+"#lg="+c.core.s.galleryId+"&slide="+d):window.location.hash="lg="+c.core.s.galleryId+"&slide="+d}),a(window).on("hashchange.lg.hash",function(){b=window.location.hash;var a=parseInt(b.split("&slide=")[1],10);b.indexOf("lg="+c.core.s.galleryId)>-1?c.core.slide(a,!1,!1):c.core.lGalleryOn&&c.core.destroy()})},c.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?history.replaceState?history.replaceState(null,null,this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightGallery.modules.hash=c}()});
|
||||
@@ -1,85 +1,105 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
pager: false
|
||||
};
|
||||
|
||||
var Pager = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
if (this.core.s.pager && this.core.$items.length > 1) {
|
||||
this.init();
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Pager.prototype.init = function() {
|
||||
var _this = this;
|
||||
var pagerList = '';
|
||||
var $pagerCont;
|
||||
var $pagerOuter;
|
||||
var timeout;
|
||||
|
||||
_this.core.$outer.find('.lg').append('<div class="lg-pager-outer"></div>');
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
|
||||
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>';
|
||||
}
|
||||
} else {
|
||||
_this.core.$items.each(function() {
|
||||
|
||||
if (!_this.core.s.exThumbImage) {
|
||||
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>';
|
||||
} else {
|
||||
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>';
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$pagerOuter = _this.core.$outer.find('.lg-pager-outer');
|
||||
|
||||
$pagerOuter.html(pagerList);
|
||||
|
||||
$pagerCont = _this.core.$outer.find('.lg-pager-cont');
|
||||
$pagerCont.on('click.lg touchend.lg', function() {
|
||||
var _$this = $(this);
|
||||
_this.core.index = _$this.index();
|
||||
_this.core.slide(_this.core.index, false, false);
|
||||
});
|
||||
|
||||
$pagerOuter.on('mouseover.lg', function() {
|
||||
clearTimeout(timeout);
|
||||
$pagerOuter.addClass('lg-pager-hover');
|
||||
});
|
||||
|
||||
$pagerOuter.on('mouseout.lg', function() {
|
||||
timeout = setTimeout(function() {
|
||||
$pagerOuter.removeClass('lg-pager-hover');
|
||||
});
|
||||
});
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function(e, prevIndex, index) {
|
||||
$pagerCont.removeClass('lg-pager-active');
|
||||
$pagerCont.eq(index).addClass('lg-pager-active');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Pager.prototype.destroy = function() {
|
||||
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.pager = Pager;
|
||||
|
||||
})(jQuery, window, document);
|
||||
/*! lg-pager - v1.0.2 - 2017-01-22
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
pager: false
|
||||
};
|
||||
|
||||
var Pager = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
if (this.core.s.pager && this.core.$items.length > 1) {
|
||||
this.init();
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Pager.prototype.init = function() {
|
||||
var _this = this;
|
||||
var pagerList = '';
|
||||
var $pagerCont;
|
||||
var $pagerOuter;
|
||||
var timeout;
|
||||
|
||||
_this.core.$outer.find('.lg').append('<div class="lg-pager-outer"></div>');
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
|
||||
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>';
|
||||
}
|
||||
} else {
|
||||
_this.core.$items.each(function() {
|
||||
|
||||
if (!_this.core.s.exThumbImage) {
|
||||
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>';
|
||||
} else {
|
||||
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>';
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$pagerOuter = _this.core.$outer.find('.lg-pager-outer');
|
||||
|
||||
$pagerOuter.html(pagerList);
|
||||
|
||||
$pagerCont = _this.core.$outer.find('.lg-pager-cont');
|
||||
$pagerCont.on('click.lg touchend.lg', function() {
|
||||
var _$this = $(this);
|
||||
_this.core.index = _$this.index();
|
||||
_this.core.slide(_this.core.index, false, true, false);
|
||||
});
|
||||
|
||||
$pagerOuter.on('mouseover.lg', function() {
|
||||
clearTimeout(timeout);
|
||||
$pagerOuter.addClass('lg-pager-hover');
|
||||
});
|
||||
|
||||
$pagerOuter.on('mouseout.lg', function() {
|
||||
timeout = setTimeout(function() {
|
||||
$pagerOuter.removeClass('lg-pager-hover');
|
||||
});
|
||||
});
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function(e, prevIndex, index) {
|
||||
$pagerCont.removeClass('lg-pager-active');
|
||||
$pagerCont.eq(index).addClass('lg-pager-active');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Pager.prototype.destroy = function() {
|
||||
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.pager = Pager;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!function(a,b,c,d){"use strict";var e={pager:!1},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};f.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'),e.core.s.dynamic)for(var g=0;g<e.core.s.dynamicEl.length;g++)f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e.core.s.dynamicEl[g].thumb+'" /></div></span>';else e.core.$items.each(function(){f+=e.core.s.exThumbImage?'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).attr(e.core.s.exThumbImage)+'" /></div></span>':'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).find("img").attr("src")+'" /></div></span>'});c=e.core.$outer.find(".lg-pager-outer"),c.html(f),b=e.core.$outer.find(".lg-pager-cont"),b.on("click.lg touchend.lg",function(){var b=a(this);e.core.index=b.index(),e.core.slide(e.core.index,!1,!1)}),c.on("mouseover.lg",function(){clearTimeout(d),c.addClass("lg-pager-hover")}),c.on("mouseout.lg",function(){d=setTimeout(function(){c.removeClass("lg-pager-hover")})}),e.core.$el.on("onBeforeSlide.lg.tm",function(a,c,d){b.removeClass("lg-pager-active"),b.eq(d).addClass("lg-pager-active")})},f.prototype.destroy=function(){},a.fn.lightGallery.modules.pager=f}(jQuery,window,document);
|
||||
/*! lg-pager - v1.0.2 - 2017-01-22
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
!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={pager:!1},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),this.core.s=a.extend({},b,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};c.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'),e.core.s.dynamic)for(var g=0;g<e.core.s.dynamicEl.length;g++)f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e.core.s.dynamicEl[g].thumb+'" /></div></span>';else e.core.$items.each(function(){f+=e.core.s.exThumbImage?'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).attr(e.core.s.exThumbImage)+'" /></div></span>':'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).find("img").attr("src")+'" /></div></span>'});c=e.core.$outer.find(".lg-pager-outer"),c.html(f),b=e.core.$outer.find(".lg-pager-cont"),b.on("click.lg touchend.lg",function(){var b=a(this);e.core.index=b.index(),e.core.slide(e.core.index,!1,!0,!1)}),c.on("mouseover.lg",function(){clearTimeout(d),c.addClass("lg-pager-hover")}),c.on("mouseout.lg",function(){d=setTimeout(function(){c.removeClass("lg-pager-hover")})}),e.core.$el.on("onBeforeSlide.lg.tm",function(a,c,d){b.removeClass("lg-pager-active"),b.eq(d).addClass("lg-pager-active")})},c.prototype.destroy=function(){},a.fn.lightGallery.modules.pager=c}()});
|
||||
@@ -1,454 +1,478 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
thumbnail: true,
|
||||
|
||||
animateThumb: true,
|
||||
currentPagerPosition: 'middle',
|
||||
|
||||
thumbWidth: 100,
|
||||
thumbContHeight: 100,
|
||||
thumbMargin: 5,
|
||||
|
||||
exThumbImage: false,
|
||||
showThumbByDefault: true,
|
||||
toogleThumb: true,
|
||||
pullCaptionUp: true,
|
||||
|
||||
enableThumbDrag: true,
|
||||
enableThumbSwipe: true,
|
||||
swipeThreshold: 50,
|
||||
|
||||
loadYoutubeThumbnail: true,
|
||||
youtubeThumbSize: 1,
|
||||
|
||||
loadVimeoThumbnail: true,
|
||||
vimeoThumbSize: 'thumbnail_small',
|
||||
|
||||
loadDailymotionThumbnail: true
|
||||
};
|
||||
|
||||
var Thumbnail = function(element) {
|
||||
|
||||
// get lightGallery core plugin data
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
// extend module default settings with lightGallery core settings
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
|
||||
this.$el = $(element);
|
||||
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;
|
||||
|
||||
// Thumbnail animation value
|
||||
this.left = 0;
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Thumbnail.prototype.init = function() {
|
||||
var _this = this;
|
||||
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
||||
if (this.core.s.showThumbByDefault) {
|
||||
setTimeout(function(){
|
||||
_this.core.$outer.addClass('lg-thumb-open');
|
||||
}, 700);
|
||||
}
|
||||
|
||||
if (this.core.s.pullCaptionUp) {
|
||||
this.core.$outer.addClass('lg-pull-caption-up');
|
||||
}
|
||||
|
||||
this.build();
|
||||
if (this.core.s.animateThumb) {
|
||||
if (this.core.s.enableThumbDrag && !this.core.isTouch && this.core.doCss()) {
|
||||
this.enableThumbDrag();
|
||||
}
|
||||
|
||||
if (this.core.s.enableThumbSwipe && this.core.isTouch && this.core.doCss()) {
|
||||
this.enableThumbSwipe();
|
||||
}
|
||||
|
||||
this.thumbClickable = false;
|
||||
} else {
|
||||
this.thumbClickable = true;
|
||||
}
|
||||
|
||||
this.toogle();
|
||||
this.thumbkeyPress();
|
||||
}
|
||||
};
|
||||
|
||||
Thumbnail.prototype.build = function() {
|
||||
var _this = this;
|
||||
var thumbList = '';
|
||||
var vimeoErrorThumbSize = '';
|
||||
var $thumb;
|
||||
var html = '<div class="lg-thumb-outer">' +
|
||||
'<div class="lg-thumb group">' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
switch (this.core.s.vimeoThumbSize) {
|
||||
case 'thumbnail_large':
|
||||
vimeoErrorThumbSize = '640';
|
||||
break;
|
||||
case 'thumbnail_medium':
|
||||
vimeoErrorThumbSize = '200x150';
|
||||
break;
|
||||
case 'thumbnail_small':
|
||||
vimeoErrorThumbSize = '100x75';
|
||||
}
|
||||
|
||||
_this.core.$outer.addClass('lg-has-thumb');
|
||||
|
||||
_this.core.$outer.find('.lg').append(html);
|
||||
|
||||
_this.$thumbOuter = _this.core.$outer.find('.lg-thumb-outer');
|
||||
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
||||
|
||||
if (_this.core.s.animateThumb) {
|
||||
_this.core.$outer.find('.lg-thumb').css({
|
||||
width: _this.thumbTotalWidth + 'px',
|
||||
position: 'relative'
|
||||
});
|
||||
}
|
||||
|
||||
if (this.core.s.animateThumb) {
|
||||
_this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px');
|
||||
}
|
||||
|
||||
function getThumb(src, thumb, index) {
|
||||
var isVideo = _this.core.isVideo(src, index) || {};
|
||||
var thumbImg;
|
||||
var vimeoId = '';
|
||||
|
||||
if (isVideo.youtube || isVideo.vimeo || isVideo.dailymotion) {
|
||||
if (isVideo.youtube) {
|
||||
if (_this.core.s.loadYoutubeThumbnail) {
|
||||
thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
} else if (isVideo.vimeo) {
|
||||
if (_this.core.s.loadVimeoThumbnail) {
|
||||
thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
|
||||
vimeoId = isVideo.vimeo[1];
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
} else if (isVideo.dailymotion) {
|
||||
if (_this.core.s.loadDailymotionThumbnail) {
|
||||
thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
|
||||
thumbList += '<div data-vimeo-id="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
|
||||
vimeoId = '';
|
||||
}
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
|
||||
getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
|
||||
}
|
||||
} else {
|
||||
_this.core.$items.each(function(i) {
|
||||
|
||||
if (!_this.core.s.exThumbImage) {
|
||||
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).find('img').attr('src'), i);
|
||||
} else {
|
||||
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').html(thumbList);
|
||||
|
||||
$thumb = _this.core.$outer.find('.lg-thumb-item');
|
||||
|
||||
// Load vimeo thumbnails
|
||||
$thumb.each(function() {
|
||||
var $this = $(this);
|
||||
var vimeoVideoId = $this.attr('data-vimeo-id');
|
||||
|
||||
if (vimeoVideoId) {
|
||||
$.getJSON('http://www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
|
||||
format: 'json'
|
||||
}, function(data) {
|
||||
$this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// manage active class for thumbnail
|
||||
$thumb.eq(_this.core.index).addClass('active');
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
||||
$thumb.removeClass('active');
|
||||
$thumb.eq(_this.core.index).addClass('active');
|
||||
});
|
||||
|
||||
$thumb.on('click.lg touchend.lg', function() {
|
||||
var _$this = $(this);
|
||||
setTimeout(function() {
|
||||
|
||||
// In IE9 and bellow touch does not support
|
||||
// Go to slide if browser does not support css transitions
|
||||
if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) {
|
||||
_this.core.index = _$this.index();
|
||||
_this.core.slide(_this.core.index, false, true);
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
||||
_this.animateThumb(_this.core.index);
|
||||
});
|
||||
|
||||
$(window).on('resize.lg.thumb orientationchange.lg.thumb', function() {
|
||||
setTimeout(function() {
|
||||
_this.animateThumb(_this.core.index);
|
||||
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
||||
}, 200);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Thumbnail.prototype.setTranslate = function(value) {
|
||||
// jQuery supports Automatic CSS prefixing since jQuery 1.8.0
|
||||
this.core.$outer.find('.lg-thumb').css({
|
||||
transform: 'translate3d(-' + (value) + 'px, 0px, 0px)'
|
||||
});
|
||||
};
|
||||
|
||||
Thumbnail.prototype.animateThumb = function(index) {
|
||||
var $thumb = this.core.$outer.find('.lg-thumb');
|
||||
if (this.core.s.animateThumb) {
|
||||
var position;
|
||||
switch (this.core.s.currentPagerPosition) {
|
||||
case 'left':
|
||||
position = 0;
|
||||
break;
|
||||
case 'middle':
|
||||
position = (this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2);
|
||||
break;
|
||||
case 'right':
|
||||
position = this.thumbOuterWidth - this.core.s.thumbWidth;
|
||||
}
|
||||
this.left = ((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position;
|
||||
if (this.left > (this.thumbTotalWidth - this.thumbOuterWidth)) {
|
||||
this.left = this.thumbTotalWidth - this.thumbOuterWidth;
|
||||
}
|
||||
|
||||
if (this.left < 0) {
|
||||
this.left = 0;
|
||||
}
|
||||
|
||||
if (this.core.lGalleryOn) {
|
||||
if (!$thumb.hasClass('on')) {
|
||||
this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms');
|
||||
}
|
||||
|
||||
if (!this.core.doCss()) {
|
||||
$thumb.animate({
|
||||
left: -this.left + 'px'
|
||||
}, this.core.s.speed);
|
||||
}
|
||||
} else {
|
||||
if (!this.core.doCss()) {
|
||||
$thumb.css('left', -this.left + 'px');
|
||||
}
|
||||
}
|
||||
|
||||
this.setTranslate(this.left);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// Enable thumbnail dragging and swiping
|
||||
Thumbnail.prototype.enableThumbDrag = function() {
|
||||
|
||||
var _this = this;
|
||||
var startCoords = 0;
|
||||
var endCoords = 0;
|
||||
var isDraging = false;
|
||||
var isMoved = false;
|
||||
var tempLeft = 0;
|
||||
|
||||
_this.$thumbOuter.addClass('lg-grab');
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e) {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
// execute only on .lg-object
|
||||
e.preventDefault();
|
||||
startCoords = e.pageX;
|
||||
isDraging = true;
|
||||
|
||||
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
||||
_this.core.$outer.scrollLeft += 1;
|
||||
_this.core.$outer.scrollLeft -= 1;
|
||||
|
||||
// *
|
||||
_this.thumbClickable = false;
|
||||
_this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('mousemove.lg.thumb', function(e) {
|
||||
if (isDraging) {
|
||||
tempLeft = _this.left;
|
||||
isMoved = true;
|
||||
endCoords = e.pageX;
|
||||
|
||||
_this.$thumbOuter.addClass('lg-dragging');
|
||||
|
||||
tempLeft = tempLeft - (endCoords - startCoords);
|
||||
|
||||
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
||||
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
||||
}
|
||||
|
||||
if (tempLeft < 0) {
|
||||
tempLeft = 0;
|
||||
}
|
||||
|
||||
// move current slide
|
||||
_this.setTranslate(tempLeft);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('mouseup.lg.thumb', function() {
|
||||
if (isMoved) {
|
||||
isMoved = false;
|
||||
_this.$thumbOuter.removeClass('lg-dragging');
|
||||
|
||||
_this.left = tempLeft;
|
||||
|
||||
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
|
||||
if (isDraging) {
|
||||
isDraging = false;
|
||||
_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Thumbnail.prototype.enableThumbSwipe = function() {
|
||||
var _this = this;
|
||||
var startCoords = 0;
|
||||
var endCoords = 0;
|
||||
var isMoved = false;
|
||||
var tempLeft = 0;
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e) {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
e.preventDefault();
|
||||
startCoords = e.originalEvent.targetTouches[0].pageX;
|
||||
_this.thumbClickable = false;
|
||||
}
|
||||
});
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e) {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
e.preventDefault();
|
||||
endCoords = e.originalEvent.targetTouches[0].pageX;
|
||||
isMoved = true;
|
||||
|
||||
_this.$thumbOuter.addClass('lg-dragging');
|
||||
|
||||
tempLeft = _this.left;
|
||||
|
||||
tempLeft = tempLeft - (endCoords - startCoords);
|
||||
|
||||
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
||||
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
||||
}
|
||||
|
||||
if (tempLeft < 0) {
|
||||
tempLeft = 0;
|
||||
}
|
||||
|
||||
// move current slide
|
||||
_this.setTranslate(tempLeft);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('touchend.lg', function() {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
|
||||
if (isMoved) {
|
||||
isMoved = false;
|
||||
_this.$thumbOuter.removeClass('lg-dragging');
|
||||
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
|
||||
_this.left = tempLeft;
|
||||
} else {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
} else {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Thumbnail.prototype.toogle = function() {
|
||||
var _this = this;
|
||||
if (_this.core.s.toogleThumb) {
|
||||
_this.core.$outer.addClass('lg-can-toggle');
|
||||
_this.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>');
|
||||
_this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() {
|
||||
_this.core.$outer.toggleClass('lg-thumb-open');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Thumbnail.prototype.thumbkeyPress = function() {
|
||||
var _this = this;
|
||||
$(window).on('keydown.lg.thumb', function(e) {
|
||||
if (e.keyCode === 38) {
|
||||
e.preventDefault();
|
||||
_this.core.$outer.addClass('lg-thumb-open');
|
||||
} else if (e.keyCode === 40) {
|
||||
e.preventDefault();
|
||||
_this.core.$outer.removeClass('lg-thumb-open');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Thumbnail.prototype.destroy = function() {
|
||||
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
||||
$(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb');
|
||||
this.$thumbOuter.remove();
|
||||
this.core.$outer.removeClass('lg-has-thumb');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.Thumbnail = Thumbnail;
|
||||
|
||||
})(jQuery, window, document);
|
||||
/*! lg-thumbnail - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
thumbnail: true,
|
||||
|
||||
animateThumb: true,
|
||||
currentPagerPosition: 'middle',
|
||||
|
||||
thumbWidth: 100,
|
||||
thumbHeight: '80px',
|
||||
thumbContHeight: 100,
|
||||
thumbMargin: 5,
|
||||
|
||||
exThumbImage: false,
|
||||
showThumbByDefault: true,
|
||||
toogleThumb: true,
|
||||
pullCaptionUp: true,
|
||||
|
||||
enableThumbDrag: true,
|
||||
enableThumbSwipe: true,
|
||||
swipeThreshold: 50,
|
||||
|
||||
loadYoutubeThumbnail: true,
|
||||
youtubeThumbSize: 1,
|
||||
|
||||
loadVimeoThumbnail: true,
|
||||
vimeoThumbSize: 'thumbnail_small',
|
||||
|
||||
loadDailymotionThumbnail: true
|
||||
};
|
||||
|
||||
var Thumbnail = function(element) {
|
||||
|
||||
// get lightGallery core plugin data
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
// extend module default settings with lightGallery core settings
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
|
||||
this.$el = $(element);
|
||||
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;
|
||||
|
||||
if (this.core.s.animateThumb) {
|
||||
this.core.s.thumbHeight = '100%';
|
||||
}
|
||||
|
||||
// Thumbnail animation value
|
||||
this.left = 0;
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Thumbnail.prototype.init = function() {
|
||||
var _this = this;
|
||||
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
||||
if (this.core.s.showThumbByDefault) {
|
||||
setTimeout(function(){
|
||||
_this.core.$outer.addClass('lg-thumb-open');
|
||||
}, 700);
|
||||
}
|
||||
|
||||
if (this.core.s.pullCaptionUp) {
|
||||
this.core.$outer.addClass('lg-pull-caption-up');
|
||||
}
|
||||
|
||||
this.build();
|
||||
if (this.core.s.animateThumb && this.core.doCss()) {
|
||||
if (this.core.s.enableThumbDrag) {
|
||||
this.enableThumbDrag();
|
||||
}
|
||||
|
||||
if (this.core.s.enableThumbSwipe) {
|
||||
this.enableThumbSwipe();
|
||||
}
|
||||
|
||||
this.thumbClickable = false;
|
||||
} else {
|
||||
this.thumbClickable = true;
|
||||
}
|
||||
|
||||
this.toogle();
|
||||
this.thumbkeyPress();
|
||||
}
|
||||
};
|
||||
|
||||
Thumbnail.prototype.build = function() {
|
||||
var _this = this;
|
||||
var thumbList = '';
|
||||
var vimeoErrorThumbSize = '';
|
||||
var $thumb;
|
||||
var html = '<div class="lg-thumb-outer">' +
|
||||
'<div class="lg-thumb lg-group">' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
switch (this.core.s.vimeoThumbSize) {
|
||||
case 'thumbnail_large':
|
||||
vimeoErrorThumbSize = '640';
|
||||
break;
|
||||
case 'thumbnail_medium':
|
||||
vimeoErrorThumbSize = '200x150';
|
||||
break;
|
||||
case 'thumbnail_small':
|
||||
vimeoErrorThumbSize = '100x75';
|
||||
}
|
||||
|
||||
_this.core.$outer.addClass('lg-has-thumb');
|
||||
|
||||
_this.core.$outer.find('.lg').append(html);
|
||||
|
||||
_this.$thumbOuter = _this.core.$outer.find('.lg-thumb-outer');
|
||||
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
||||
|
||||
if (_this.core.s.animateThumb) {
|
||||
_this.core.$outer.find('.lg-thumb').css({
|
||||
width: _this.thumbTotalWidth + 'px',
|
||||
position: 'relative'
|
||||
});
|
||||
}
|
||||
|
||||
if (this.core.s.animateThumb) {
|
||||
_this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px');
|
||||
}
|
||||
|
||||
function getThumb(src, thumb, index) {
|
||||
var isVideo = _this.core.isVideo(src, index) || {};
|
||||
var thumbImg;
|
||||
var vimeoId = '';
|
||||
|
||||
if (isVideo.youtube || isVideo.vimeo || isVideo.dailymotion) {
|
||||
if (isVideo.youtube) {
|
||||
if (_this.core.s.loadYoutubeThumbnail) {
|
||||
thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
} else if (isVideo.vimeo) {
|
||||
if (_this.core.s.loadVimeoThumbnail) {
|
||||
thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
|
||||
vimeoId = isVideo.vimeo[1];
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
} else if (isVideo.dailymotion) {
|
||||
if (_this.core.s.loadDailymotionThumbnail) {
|
||||
thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
thumbImg = thumb;
|
||||
}
|
||||
|
||||
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>';
|
||||
vimeoId = '';
|
||||
}
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
|
||||
getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
|
||||
}
|
||||
} else {
|
||||
_this.core.$items.each(function(i) {
|
||||
|
||||
if (!_this.core.s.exThumbImage) {
|
||||
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).find('img').attr('src'), i);
|
||||
} else {
|
||||
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').html(thumbList);
|
||||
|
||||
$thumb = _this.core.$outer.find('.lg-thumb-item');
|
||||
|
||||
// Load vimeo thumbnails
|
||||
$thumb.each(function() {
|
||||
var $this = $(this);
|
||||
var vimeoVideoId = $this.attr('data-vimeo-id');
|
||||
|
||||
if (vimeoVideoId) {
|
||||
$.getJSON('//www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
|
||||
format: 'json'
|
||||
}, function(data) {
|
||||
$this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// manage active class for thumbnail
|
||||
$thumb.eq(_this.core.index).addClass('active');
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
||||
$thumb.removeClass('active');
|
||||
$thumb.eq(_this.core.index).addClass('active');
|
||||
});
|
||||
|
||||
$thumb.on('click.lg touchend.lg', function() {
|
||||
var _$this = $(this);
|
||||
setTimeout(function() {
|
||||
|
||||
// In IE9 and bellow touch does not support
|
||||
// Go to slide if browser does not support css transitions
|
||||
if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) {
|
||||
_this.core.index = _$this.index();
|
||||
_this.core.slide(_this.core.index, false, true, false);
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
||||
_this.animateThumb(_this.core.index);
|
||||
});
|
||||
|
||||
$(window).on('resize.lg.thumb orientationchange.lg.thumb', function() {
|
||||
setTimeout(function() {
|
||||
_this.animateThumb(_this.core.index);
|
||||
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
||||
}, 200);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Thumbnail.prototype.setTranslate = function(value) {
|
||||
// jQuery supports Automatic CSS prefixing since jQuery 1.8.0
|
||||
this.core.$outer.find('.lg-thumb').css({
|
||||
transform: 'translate3d(-' + (value) + 'px, 0px, 0px)'
|
||||
});
|
||||
};
|
||||
|
||||
Thumbnail.prototype.animateThumb = function(index) {
|
||||
var $thumb = this.core.$outer.find('.lg-thumb');
|
||||
if (this.core.s.animateThumb) {
|
||||
var position;
|
||||
switch (this.core.s.currentPagerPosition) {
|
||||
case 'left':
|
||||
position = 0;
|
||||
break;
|
||||
case 'middle':
|
||||
position = (this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2);
|
||||
break;
|
||||
case 'right':
|
||||
position = this.thumbOuterWidth - this.core.s.thumbWidth;
|
||||
}
|
||||
this.left = ((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position;
|
||||
if (this.left > (this.thumbTotalWidth - this.thumbOuterWidth)) {
|
||||
this.left = this.thumbTotalWidth - this.thumbOuterWidth;
|
||||
}
|
||||
|
||||
if (this.left < 0) {
|
||||
this.left = 0;
|
||||
}
|
||||
|
||||
if (this.core.lGalleryOn) {
|
||||
if (!$thumb.hasClass('on')) {
|
||||
this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms');
|
||||
}
|
||||
|
||||
if (!this.core.doCss()) {
|
||||
$thumb.animate({
|
||||
left: -this.left + 'px'
|
||||
}, this.core.s.speed);
|
||||
}
|
||||
} else {
|
||||
if (!this.core.doCss()) {
|
||||
$thumb.css('left', -this.left + 'px');
|
||||
}
|
||||
}
|
||||
|
||||
this.setTranslate(this.left);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// Enable thumbnail dragging and swiping
|
||||
Thumbnail.prototype.enableThumbDrag = function() {
|
||||
|
||||
var _this = this;
|
||||
var startCoords = 0;
|
||||
var endCoords = 0;
|
||||
var isDraging = false;
|
||||
var isMoved = false;
|
||||
var tempLeft = 0;
|
||||
|
||||
_this.$thumbOuter.addClass('lg-grab');
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e) {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
// execute only on .lg-object
|
||||
e.preventDefault();
|
||||
startCoords = e.pageX;
|
||||
isDraging = true;
|
||||
|
||||
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
||||
_this.core.$outer.scrollLeft += 1;
|
||||
_this.core.$outer.scrollLeft -= 1;
|
||||
|
||||
// *
|
||||
_this.thumbClickable = false;
|
||||
_this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('mousemove.lg.thumb', function(e) {
|
||||
if (isDraging) {
|
||||
tempLeft = _this.left;
|
||||
isMoved = true;
|
||||
endCoords = e.pageX;
|
||||
|
||||
_this.$thumbOuter.addClass('lg-dragging');
|
||||
|
||||
tempLeft = tempLeft - (endCoords - startCoords);
|
||||
|
||||
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
||||
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
||||
}
|
||||
|
||||
if (tempLeft < 0) {
|
||||
tempLeft = 0;
|
||||
}
|
||||
|
||||
// move current slide
|
||||
_this.setTranslate(tempLeft);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('mouseup.lg.thumb', function() {
|
||||
if (isMoved) {
|
||||
isMoved = false;
|
||||
_this.$thumbOuter.removeClass('lg-dragging');
|
||||
|
||||
_this.left = tempLeft;
|
||||
|
||||
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
|
||||
if (isDraging) {
|
||||
isDraging = false;
|
||||
_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Thumbnail.prototype.enableThumbSwipe = function() {
|
||||
var _this = this;
|
||||
var startCoords = 0;
|
||||
var endCoords = 0;
|
||||
var isMoved = false;
|
||||
var tempLeft = 0;
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e) {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
e.preventDefault();
|
||||
startCoords = e.originalEvent.targetTouches[0].pageX;
|
||||
_this.thumbClickable = false;
|
||||
}
|
||||
});
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e) {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
e.preventDefault();
|
||||
endCoords = e.originalEvent.targetTouches[0].pageX;
|
||||
isMoved = true;
|
||||
|
||||
_this.$thumbOuter.addClass('lg-dragging');
|
||||
|
||||
tempLeft = _this.left;
|
||||
|
||||
tempLeft = tempLeft - (endCoords - startCoords);
|
||||
|
||||
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
||||
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
||||
}
|
||||
|
||||
if (tempLeft < 0) {
|
||||
tempLeft = 0;
|
||||
}
|
||||
|
||||
// move current slide
|
||||
_this.setTranslate(tempLeft);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
_this.core.$outer.find('.lg-thumb').on('touchend.lg', function() {
|
||||
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
||||
|
||||
if (isMoved) {
|
||||
isMoved = false;
|
||||
_this.$thumbOuter.removeClass('lg-dragging');
|
||||
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
|
||||
_this.left = tempLeft;
|
||||
} else {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
} else {
|
||||
_this.thumbClickable = true;
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Thumbnail.prototype.toogle = function() {
|
||||
var _this = this;
|
||||
if (_this.core.s.toogleThumb) {
|
||||
_this.core.$outer.addClass('lg-can-toggle');
|
||||
_this.$thumbOuter.append('<button type="button" aria-label="Toggle thumbnails" class="lg-toogle-thumb lg-icon"></button>');
|
||||
_this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() {
|
||||
_this.core.$outer.toggleClass('lg-thumb-open');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Thumbnail.prototype.thumbkeyPress = function() {
|
||||
var _this = this;
|
||||
$(window).on('keydown.lg.thumb', function(e) {
|
||||
if (e.keyCode === 38) {
|
||||
e.preventDefault();
|
||||
_this.core.$outer.addClass('lg-thumb-open');
|
||||
} else if (e.keyCode === 40) {
|
||||
e.preventDefault();
|
||||
_this.core.$outer.removeClass('lg-thumb-open');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Thumbnail.prototype.destroy = function() {
|
||||
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
||||
$(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb');
|
||||
this.$thumbOuter.remove();
|
||||
this.core.$outer.removeClass('lg-has-thumb');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.Thumbnail = Thumbnail;
|
||||
|
||||
})();
|
||||
|
||||
}));
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
@@ -1,277 +1,357 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
videoMaxWidth: '855px',
|
||||
youtubePlayerParams: false,
|
||||
vimeoPlayerParams: false,
|
||||
dailymotionPlayerParams: false,
|
||||
videojs: false
|
||||
};
|
||||
|
||||
var Video = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
this.videoLoaded = false;
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Video.prototype.init = function() {
|
||||
var _this = this;
|
||||
|
||||
// Event triggered when video url found without poster
|
||||
_this.core.$el.on('hasVideo.lg.tm', function(event, index, src, html) {
|
||||
_this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
|
||||
if (html) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), {}, function() {
|
||||
if (!_this.videoLoaded) {
|
||||
this.play();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
_this.core.$slide.eq(index).find('.lg-html5').get(0).play();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Set max width for video
|
||||
_this.core.$el.on('onAferAppendSlide.lg.tm', function(event, index) {
|
||||
_this.core.$slide.eq(index).find('.lg-video-cont').css('max-width', _this.core.s.videoMaxWidth);
|
||||
_this.videoLoaded = true;
|
||||
});
|
||||
|
||||
var loadOnClick = function($el) {
|
||||
// check slide has poster
|
||||
if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
|
||||
|
||||
// chack already video element present
|
||||
if (!$el.hasClass('lg-has-video')) {
|
||||
|
||||
$el.addClass('lg-video-palying lg-has-video');
|
||||
|
||||
var _src;
|
||||
var _html;
|
||||
var _loadVideo = function(_src, _html) {
|
||||
|
||||
$el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));
|
||||
|
||||
if (_html) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), {}, function() {
|
||||
this.play();
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
|
||||
_src = _this.core.s.dynamicEl[_this.core.index].src;
|
||||
_html = _this.core.s.dynamicEl[_this.core.index].html;
|
||||
|
||||
_loadVideo(_src, _html);
|
||||
|
||||
} else {
|
||||
|
||||
_src = _this.core.$items.eq(_this.core.index).attr('href') || _this.core.$items.eq(_this.core.index).attr('data-src');
|
||||
_html = _this.core.$items.eq(_this.core.index).attr('data-html');
|
||||
|
||||
_loadVideo(_src, _html);
|
||||
|
||||
}
|
||||
|
||||
var $tempImg = $el.find('.lg-object');
|
||||
$el.find('.lg-video').append($tempImg);
|
||||
|
||||
// @todo loading icon for html5 videos also
|
||||
// for showing the loading indicator while loading video
|
||||
if (!$el.find('.lg-video-object').hasClass('lg-html5')) {
|
||||
$el.removeClass('lg-complete');
|
||||
$el.find('.lg-video-object').on('load.lg error.lg', function() {
|
||||
$el.addClass('lg-complete');
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
var youtubePlayer = $el.find('.lg-youtube').get(0);
|
||||
var vimeoPlayer = $el.find('.lg-vimeo').get(0);
|
||||
var dailymotionPlayer = $el.find('.lg-dailymotion').get(0);
|
||||
var html5Player = $el.find('.lg-html5').get(0);
|
||||
if (youtubePlayer) {
|
||||
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
|
||||
} else if (vimeoPlayer) {
|
||||
try {
|
||||
$f(vimeoPlayer).api('play');
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included froogaloop2 js');
|
||||
}
|
||||
} else if (dailymotionPlayer) {
|
||||
dailymotionPlayer.contentWindow.postMessage('play', '*');
|
||||
|
||||
} else if (html5Player) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(html5Player).play();
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
html5Player.play();
|
||||
}
|
||||
}
|
||||
|
||||
$el.addClass('lg-video-palying');
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (_this.core.doCss() && _this.core.$items.length > 1 && ((_this.core.s.enableSwipe && _this.core.isTouch) || (_this.core.s.enableDrag && !_this.core.isTouch))) {
|
||||
_this.core.$el.on('onSlideClick.lg.tm', function() {
|
||||
var $el = _this.core.$slide.eq(_this.core.index);
|
||||
loadOnClick($el);
|
||||
});
|
||||
} else {
|
||||
|
||||
// For IE 9 and bellow
|
||||
_this.core.$slide.on('click.lg', function() {
|
||||
loadOnClick($(this));
|
||||
});
|
||||
}
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function(event, prevIndex, index) {
|
||||
|
||||
var $videoSlide = _this.core.$slide.eq(prevIndex);
|
||||
var youtubePlayer = $videoSlide.find('.lg-youtube').get(0);
|
||||
var vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);
|
||||
var dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);
|
||||
var html5Player = $videoSlide.find('.lg-html5').get(0);
|
||||
if (youtubePlayer) {
|
||||
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
|
||||
} else if (vimeoPlayer) {
|
||||
try {
|
||||
$f(vimeoPlayer).api('pause');
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included froogaloop2 js');
|
||||
}
|
||||
} else if (dailymotionPlayer) {
|
||||
dailymotionPlayer.contentWindow.postMessage('pause', '*');
|
||||
|
||||
} else if (html5Player) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(html5Player).pause();
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
html5Player.pause();
|
||||
}
|
||||
}
|
||||
|
||||
var _src;
|
||||
if (_this.core.s.dynamic) {
|
||||
_src = _this.core.s.dynamicEl[index].src;
|
||||
} else {
|
||||
_src = _this.core.$items.eq(index).attr('href') || _this.core.$items.eq(index).attr('data-src');
|
||||
|
||||
}
|
||||
|
||||
var _isVideo = _this.core.isVideo(_src, index) || {};
|
||||
if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion) {
|
||||
_this.core.$outer.addClass('lg-hide-download');
|
||||
}
|
||||
|
||||
//$videoSlide.addClass('lg-complete');
|
||||
|
||||
});
|
||||
|
||||
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
|
||||
_this.core.$slide.eq(prevIndex).removeClass('lg-video-palying');
|
||||
});
|
||||
};
|
||||
|
||||
Video.prototype.loadVideo = function(src, addClass, noposter, index, html) {
|
||||
var video = '';
|
||||
var autoplay = 1;
|
||||
var a = '';
|
||||
var isVideo = this.core.isVideo(src, index) || {};
|
||||
|
||||
// Enable autoplay for first video if poster doesn't exist
|
||||
if (noposter) {
|
||||
if (this.videoLoaded) {
|
||||
autoplay = 0;
|
||||
} else {
|
||||
autoplay = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (isVideo.youtube) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
|
||||
if (this.core.s.youtubePlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.youtubePlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe class="lg-video-object lg-youtube ' + addClass + '" width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.vimeo) {
|
||||
|
||||
a = '?autoplay=' + autoplay + '&api=1';
|
||||
if (this.core.s.vimeoPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe class="lg-video-object lg-vimeo ' + addClass + '" width="560" height="315" src="http://player.vimeo.com/video/' + isVideo.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
||||
|
||||
} else if (isVideo.dailymotion) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
|
||||
if (this.core.s.dailymotionPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe class="lg-video-object lg-dailymotion ' + addClass + '" width="560" height="315" src="//www.dailymotion.com/embed/video/' + isVideo.dailymotion[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.html5) {
|
||||
var fL = html.substring(0, 1);
|
||||
if (fL === '.' || fL === '#') {
|
||||
html = $(html).html();
|
||||
}
|
||||
|
||||
video = html;
|
||||
}
|
||||
|
||||
return video;
|
||||
};
|
||||
|
||||
Video.prototype.destroy = function() {
|
||||
this.videoLoaded = false;
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.video = Video;
|
||||
|
||||
})(jQuery, window, document);
|
||||
/*! lg-video - v1.4.0 - November-07-2020
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
videoMaxWidth: '855px',
|
||||
|
||||
autoplayFirstVideo: true,
|
||||
|
||||
youtubePlayerParams: false,
|
||||
vimeoPlayerParams: false,
|
||||
dailymotionPlayerParams: false,
|
||||
vkPlayerParams: false,
|
||||
|
||||
videojs: false,
|
||||
videojsOptions: {}
|
||||
};
|
||||
|
||||
var Video = function(element) {
|
||||
|
||||
this.core = $(element).data('lightGallery');
|
||||
|
||||
this.$el = $(element);
|
||||
this.core.s = $.extend({}, defaults, this.core.s);
|
||||
this.videoLoaded = false;
|
||||
|
||||
this.init();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Video.prototype.init = function() {
|
||||
var _this = this;
|
||||
|
||||
// Event triggered when video url found without poster
|
||||
_this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));
|
||||
|
||||
// Set max width for video
|
||||
_this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));
|
||||
|
||||
if (_this.core.doCss() && (_this.core.$items.length > 1) && (_this.core.s.enableSwipe || _this.core.s.enableDrag)) {
|
||||
_this.core.$el.on('onSlideClick.lg.tm', function() {
|
||||
var $el = _this.core.$slide.eq(_this.core.index);
|
||||
_this.loadVideoOnclick($el);
|
||||
});
|
||||
} else {
|
||||
|
||||
// For IE 9 and bellow
|
||||
_this.core.$slide.on('click.lg', function() {
|
||||
_this.loadVideoOnclick($(this));
|
||||
});
|
||||
}
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));
|
||||
|
||||
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
|
||||
_this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
|
||||
});
|
||||
|
||||
if (_this.core.s.autoplayFirstVideo) {
|
||||
_this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {
|
||||
if (!_this.core.lGalleryOn) {
|
||||
var $el = _this.core.$slide.eq(index);
|
||||
setTimeout(function () {
|
||||
_this.loadVideoOnclick($el);
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {
|
||||
var _this = this;
|
||||
var video = '';
|
||||
var autoplay = 1;
|
||||
var a = '';
|
||||
var isVideo = this.core.isVideo(src, index) || {};
|
||||
var videoTitle;
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
videoTitle = _this.core.s.dynamicEl[_this.core.index].title;
|
||||
} else {
|
||||
videoTitle = _this.core.$items.eq(_this.core.index).attr('title') || _this.core.$items.eq(_this.core.index).find('img').first().attr('alt');
|
||||
}
|
||||
|
||||
videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
|
||||
|
||||
// Enable autoplay based on setting for first video if poster doesn't exist
|
||||
if (noPoster) {
|
||||
if (this.videoLoaded) {
|
||||
autoplay = 0;
|
||||
} else {
|
||||
autoplay = this.core.s.autoplayFirstVideo ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (isVideo.youtube) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
|
||||
if (this.core.s.youtubePlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.youtubePlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-youtube ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.vimeo) {
|
||||
|
||||
a = '?autoplay=' + autoplay;
|
||||
if (this.core.s.vimeoPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-vimeo ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//player.vimeo.com/video/' + isVideo.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
||||
|
||||
} else if (isVideo.dailymotion) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
|
||||
if (this.core.s.dailymotionPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-dailymotion ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//www.dailymotion.com/embed/video/' + isVideo.dailymotion[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.html5) {
|
||||
var fL = html.substring(0, 1);
|
||||
if (fL === '.' || fL === '#') {
|
||||
html = $(html).html();
|
||||
}
|
||||
|
||||
video = html;
|
||||
|
||||
} else if (isVideo.vk) {
|
||||
|
||||
a = '&autoplay=' + autoplay;
|
||||
if (this.core.s.vkPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.vkPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-vk ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//vk.com/video_ext.php?' + isVideo.vk[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
}
|
||||
|
||||
return video;
|
||||
};
|
||||
|
||||
Video.prototype.loadVideoOnclick = function($el){
|
||||
|
||||
var _this = this;
|
||||
// check slide has poster
|
||||
if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
|
||||
|
||||
// check already video element present
|
||||
if (!$el.hasClass('lg-has-video')) {
|
||||
|
||||
$el.addClass('lg-video-playing lg-has-video');
|
||||
|
||||
var _src;
|
||||
var _html;
|
||||
var _loadVideo = function(_src, _html) {
|
||||
|
||||
$el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));
|
||||
|
||||
if (_html) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
|
||||
this.play();
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
|
||||
_src = _this.core.s.dynamicEl[_this.core.index].src;
|
||||
_html = _this.core.s.dynamicEl[_this.core.index].html;
|
||||
|
||||
_loadVideo(_src, _html);
|
||||
|
||||
} else {
|
||||
|
||||
_src = _this.core.$items.eq(_this.core.index).attr('href') || _this.core.$items.eq(_this.core.index).attr('data-src');
|
||||
_html = _this.core.$items.eq(_this.core.index).attr('data-html');
|
||||
|
||||
_loadVideo(_src, _html);
|
||||
|
||||
}
|
||||
|
||||
var $tempImg = $el.find('.lg-object');
|
||||
$el.find('.lg-video').append($tempImg);
|
||||
|
||||
// @todo loading icon for html5 videos also
|
||||
// for showing the loading indicator while loading video
|
||||
if (!$el.find('.lg-video-object').hasClass('lg-html5')) {
|
||||
$el.removeClass('lg-complete');
|
||||
$el.find('.lg-video-object').on('load.lg error.lg', function() {
|
||||
$el.addClass('lg-complete');
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
var youtubePlayer = $el.find('.lg-youtube').get(0);
|
||||
var vimeoPlayer = $el.find('.lg-vimeo').get(0);
|
||||
var dailymotionPlayer = $el.find('.lg-dailymotion').get(0);
|
||||
var html5Player = $el.find('.lg-html5').get(0);
|
||||
if (youtubePlayer) {
|
||||
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
|
||||
} else if (vimeoPlayer) {
|
||||
try {
|
||||
new Vimeo.Player(vimeoPlayer).play().catch(function(error) {
|
||||
console.error('error playing the video:', error.name);
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn('lightGallery:- Make sure you have included https://github.com/vimeo/player.js');
|
||||
}
|
||||
} else if (dailymotionPlayer) {
|
||||
dailymotionPlayer.contentWindow.postMessage('play', '*');
|
||||
|
||||
} else if (html5Player) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(html5Player).play();
|
||||
} catch (e) {
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
html5Player.play();
|
||||
}
|
||||
}
|
||||
|
||||
$el.addClass('lg-video-playing');
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Video.prototype.destroy = function() {
|
||||
this.videoLoaded = false;
|
||||
};
|
||||
|
||||
function onHasVideo(event, index, src, html) {
|
||||
/*jshint validthis:true */
|
||||
var _this = this;
|
||||
_this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
|
||||
if (html) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
|
||||
if (!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
|
||||
this.play();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
if(!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
|
||||
_this.core.$slide.eq(index).find('.lg-html5').get(0).play();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onAferAppendSlide(event, index) {
|
||||
/*jshint validthis:true */
|
||||
var $videoCont = this.core.$slide.eq(index).find('.lg-video-cont');
|
||||
if (!$videoCont.hasClass('lg-has-iframe')) {
|
||||
$videoCont.css('max-width', this.core.s.videoMaxWidth);
|
||||
this.videoLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
function onBeforeSlide(event, prevIndex, index) {
|
||||
/*jshint validthis:true */
|
||||
var _this = this;
|
||||
|
||||
var $videoSlide = _this.core.$slide.eq(prevIndex);
|
||||
var youtubePlayer = $videoSlide.find('.lg-youtube').get(0);
|
||||
var vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);
|
||||
var dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);
|
||||
var vkPlayer = $videoSlide.find('.lg-vk').get(0);
|
||||
var html5Player = $videoSlide.find('.lg-html5').get(0);
|
||||
if (youtubePlayer) {
|
||||
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
|
||||
} else if (vimeoPlayer) {
|
||||
try {
|
||||
new Vimeo.Player(vimeoPlayer).pause().catch(function(error) {
|
||||
console.error('Unable to pause the video:', error.name);
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn('lightGallery:- Make sure you have included https://github.com/vimeo/player.js');
|
||||
}
|
||||
} else if (dailymotionPlayer) {
|
||||
dailymotionPlayer.contentWindow.postMessage('pause', '*');
|
||||
|
||||
} else if (html5Player) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(html5Player).pause();
|
||||
} catch (e) {
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
html5Player.pause();
|
||||
}
|
||||
} if (vkPlayer) {
|
||||
$(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));
|
||||
}
|
||||
|
||||
var _src;
|
||||
if (_this.core.s.dynamic) {
|
||||
_src = _this.core.s.dynamicEl[index].src;
|
||||
} else {
|
||||
_src = _this.core.$items.eq(index).attr('href') || _this.core.$items.eq(index).attr('data-src');
|
||||
|
||||
}
|
||||
|
||||
var _isVideo = _this.core.isVideo(_src, index) || {};
|
||||
if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion || _isVideo.vk) {
|
||||
_this.core.$outer.addClass('lg-hide-download');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.fn.lightGallery.modules.video = Video;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+4
-4
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+4
-4
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+3
-3
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user