modxcms/revolution

View on GitHub
manager/assets/modext/util/uploaddialog.js

Summary

Maintainability
F
1 wk
Test Coverage

File uploaddialog.js has 1168 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * This namespace should be in another file but I dicided to put it here for consistancy.
 */
Ext.namespace('Ext.ux.Utils');

Severity: Major
Found in manager/assets/modext/util/uploaddialog.js - About 3 days to fix

    `` has 73 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Ext.extend(Ext.ux.UploadDialog.Dialog, Ext.Window,{
      fsa : null,
      
      state_tpl : null,
      
    Severity: Major
    Found in manager/assets/modext/util/uploaddialog.js - About 1 day to fix

      Function initComponent has 245 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        initComponent : function() {
          Ext.ux.UploadDialog.Dialog.superclass.initComponent.call(this);
          
          // Setting automata protocol
          var tt = {
      Severity: Major
      Found in manager/assets/modext/util/uploaddialog.js - About 1 day to fix

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

          createGrid : function()
          {
            var store = new Ext.data.Store({
              proxy: new Ext.data.MemoryProxy([]),
              reader: new Ext.data.JsonReader({}, Ext.ux.UploadDialog.FileRecord),
        Severity: Minor
        Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

          Function updateToolbar has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

            updateToolbar : function() {
              var tb = this.grid_panel.getBottomToolbar();
              if (this.is_uploading) {
                tb.x_buttons.remove.disable();
                tb.x_buttons.reset.disable();
          Severity: Minor
          Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

            updateToolbar : function() {
              var tb = this.grid_panel.getBottomToolbar();
              if (this.is_uploading) {
                tb.x_buttons.remove.disable();
                tb.x_buttons.reset.disable();
          Severity: Minor
          Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

            Function fillToolbar has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              fillToolbar : function()
              {
                var tb = this.grid_panel.getBottomToolbar();
                tb.x_buttons = {}
                
            Severity: Minor
            Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

              Function computePredicate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                computePredicate : function(predicate, scope, data, event) {
                  var result = false; 
                  
                  switch (Ext.type(predicate)) {
                   case 'function':
              Severity: Minor
              Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

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

                  createInputFile : function()
                  {
                    var button_container = this.el;
                        button_container.position('relative');
                       this.wrap = this.el.wrap({cls:'tbody'});    
                Severity: Minor
                Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

                  Function callAction has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    callAction : function(action, scope, data, event)
                    {
                      switch (Ext.type(action)) {
                         case 'array':
                         for (var i = 0, len = action.length; i < len; i++) {
                  Severity: Minor
                  Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

                    Function Dialog has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Ext.ux.UploadDialog.Dialog = function(config) {
                      var default_config = {
                        border: false,
                        width: 600,
                        height: 350,
                    Severity: Minor
                    Found in manager/assets/modext/util/uploaddialog.js - About 1 hr to fix

                      Function computePredicate has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                        computePredicate : function(predicate, scope, data, event) {
                          var result = false; 
                          
                          switch (Ext.type(predicate)) {
                           case 'function':
                      Severity: Minor
                      Found in manager/assets/modext/util/uploaddialog.js - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function renderStateCell has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        renderStateCell : function(data, cell, record, row_index, column_index, store)
                      Severity: Minor
                      Found in manager/assets/modext/util/uploaddialog.js - About 45 mins to fix

                        Function renderNoteCell has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          renderNoteCell : function(data, cell, record, row_index, column_index, store)
                        Severity: Minor
                        Found in manager/assets/modext/util/uploaddialog.js - About 45 mins to fix

                          Function renderFilenameCell has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            renderFilenameCell : function(data, cell, record, row_index, column_index, store)
                          Severity: Minor
                          Found in manager/assets/modext/util/uploaddialog.js - About 45 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                if ('success' in data.response && data.response.success) {
                                  data.record.set('state', Ext.ux.UploadDialog.FileRecord.STATE_FINISHED);
                                  data.record.set(
                                    'note', data.response.message || data.response.error || this.i18n.note_upload_success
                                  );
                            Severity: Major
                            Found in manager/assets/modext/util/uploaddialog.js - About 40 mins to fix

                              Function callAction has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                callAction : function(action, scope, data, event)
                                {
                                  switch (Ext.type(action)) {
                                     case 'array':
                                     for (var i = 0, len = action.length; i < len; i++) {
                              Severity: Minor
                              Found in manager/assets/modext/util/uploaddialog.js - About 35 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function EventQueue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Ext.ux.Utils.EventQueue = function(handler, scope) {
                                if (!handler) {
                                  throw 'Handler is required.';
                                }
                                this.handler = handler;
                              Severity: Minor
                              Found in manager/assets/modext/util/uploaddialog.js - About 35 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function createInputFile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                createInputFile : function()
                                {
                                  var button_container = this.el;
                                      button_container.position('relative');
                                     this.wrap = this.el.wrap({cls:'tbody'});    
                              Severity: Minor
                              Found in manager/assets/modext/util/uploaddialog.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                renderFilenameCell : function(data, cell, record, row_index, column_index, store)
                                {
                                  var view = this.grid_panel.getView();
                                  var f = function() {
                                    try {
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 3 hrs to fix
                              manager/assets/modext/util/uploaddialog.js on lines 902..916

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 114.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                renderNoteCell : function(data, cell, record, row_index, column_index, store)
                                {
                                  var view = this.grid_panel.getView();
                                  var f = function() {
                                    try {
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 3 hrs to fix
                              manager/assets/modext/util/uploaddialog.js on lines 886..900

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 114.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                initComponent : function()
                                {
                                  Ext.ux.UploadDialog.BrowseButton.superclass.initComponent.call(this);
                                  this.original_handler = this.handler || null;
                                  this.original_scope = this.scope || window;
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 3 hrs to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 57..64

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 103.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  if(this.tooltip){
                                    if(typeof this.tooltip == 'object'){
                                      Ext.QuickTips.register(Ext.apply({target: this.input_file}, this.tooltip));
                                    } 
                                    else {
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 3 hrs to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 109..116

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 97.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      'file-upload-success' : [
                                        {
                                          predicate: this.hasUnuploadedFiles,
                                          action: [
                                            this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, 
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 2 other locations - About 3 hrs to fix
                              manager/assets/modext/util/uploaddialog.js on lines 664..680
                              manager/assets/modext/util/uploaddialog.js on lines 681..697

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 96.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      'file-upload-error' : [
                                        {
                                          predicate: this.hasUnuploadedFiles,
                                          action: [
                                            this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, 
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 2 other locations - About 3 hrs to fix
                              manager/assets/modext/util/uploaddialog.js on lines 647..663
                              manager/assets/modext/util/uploaddialog.js on lines 681..697

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 96.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      'file-upload-failed' : [
                                        {
                                          predicate: this.hasUnuploadedFiles,
                                          action: [
                                            this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, 
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 2 other locations - About 3 hrs to fix
                              manager/assets/modext/util/uploaddialog.js on lines 647..663
                              manager/assets/modext/util/uploaddialog.js on lines 664..680

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 96.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  else {
                                    data.record.set('state', Ext.ux.UploadDialog.FileRecord.STATE_FAILED);
                                    data.record.set(
                                      'note', data.response.message || data.response.error || this.i18n.note_upload_error
                                    );
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 2 hrs to fix
                              manager/assets/modext/util/uploaddialog.js on lines 1145..1150

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 83.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  if ('success' in data.response && data.response.success) {
                                    data.record.set('state', Ext.ux.UploadDialog.FileRecord.STATE_FINISHED);
                                    data.record.set(
                                      'note', data.response.message || data.response.error || this.i18n.note_upload_success
                                    );
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 2 hrs to fix
                              manager/assets/modext/util/uploaddialog.js on lines 1151..1156

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 83.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                destroy : function()
                                {
                                  var input_file = this.detachInputFile(true);
                                  input_file.remove();
                                  input_file = null;
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 2 hrs to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 171..179

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 75.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  tb.x_buttons.upload = tb.addButton({
                                    text: this.i18n.upload_btn_start_text,
                                    tooltip: this.i18n.upload_btn_start_tip,
                                    iconCls: 'ext-ux-uploaddialog-uploadstartbtn',
                                    handler: this.onUploadButtonClick,
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 2 other locations - About 1 hr to fix
                              manager/assets/modext/util/uploaddialog.js on lines 852..858
                              manager/assets/modext/util/uploaddialog.js on lines 859..865

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 69.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  tb.x_buttons.remove = tb.addButton({
                                    text: this.i18n.remove_btn_text,
                                    tooltip: this.i18n.remove_btn_tip,
                                    iconCls: 'ext-ux-uploaddialog-removebtn',
                                    handler: this.onRemoveButtonClick,
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 2 other locations - About 1 hr to fix
                              manager/assets/modext/util/uploaddialog.js on lines 859..865
                              manager/assets/modext/util/uploaddialog.js on lines 866..872

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 69.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  tb.x_buttons.reset = tb.addButton({
                                    text: this.i18n.reset_btn_text,
                                    tooltip: this.i18n.reset_btn_tip,
                                    iconCls: 'ext-ux-uploaddialog-resetbtn',
                                    handler: this.onResetButtonClick,
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 2 other locations - About 1 hr to fix
                              manager/assets/modext/util/uploaddialog.js on lines 852..858
                              manager/assets/modext/util/uploaddialog.js on lines 866..872

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 69.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  if (typeof this.tooltip == 'object') {
                                    Ext.QuickTips.unregister(this.input_file);
                                  }
                                  else {
                                    this.input_file.dom[this.tooltipType] = null;
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 1 hr to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 129..134

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                disable : function()
                                {
                                  Ext.ux.UploadDialog.BrowseButton.superclass.disable.call(this);  
                                  this.input_file.dom.disabled = true;
                                },
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 3 other locations - About 1 hr to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 153..157
                              manager/assets/modext/util/multiuploaddialog.js on lines 162..166
                              manager/assets/modext/util/uploaddialog.js on lines 360..364

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 62.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                enable : function()
                                {
                                  Ext.ux.UploadDialog.BrowseButton.superclass.enable.call(this);
                                  this.input_file.dom.disabled = false;
                                },
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 3 other locations - About 1 hr to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 153..157
                              manager/assets/modext/util/multiuploaddialog.js on lines 162..166
                              manager/assets/modext/util/uploaddialog.js on lines 351..355

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 62.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                onRender : function(ct, position)
                                {
                                  Ext.ux.UploadDialog.BrowseButton.superclass.onRender.call(this, ct, position);
                                  this.createInputFile();
                                },
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 1 hr to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 69..73

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 57.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    {
                                      header: this.i18n.note_col_title,
                                      width: this.i18n.note_col_width, 
                                      dataIndex: 'note',
                                      sortable: true,
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 1 hr to fix
                              manager/assets/modext/util/uploaddialog.js on lines 800..806

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 55.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    {
                                      header: this.i18n.filename_col_title,
                                      width: this.i18n.filename_col_width,
                                      dataIndex: 'filename',
                                      sortable: true,
                              Severity: Major
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 1 hr to fix
                              manager/assets/modext/util/uploaddialog.js on lines 807..813

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 55.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  if (this.handleMouseEvents) {
                                    this.input_file.on('mouseover', this.onMouseOver, this);
                                      this.input_file.on('mousedown', this.onMouseDown, this);
                                  }
                              Severity: Minor
                              Found in manager/assets/modext/util/uploaddialog.js and 1 other location - About 35 mins to fix
                              manager/assets/modext/util/multiuploaddialog.js on lines 104..107

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 46.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              There are no issues that match your filters.

                              Category
                              Status