modxcms/revolution

View on GitHub
manager/assets/modext/widgets/media/modx.browser.js

Summary

Maintainability
F
1 mo
Test Coverage

File modx.browser.js has 1316 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Ext.namespace('MODx.browser');

MODx.Browser = function(config) {
    if (MODx.browserOpen && !config.multiple) return false;
    if (!config.multiple) MODx.browserOpen = true;
Severity: Major
Found in manager/assets/modext/widgets/media/modx.browser.js - About 3 days to fix

    Function RTE has 155 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    MODx.browser.RTE = function(config) {
        config = config || {};
    
        this.ident = config.ident || Ext.id();
    
    
    Severity: Major
    Found in manager/assets/modext/widgets/media/modx.browser.js - About 6 hrs to fix

      Function Window has 152 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      MODx.browser.Window = function(config) {
          config = config || {};
      
          this.ident = Ext.id();
      
      
      Severity: Major
      Found in manager/assets/modext/widgets/media/modx.browser.js - About 6 hrs to fix

        Function Media has 124 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        MODx.Media = function(config) {
            config = config || {};
        
            this.ident = config.ident || Ext.id();
        
        
        Severity: Major
        Found in manager/assets/modext/widgets/media/modx.browser.js - About 4 hrs to fix

          Function getToolbar has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              ,getToolbar: function() {
                  return [{
                      text: _('filter')+':'
                      ,xtype: 'label'
                  },{
          Severity: Major
          Found in manager/assets/modext/widgets/media/modx.browser.js - About 3 hrs to fix

            Function getToolbar has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                ,getToolbar: function() {
                    return [{
                        text: _('filter')+':'
                        ,xtype: 'label'
                    },{
            Severity: Major
            Found in manager/assets/modext/widgets/media/modx.browser.js - About 3 hrs to fix

              Function getToolbar has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  ,getToolbar: function() {
                      return [{
                          text: _('filter')+':'
                          ,xtype: 'label'
                      },{
              Severity: Major
              Found in manager/assets/modext/widgets/media/modx.browser.js - About 3 hrs to fix

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

                    ,_initTemplates: function() {
                        this.templates.thumb = new Ext.XTemplate(
                            '<tpl for=".">'
                                ,'<div class="modx-browser-thumb-wrap" id="{name:htmlEncode}" title="{name:htmlEncode}">'
                                ,'  <div class="modx-browser-thumb">'
                Severity: Major
                Found in manager/assets/modext/widgets/media/modx.browser.js - About 2 hrs to fix

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

                  MODx.browser.View = function(config) {
                      config = config || {};
                      this.ident = config.ident+'-view' || 'modx-browser-'+Ext.id()+'-view';
                  
                      this._initTemplates();
                  Severity: Major
                  Found in manager/assets/modext/widgets/media/modx.browser.js - About 2 hrs to fix

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

                    MODx.browser.View = function(config) {
                        config = config || {};
                        this.ident = config.ident+'-view' || 'modx-browser-'+Ext.id()+'-view';
                    
                        this._initTemplates();
                    Severity: Minor
                    Found in manager/assets/modext/widgets/media/modx.browser.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 showFullView has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                        ,showFullView: function(name,ident) {
                            var data = this.lookup[name];
                            if (!data) return;
                    
                            if (!this.fvWin) {
                    Severity: Minor
                    Found in manager/assets/modext/widgets/media/modx.browser.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 showFullView has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        ,showFullView: function(name,ident) {
                            var data = this.lookup[name];
                            if (!data) return;
                    
                            if (!this.fvWin) {
                    Severity: Minor
                    Found in manager/assets/modext/widgets/media/modx.browser.js - About 1 hr to fix

                      Function showDetails has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                          ,showDetails: function() {
                              var node = this.getSelectedNodes();
                              var detailPanel = Ext.getCmp(this.config.ident+'-img-detail-panel').body;
                              var okBtn = Ext.getCmp(this.ident+'-ok-btn');
                              if (node && node.length > 0) {
                      Severity: Minor
                      Found in manager/assets/modext/widgets/media/modx.browser.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 getPathbar has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          ,getPathbar: function() {
                              return {
                                  cls: 'modx-browser-pathbbar'
                                  ,items: [{
                                      xtype: 'textfield'
                      Severity: Minor
                      Found in manager/assets/modext/widgets/media/modx.browser.js - About 1 hr to fix

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

                            ,getPathbar: function() {
                                return {
                                    cls: 'modx-browser-pathbbar'
                                    ,items: [{
                                        xtype: 'textfield'
                        Severity: Minor
                        Found in manager/assets/modext/widgets/media/modx.browser.js - About 1 hr to fix

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

                              ,quickUpdateFile: function(item,e) {
                                  var node = this.cm.activeNode;
                                  var data = this.lookup[node.id];
                                  MODx.Ajax.request({
                                      url: MODx.config.connector_url
                          Severity: Minor
                          Found in manager/assets/modext/widgets/media/modx.browser.js - About 1 hr to fix

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

                                ,getPathbar: function() {
                                    return {
                                        cls: 'modx-browser-pathbbar'
                                        ,items: [{
                                            xtype: 'textfield'
                            Severity: Minor
                            Found in manager/assets/modext/widgets/media/modx.browser.js - About 1 hr to fix

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

                              MODx.browser.Window = function(config) {
                                  config = config || {};
                              
                                  this.ident = Ext.id();
                              
                              
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.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 formatData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  ,formatData: function(data) {
                                      var formatSize = function(size){
                                          if(size < 1024) {
                                              return size + " bytes";
                                          } else {
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.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 RTE has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              MODx.browser.RTE = function(config) {
                                  config = config || {};
                              
                                  this.ident = config.ident || Ext.id();
                              
                              
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.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

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

                              MODx.Media = function(config) {
                                  config = config || {};
                              
                                  this.ident = config.ident || Ext.id();
                              
                              
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.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

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

                                  this.tree = MODx.load({
                                      xtype: 'modx-tree-directory'
                                      ,onUpload: function() {
                                          this.view.run();
                                      }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 4 days to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 430..508
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1163..1241

                              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 678.

                              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 3 locations. Consider refactoring.
                              Open

                                  this.tree = MODx.load({
                                      xtype: 'modx-tree-directory'
                                      ,onUpload: function() {
                                          this.view.run();
                                      }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 4 days to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 814..892
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1163..1241

                              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 678.

                              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 3 locations. Consider refactoring.
                              Open

                                  this.tree = MODx.load({
                                      xtype: 'modx-tree-directory'
                                      ,onUpload: function() {
                                          this.view.run();
                                      }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 4 days to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 430..508
                              manager/assets/modext/widgets/media/modx.browser.js on lines 814..892

                              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 678.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,getToolbar: function() {
                                      return [{
                                          text: _('filter')+':'
                                          ,xtype: 'label'
                                      },{
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 2 days to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1008..1085
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1383..1460

                              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 505.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,getToolbar: function() {
                                      return [{
                                          text: _('filter')+':'
                                          ,xtype: 'label'
                                      },{
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 2 days to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 653..730
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1383..1460

                              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 505.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,getToolbar: function() {
                                      return [{
                                          text: _('filter')+':'
                                          ,xtype: 'label'
                                      },{
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 2 days to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 653..730
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1008..1085

                              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 505.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,getPathbar: function() {
                                      return {
                                          cls: 'modx-browser-pathbbar'
                                          ,items: [{
                                              xtype: 'textfield'
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 1 day to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 737..771
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1467..1501

                              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 267.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,getPathbar: function() {
                                      return {
                                          cls: 'modx-browser-pathbbar'
                                          ,items: [{
                                              xtype: 'textfield'
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 1 day to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1092..1126
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1467..1501

                              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 267.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,getPathbar: function() {
                                      return {
                                          cls: 'modx-browser-pathbbar'
                                          ,items: [{
                                              xtype: 'textfield'
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 1 day to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 737..771
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1092..1126

                              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 267.

                              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 3 locations. Consider refactoring.
                              Open

                                  this.view = MODx.load({
                                      xtype: 'modx-browser-view'
                                      ,onSelect: {
                                          fn: this.onSelect
                                          ,scope: this
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 5 hrs to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 511..524
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1244..1257

                              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 138.

                              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 3 locations. Consider refactoring.
                              Open

                                  this.view = MODx.load({
                                      xtype: 'modx-browser-view'
                                      ,onSelect: {
                                          fn: this.onSelect
                                          ,scope: this
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 5 hrs to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 895..908
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1244..1257

                              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 138.

                              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 3 locations. Consider refactoring.
                              Open

                                  this.view = MODx.load({
                                      xtype: 'modx-browser-view'
                                      ,onSelect: {
                                          fn: this.onSelect
                                          ,scope: this
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 5 hrs to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 511..524
                              manager/assets/modext/widgets/media/modx.browser.js on lines 895..908

                              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 138.

                              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

                                  ,load: function(dir) {
                                      dir = dir || (Ext.isEmpty(this.config.openTo) ? '' : this.config.openTo);
                                      this.view.run({
                                          dir: dir
                                          ,source: this.config.source
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 4 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 137..146
                              manager/assets/modext/widgets/media/modx.browser.js on lines 607..616
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1337..1346

                              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 134.

                              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

                                  ,load: function(dir) {
                                      dir = dir || (Ext.isEmpty(this.config.openTo) ? '' : this.config.openTo);
                                      this.view.run({
                                          dir: dir
                                          ,source: this.config.source
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 4 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 137..146
                              manager/assets/modext/widgets/media/modx.browser.js on lines 607..616
                              manager/assets/modext/widgets/media/modx.browser.js on lines 962..971

                              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 134.

                              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

                                  ,load: function(dir) {
                                      dir = dir || (Ext.isEmpty(this.config.openTo) ? '' : this.config.openTo);
                                      this.view.run({
                                          dir: dir
                                          ,source: this.config.source
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 4 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 137..146
                              manager/assets/modext/widgets/media/modx.browser.js on lines 962..971
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1337..1346

                              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 134.

                              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

                                  ,reset: function() {
                                      if (this.rendered) {
                                          Ext.getCmp(this.ident+'filter').reset();
                                          this.view.getEl().dom.scrollTop = 0;
                                      }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 3 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 169..176
                              manager/assets/modext/widgets/media/modx.browser.js on lines 639..646
                              manager/assets/modext/widgets/media/modx.browser.js on lines 994..1001

                              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 110.

                              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

                                  ,reset: function() {
                                      if (this.rendered) {
                                          Ext.getCmp(this.ident+'filter').reset();
                                          this.view.getEl().dom.scrollTop = 0;
                                      }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 3 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 169..176
                              manager/assets/modext/widgets/media/modx.browser.js on lines 994..1001
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1369..1376

                              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 110.

                              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

                                  ,reset: function() {
                                      if (this.rendered) {
                                          Ext.getCmp(this.ident+'filter').reset();
                                          this.view.getEl().dom.scrollTop = 0;
                                      }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 3 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 169..176
                              manager/assets/modext/widgets/media/modx.browser.js on lines 639..646
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1369..1376

                              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 110.

                              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

                                  ,sortStore: function(){
                                      var v = Ext.getCmp(this.ident+'sortSelect').getValue();
                                      this.view.store.sort(v, v == 'name' ? 'ASC' : 'DESC');
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 2 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 151..155
                              manager/assets/modext/widgets/media/modx.browser.js on lines 976..980
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1351..1355

                              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 89.

                              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

                                  ,sortStore: function(){
                                      var v = Ext.getCmp(this.ident+'sortSelect').getValue();
                                      this.view.store.sort(v, v == 'name' ? 'ASC' : 'DESC');
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 2 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 151..155
                              manager/assets/modext/widgets/media/modx.browser.js on lines 621..625
                              manager/assets/modext/widgets/media/modx.browser.js on lines 976..980

                              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 89.

                              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

                                  ,sortStore: function(){
                                      var v = Ext.getCmp(this.ident+'sortSelect').getValue();
                                      this.view.store.sort(v, v == 'name' ? 'ASC' : 'DESC');
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 2 hrs to fix
                              manager/assets/modext/widgets/media/browser.js on lines 151..155
                              manager/assets/modext/widgets/media/modx.browser.js on lines 621..625
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1351..1355

                              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 89.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,filter : function() {
                                      var filter = Ext.getCmp(this.ident+'filter');
                                      this.view.store.filter('name', filter.getValue(), true);
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 2 hrs to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 595..599
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1326..1330

                              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 80.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,filter : function() {
                                      var filter = Ext.getCmp(this.ident+'filter');
                                      this.view.store.filter('name', filter.getValue(), true);
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 2 hrs to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 951..955
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1326..1330

                              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 80.

                              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 3 locations. Consider refactoring.
                              Open

                                  ,filter : function() {
                                      var filter = Ext.getCmp(this.ident+'filter');
                                      this.view.store.filter('name', filter.getValue(), true);
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 2 hrs to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 595..599
                              manager/assets/modext/widgets/media/modx.browser.js on lines 951..955

                              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 80.

                              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

                                  ,changeViewmode: function() {
                                      var v = Ext.getCmp(this.ident+'viewSelect').getValue();
                                      this.view.setTemplate(v);
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 1 hr to fix
                              manager/assets/modext/widgets/media/browser.js on lines 160..164
                              manager/assets/modext/widgets/media/modx.browser.js on lines 630..634
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1360..1364

                              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 74.

                              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

                                  ,changeViewmode: function() {
                                      var v = Ext.getCmp(this.ident+'viewSelect').getValue();
                                      this.view.setTemplate(v);
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 1 hr to fix
                              manager/assets/modext/widgets/media/browser.js on lines 160..164
                              manager/assets/modext/widgets/media/modx.browser.js on lines 630..634
                              manager/assets/modext/widgets/media/modx.browser.js on lines 985..989

                              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 74.

                              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

                                  ,changeViewmode: function() {
                                      var v = Ext.getCmp(this.ident+'viewSelect').getValue();
                                      this.view.setTemplate(v);
                                      this.view.select(0);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 1 hr to fix
                              manager/assets/modext/widgets/media/browser.js on lines 160..164
                              manager/assets/modext/widgets/media/modx.browser.js on lines 985..989
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1360..1364

                              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 74.

                              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

                                                  var w = MODx.load({
                                                      xtype: 'modx-window-file-quick-update'
                                                      ,record: r
                                                      ,listeners: {
                                                          'hide':{fn:function() {this.destroy();}}
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 1 hr to fix
                              manager/assets/modext/widgets/system/modx.tree.directory.js on lines 398..404

                              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 58.

                              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

                                      ,items: [{
                                          id: this.ident+'-browser-tree'
                                          ,cls: 'modx-browser-tree'
                                          ,region: 'west'
                                          ,width: 250
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 55 mins to fix
                              manager/assets/modext/widgets/core/modx.rte.browser.js on lines 64..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 54.

                              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

                                              'success':{fn:function(r) {
                                                  this.config.tree.refreshParentNode();
                                                  this.run();
                                              },scope:this}
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 45 mins to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 238..241

                              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 50.

                              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

                                              'success': {fn:function(r) {
                                                  this.config.tree.refreshParentNode();
                                                  this.run();
                                              },scope:this}
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 45 mins to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 176..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 50.

                              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

                                      ,items: [{
                                          region: 'west'
                                          ,width: 250
                                          ,items: this.tree
                                          ,id: this.ident+'-browser-tree'
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 40 mins to fix
                              manager/assets/modext/widgets/media/browser.js on lines 87..95

                              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 49.

                              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 3 locations. Consider refactoring.
                              Open

                                          if (window.top.opener) {
                                              window.top.close();
                                              window.top.opener.focus();
                                          }
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 35 mins to fix
                              manager/assets/modext/widgets/core/modx.rte.browser.js on lines 233..236
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1528..1531

                              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 47.

                              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 3 locations. Consider refactoring.
                              Open

                                      if (window.top.opener) {
                                          window.top.close();
                                          window.top.opener.focus();
                                      }
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 2 other locations - About 35 mins to fix
                              manager/assets/modext/widgets/core/modx.rte.browser.js on lines 233..236
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1516..1519

                              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 47.

                              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 4 locations. Consider refactoring.
                              Open

                                  ,onSelectHandler: function(data) {
                                      Ext.get(this.returnEl).dom.value = unescape(data.url);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 35 mins to fix
                              manager/assets/modext/widgets/core/modx.rte.browser.js on lines 240..242
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1136..1138
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1534..1536

                              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

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

                                  ,onSelectHandler: function(data) {
                                      Ext.get(this.returnEl).dom.value = unescape(data.url);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 35 mins to fix
                              manager/assets/modext/widgets/core/modx.rte.browser.js on lines 240..242
                              manager/assets/modext/widgets/media/modx.browser.js on lines 791..793
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1534..1536

                              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

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

                                  ,onSelectHandler: function(data) {
                                      Ext.get(this.returnEl).dom.value = unescape(data.url);
                                  }
                              Severity: Major
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 3 other locations - About 35 mins to fix
                              manager/assets/modext/widgets/core/modx.rte.browser.js on lines 240..242
                              manager/assets/modext/widgets/media/modx.browser.js on lines 791..793
                              manager/assets/modext/widgets/media/modx.browser.js on lines 1136..1138

                              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

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

                                          ,params: {
                                              action: 'browser/file/get'
                                              ,file:  data.pathRelative
                                              ,wctx: MODx.ctx || ''
                                              ,source: this.config.source
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 35 mins to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 193..198

                              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

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

                                          ,params: {
                                              action: 'browser/file/download'
                                              ,file: data.pathRelative
                                              ,wctx: MODx.ctx || ''
                                              ,source: this.config.source
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 35 mins to fix
                              manager/assets/modext/widgets/media/modx.browser.js on lines 135..140

                              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

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

                                      },{
                                          id: this.ident+'-img-detail-panel'
                                          ,cls: 'modx-browser-details-ct'
                                          ,region: 'east'
                                          ,split: true
                              Severity: Minor
                              Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 30 mins to fix
                              manager/assets/modext/widgets/core/modx.rte.browser.js on lines 81..89

                              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 45.

                              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