Showing 37 of 74 total issues
File lightgallery-all.js
has 2099 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! lightgallery - v1.2.22 - 2016-07-20
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
(function($, window, document, undefined) {
Function init
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
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) {
Function loadContent
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Plugin.prototype.loadContent = function(index, rec, delay) {
var _this = this;
var _hasPoster = false;
var _$img;
Function init
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Zoom.prototype.init = function() {
var _this = this;
var zoomIcons = '<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';
Function build
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Thumbnail.prototype.build = function() {
var _this = this;
var thumbList = '';
var vimeoErrorThumbSize = '';
var $thumb;
Function slide
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Plugin.prototype.slide = function(index, fromTouch, fromThumb) {
var _prevIndex = this.$outer.find('.lg-current').index();
var _this = this;
Function structure
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Plugin.prototype.structure = function() {
var list = '';
var controls = '';
var i = 0;
var subHtmlCont = '';
Function zoomDrag
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Zoom.prototype.zoomDrag = function() {
var _this = this;
var startCoords = {};
var endCoords = {};
Function loadOnClick
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var loadOnClick = function($el) {
// check slide has poster
if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
// check already video element present
Function zoomSwipe
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Zoom.prototype.zoomSwipe = function() {
var _this = this;
var startCoords = {};
var endCoords = {};
var isMoved = false;
Function addHtml
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Plugin.prototype.addHtml = function(index) {
var subHtml = null;
var subHtmlUrl;
var $currentEle;
if (this.s.dynamic) {
Function enableThumbDrag
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Thumbnail.prototype.enableThumbDrag = function() {
var _this = this;
var startCoords = 0;
var endCoords = 0;
Method generate_gallery_item
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_gallery_item(attachment)
download_url = download_named_attachment_url(attachment.id, attachment.filename)
case
when attachment.is_image?
{
Function enableThumbSwipe
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Thumbnail.prototype.enableThumbSwipe = function() {
var _this = this;
var startCoords = 0;
var endCoords = 0;
var isMoved = false;
Function enableDrag
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Plugin.prototype.enableDrag = function() {
var _this = this;
var startCoords = 0;
var endCoords = 0;
var isDraging = false;
Function loadVideo
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Video.prototype.loadVideo = function(src, addClass, noposter, index, html) {
var video = '';
var autoplay = 1;
var a = '';
var isVideo = this.core.isVideo(src, index) || {};
Function init
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Plugin.prototype.init = function() {
var _this = this;
// s.preload should not be more than $item.length
Function init
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Pager.prototype.init = function() {
var _this = this;
var pagerList = '';
var $pagerCont;
var $pagerOuter;
Function touchendZoom
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Zoom.prototype.touchendZoom = function(startCoords, endCoords, allowX, allowY) {
var _this = this;
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
Function animateThumb
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
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) {