interfasys/galleryplus

View on GitHub

Showing 88 of 178 total issues

Method __construct has 336 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct(array $urlParams = []) {
        parent::__construct('gallery', $urlParams);

        $container = $this->getContainer();

Severity: Major
Found in appinfo/application.php - About 1 day to fix

    File gallery.js has 397 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* global Album, GalleryImage */
    (function ($, OC, t) {
        "use strict";
        var Gallery = {
            currentAlbum: null,
    Severity: Minor
    Found in js/gallery.js - About 5 hrs to fix

      File galleryview.js has 378 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* global Handlebars, Gallery */
      (function ($, _, OC, t, Gallery) {
          "use strict";
      
          var TEMPLATE_ADDBUTTON = '<a href="#" class="button new"><img src="{{iconUrl}}" alt="{{addText}}"></img></a>';
      Severity: Minor
      Found in js/galleryview.js - About 5 hrs to fix

        File application.php has 375 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * Gallery
         *
         * This file is licensed under the Affero General Public License version 3 or
        Severity: Minor
        Found in appinfo/application.php - About 5 hrs to fix

          Function _mapFiles has 78 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _mapFiles: function (data) {
                      Gallery.imageMap = {};
                      var image = null;
                      var path = null;
                      var fileId = null;
          Severity: Major
          Found in js/gallery.js - About 3 hrs to fix

            File slideshow.js has 293 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* global DOMPurify */
            (function ($, OC, OCA, t) {
                "use strict";
                /**
                 * Slideshow featuring zooming
            Severity: Minor
            Found in js/slideshow.js - About 3 hrs to fix

              File rotate.js has 285 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // VERSION: 2.3 LAST UPDATE: 11.07.2013
              /*
               * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
               *
               * Made by Wilq32, wilq32@gmail.com, Wroclaw, Poland, 01.2009
              Severity: Minor
              Found in js/rotate.js - About 2 hrs to fix

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

                        _getSlideshowTemplate: function () {
                            var defer = $.Deferred();
                            if (!this.$slideshowTemplate) {
                                var self = this;
                                var url = OC.generateUrl('apps/gallery/slideshow', null);
                Severity: Major
                Found in js/slideshow.js - About 2 hrs to fix

                  File slideshowcontrols.js has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* global OC, SlideShow */
                  (function ($, SlideShow) {
                      "use strict";
                      /**
                       * Button and key controls for the slideshow
                  Severity: Minor
                  Found in js/slideshowcontrols.js - About 2 hrs to fix

                    Function _Loader has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          _Loader:(function()
                          {
                            if (IE)
                              return function() {
                                var width=this._img.width;
                    Severity: Major
                    Found in js/rotate.js - About 2 hrs to fix

                      Function slideShow has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              slideShow: function (images, startImage, autoPlay) {
                                  if (startImage === undefined) {
                                      OC.Notification.showTemporary(t('gallery',
                                          'Aborting preview. Could not find the file'));
                                      return false;
                      Severity: Major
                      Found in js/gallery.js - About 2 hrs to fix

                        Function loadBatch has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                loadBatch: function (ids, square) {
                                    var map = (square) ? Thumbnails.squareMap : Thumbnails.map;
                                    // Prevents re-loading thumbnails when resizing the window
                                    ids = ids.filter(function (id) {
                                        return !map[id];
                        Severity: Major
                        Found in js/thumbnail.js - About 2 hrs to fix

                          Function onView has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  onView: function (filename, context) {
                                      var imageUrl, downloadUrl;
                                      var fileList = context.fileList;
                                      var files = fileList.files;
                                      var start = 0;
                          Severity: Major
                          Found in js/galleryfileaction.js - About 2 hrs to fix

                            Function getFiles has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    getFiles: function (currentLocation) {
                                        // Cache the sorting order of the current album before loading new files
                                        if (!$.isEmptyObject(Gallery.albumMap)) {
                                            Gallery.albumMap[Gallery.currentAlbum].sorting = Gallery.config.albumSorting;
                                        }
                            Severity: Minor
                            Found in js/gallery.js - About 1 hr to fix

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

                                  createFile: function(name) {
                                      var self = this;
                                      var deferred = $.Deferred();
                                      var promise = deferred.promise();
                              
                              
                              Severity: Minor
                              Found in js/upload-helper.js - About 1 hr to fix

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

                                        _setupUploader: function () {
                                            var self = this;
                                            var $uploadEl = $('#file_upload_start');
                                            var uploads = [];
                                            if (!$uploadEl.exists()) {
                                Severity: Minor
                                Found in js/galleryview.js - About 1 hr to fix

                                  Function _resize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          _resize: function (availableWidth) {
                                              var crumbs = this.breadcrumbsElement.children();
                                              var shorten = false;
                                              var ellipsisPath = '';
                                              var self = this;
                                  Severity: Minor
                                  Found in js/breadcrumb.js - About 1 hr to fix

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

                                            show: function (index) {
                                                this.hideErrorNotification();
                                                this.active = true;
                                                this.container.show();
                                                this.container.css('background-position', 'center');
                                    Severity: Minor
                                    Found in js/slideshow.js - About 1 hr to fix

                                      Function Album has 12 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          var Album = function (path, subAlbums, images, name, fileId, mTime, etag, size, sharedWithUser,
                                                                owner, freeSpace, permissions) {
                                      Severity: Major
                                      Found in js/galleryalbum.js - About 1 hr to fix

                                        Function loadVisibleRows has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                loadVisibleRows: function (album) {
                                                    var view = this;
                                                    // Wait for the previous request to be completed
                                                    if (this.loadVisibleRows.processing) {
                                                        return;
                                        Severity: Minor
                                        Found in js/galleryview.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language