XoopsModules25x/smallworld

View on GitHub
assets/js/uploader/bootstrap-image-gallery.js

Summary

Maintainability
C
1 day
Test Coverage

File bootstrap-image-gallery.js has 362 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Bootstrap Image Gallery 2.10
 * https://github.com/blueimp/Bootstrap-Image-Gallery
 *
 * Copyright 2011, Sebastian Tschan
Severity: Minor
Found in assets/js/uploader/bootstrap-image-gallery.js - About 4 hrs to fix

    Function showImage has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            showImage: function (img) {
                var modal = this.$element,
                    transition = $.support.transition && modal.hasClass('fade'),
                    method = transition ? modal.animate : modal.css,
                    modalImage = modal.find('.modal-image'),
    Severity: Major
    Found in assets/js/uploader/bootstrap-image-gallery.js - About 2 hrs to fix

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

              show: function () {
                  if (!this.isShown && this.$element.hasClass('modal-gallery')) {
                      var modal = this.$element,
                          options = this.options,
                          windowWidth = $(window).width(),
      Severity: Minor
      Found in assets/js/uploader/bootstrap-image-gallery.js - About 1 hr to fix

        Function loadImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                loadImage: function () {
                    var $this = this,
                        modal = this.$element,
                        index = this.options.index,
                        url = this.getUrl(this.$links[index]),
        Severity: Minor
        Found in assets/js/uploader/bootstrap-image-gallery.js - About 1 hr to fix

          Function initGalleryEvents has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  initGalleryEvents: function () {
                      var $this = this,
                          modal = this.$element;
                      modal.find('.modal-image').on('click.modal-gallery', function (e) {
                          var modalImage = $(this);
          Severity: Minor
          Found in assets/js/uploader/bootstrap-image-gallery.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status