XoopsModules25x/smallworld

View on GitHub
assets/js/jquery.fileupload.js

Summary

Maintainability
F
4 days
Test Coverage

File jquery.fileupload.js has 856 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * jQuery File Upload Plugin 5.21
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
Severity: Major
Found in assets/js/jquery.fileupload.js - About 2 days to fix

    Function _chunkedUpload has 83 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _chunkedUpload: function (options, testOnly) {
                var that = this,
                    file = options.files[0],
                    fs = file.size,
                    ub = options.uploadedBytes = options.uploadedBytes || 0,
    Severity: Major
    Found in assets/js/jquery.fileupload.js - About 3 hrs to fix

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

              _onSend: function (e, data) {
                  var that = this,
                      jqXHR,
                      aborted,
                      slot,
      Severity: Major
      Found in assets/js/jquery.fileupload.js - About 2 hrs to fix

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

                _initXHRData: function (options) {
                    var formData,
                        file = options.files[0],
                        // Ignore non-multipart setting if not supported:
                        multipart = options.multipart || !$.support.xhrFileUpload,
        Severity: Major
        Found in assets/js/jquery.fileupload.js - About 2 hrs to fix

          Function _onAdd has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _onAdd: function (e, data) {
                      var that = this,
                          result = true,
                          options = $.extend({}, this.options, data),
                          limit = options.limitMultiFileUploads,
          Severity: Minor
          Found in assets/js/jquery.fileupload.js - About 1 hr to fix

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

                    send: function (data) {
                        if (data && !this.options.disabled) {
                            if (data.fileInput && !data.files) {
                                var that = this,
                                    dfd = $.Deferred(),
            Severity: Minor
            Found in assets/js/jquery.fileupload.js - About 1 hr to fix

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

                      _onProgress: function (e, data) {
                          if (e.lengthComputable) {
                              var now = +(new Date()),
                                  total,
                                  loaded;
              Severity: Minor
              Found in assets/js/jquery.fileupload.js - About 1 hr to fix

                Function send has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                send = function () {
                                    that._sending += 1;
                                    // Set timer for bitrate progress calculation:
                                    options._bitrateTimer = new that._BitrateTimer();
                                    jqXHR = jqXHR || (
                Severity: Minor
                Found in assets/js/jquery.fileupload.js - About 1 hr to fix

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

                          _handleFileTreeEntry: function (entry, path) {
                              var that = this,
                                  dfd = $.Deferred(),
                                  errorHandler = function (e) {
                                      if (e && !e.entry) {
                  Severity: Minor
                  Found in assets/js/jquery.fileupload.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                                if (e.lengthComputable) {
                                    var now = +(new Date()),
                                        total,
                                        loaded;
                                    if (data._time && data.progressInterval &&
                    Severity: Major
                    Found in assets/js/jquery.fileupload.js - About 40 mins to fix

                      There are no issues that match your filters.

                      Category
                      Status