Undev/redmine_lightbox

View on GitHub

Showing 37 of 74 total issues

File lightgallery-all.js has 2099 lines of code (exceeds 250 allowed). Consider refactoring.
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) {

Severity: Major
Found in assets/javascripts/lightgallery-all.js - About 5 days to fix

    Function init has 146 lines of code (exceeds 25 allowed). Consider refactoring.
    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) {
    Severity: Major
    Found in assets/javascripts/lightgallery-all.js - About 5 hrs to fix

      Function loadContent has 126 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Plugin.prototype.loadContent = function(index, rec, delay) {
      
              var _this = this;
              var _hasPoster = false;
              var _$img;
      Severity: Major
      Found in assets/javascripts/lightgallery-all.js - About 5 hrs to fix

        Function init has 123 lines of code (exceeds 25 allowed). Consider refactoring.
        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>';
        
        
        Severity: Major
        Found in assets/javascripts/lightgallery-all.js - About 4 hrs to fix

          Function build has 111 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Thumbnail.prototype.build = function() {
                  var _this = this;
                  var thumbList = '';
                  var vimeoErrorThumbSize = '';
                  var $thumb;
          Severity: Major
          Found in assets/javascripts/lightgallery-all.js - About 4 hrs to fix

            Function slide has 94 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Plugin.prototype.slide = function(index, fromTouch, fromThumb) {
            
                    var _prevIndex = this.$outer.find('.lg-current').index();
                    var _this = this;
            
            
            Severity: Major
            Found in assets/javascripts/lightgallery-all.js - About 3 hrs to fix

              Function structure has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Plugin.prototype.structure = function() {
                      var list = '';
                      var controls = '';
                      var i = 0;
                      var subHtmlCont = '';
              Severity: Major
              Found in assets/javascripts/lightgallery-all.js - About 2 hrs to fix

                Function zoomDrag has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Zoom.prototype.zoomDrag = function() {
                
                        var _this = this;
                        var startCoords = {};
                        var endCoords = {};
                Severity: Major
                Found in assets/javascripts/lightgallery-all.js - About 2 hrs to fix

                  Function loadOnClick has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                  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
                  Severity: Major
                  Found in assets/javascripts/lightgallery-all.js - About 2 hrs to fix

                    Function zoomSwipe has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Zoom.prototype.zoomSwipe = function() {
                            var _this = this;
                            var startCoords = {};
                            var endCoords = {};
                            var isMoved = false;
                    Severity: Major
                    Found in assets/javascripts/lightgallery-all.js - About 2 hrs to fix

                      Function addHtml has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          Plugin.prototype.addHtml = function(index) {
                              var subHtml = null;
                              var subHtmlUrl;
                              var $currentEle;
                              if (this.s.dynamic) {
                      Severity: Major
                      Found in assets/javascripts/lightgallery-all.js - About 2 hrs to fix

                        Function enableThumbDrag has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            Thumbnail.prototype.enableThumbDrag = function() {
                        
                                var _this = this;
                                var startCoords = 0;
                                var endCoords = 0;
                        Severity: Minor
                        Found in assets/javascripts/lightgallery-all.js - About 2 hrs to fix

                          Method generate_gallery_item has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                def generate_gallery_item(attachment)
                                  download_url = download_named_attachment_url(attachment.id, attachment.filename)
                                  case
                                    when attachment.is_image?
                                      {
                          Severity: Minor
                          Found in lib/redmine_lightbox/patches/application_controller_patch.rb - About 1 hr to fix

                            Function enableThumbSwipe has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                Thumbnail.prototype.enableThumbSwipe = function() {
                                    var _this = this;
                                    var startCoords = 0;
                                    var endCoords = 0;
                                    var isMoved = false;
                            Severity: Minor
                            Found in assets/javascripts/lightgallery-all.js - About 1 hr to fix

                              Function enableDrag has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  Plugin.prototype.enableDrag = function() {
                                      var _this = this;
                                      var startCoords = 0;
                                      var endCoords = 0;
                                      var isDraging = false;
                              Severity: Minor
                              Found in assets/javascripts/lightgallery-all.js - About 1 hr to fix

                                Function loadVideo has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    Video.prototype.loadVideo = function(src, addClass, noposter, index, html) {
                                        var video = '';
                                        var autoplay = 1;
                                        var a = '';
                                        var isVideo = this.core.isVideo(src, index) || {};
                                Severity: Minor
                                Found in assets/javascripts/lightgallery-all.js - About 1 hr to fix

                                  Function init has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      Plugin.prototype.init = function() {
                                  
                                          var _this = this;
                                  
                                          // s.preload should not be more than $item.length
                                  Severity: Minor
                                  Found in assets/javascripts/lightgallery-all.js - About 1 hr to fix

                                    Function init has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        Pager.prototype.init = function() {
                                            var _this = this;
                                            var pagerList = '';
                                            var $pagerCont;
                                            var $pagerOuter;
                                    Severity: Minor
                                    Found in assets/javascripts/lightgallery-all.js - About 1 hr to fix

                                      Function touchendZoom has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      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');
                                      Severity: Minor
                                      Found in assets/javascripts/lightgallery-all.js - About 1 hr to fix

                                        Function animateThumb has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        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) {
                                        Severity: Minor
                                        Found in assets/javascripts/lightgallery-all.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language