modxcms/revolution

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

Summary

Maintainability
F
2 wks
Test Coverage

File superboxselect.js has 1483 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Ext.namespace('Ext.ux.form');
/**
 * <p>SuperBoxSelect is an extension of the ComboBox component that displays selected items as labelled boxes within the form field. As seen on facebook, hotmail and other sites.</p>
 * 
 * @author <a href="mailto:dan.humphrey@technomedia.co.uk">Dan Humphrey</a>
Severity: Major
Found in manager/assets/modext/util/superboxselect.js - About 3 days to fix

    Function onKeyDownHandler has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring.
    Open

        onKeyDownHandler : function(e,t) {
                    
            var toDestroy,nextFocus,idx;
            
            if(e.getKey() === e.ESC){
    Severity: Minor
    Found in manager/assets/modext/util/superboxselect.js - About 2 days 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

    SuperBoxSelect has 63 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Ext.ux.form.SuperBoxSelect = Ext.extend(Ext.ux.form.SuperBoxSelect,Ext.form.ComboBox,{
        /**
         * @cfg {Boolean} addNewDataOnBlur Allows adding new items when the user tabs from the input element.
         */
        addNewDataOnBlur : false,
    Severity: Major
    Found in manager/assets/modext/util/superboxselect.js - About 1 day to fix

      Function onKeyDownHandler has 183 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          onKeyDownHandler : function(e,t) {
                      
              var toDestroy,nextFocus,idx;
              
              if(e.getKey() === e.ESC){
      Severity: Major
      Found in manager/assets/modext/util/superboxselect.js - About 7 hrs to fix

        Function doQuery has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            doQuery : function(q, forceAll,valuesQuery, forcedAdd){
                q = Ext.isEmpty(q) ? '' : q;
                if(this.queryFilterRe){
                    this.filteredQueryData = '';
                    var m = q.match(this.queryFilterRe);
        Severity: Minor
        Found in manager/assets/modext/util/superboxselect.js - About 4 hrs 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 addItemBox has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

            addItemBox : function(itemVal,itemDisplay,itemCaption, itemClass, itemStyle) {
                var hConfig, parseStyle = function(s){
                    var ret = '';
                    switch(typeof s){
                        case 'function' :
        Severity: Minor
        Found in manager/assets/modext/util/superboxselect.js - About 2 hrs 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 onStoreLoad has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            onStoreLoad : function(store, records, options){
                //accomodating for bug in Ext 3.0.0 where options.params are empty
                var q = options.params[this.queryParam] || store.baseParams[this.queryParam] || "",
                    isValuesQuery = options.params[this.queryValuesIndicator] || store.baseParams[this.queryValuesIndicator];
                
        Severity: Major
        Found in manager/assets/modext/util/superboxselect.js - About 2 hrs to fix

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

              addItemBox : function(itemVal,itemDisplay,itemCaption, itemClass, itemStyle) {
                  var hConfig, parseStyle = function(s){
                      var ret = '';
                      switch(typeof s){
                          case 'function' :
          Severity: Major
          Found in manager/assets/modext/util/superboxselect.js - About 2 hrs to fix

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

                markInvalid : function(msg) {
                    var elp, t;
            
                    if (!this.rendered || this.preventMark ) {
                        return;
            Severity: Major
            Found in manager/assets/modext/util/superboxselect.js - About 2 hrs to fix

              Function setupKeyMap has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  setupKeyMap : function(){
                      this.keyMap = new Ext.KeyMap(this.lnk, [
                          {
                              key: [
                                  Ext.EventObject.BACKSPACE, 
              Severity: Minor
              Found in manager/assets/modext/util/superboxselect.js - About 2 hrs to fix

                Function doQuery has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    doQuery : function(q, forceAll,valuesQuery, forcedAdd){
                        q = Ext.isEmpty(q) ? '' : q;
                        if(this.queryFilterRe){
                            this.filteredQueryData = '';
                            var m = q.match(this.queryFilterRe);
                Severity: Minor
                Found in manager/assets/modext/util/superboxselect.js - About 1 hr to fix

                  Function markInvalid has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      markInvalid : function(msg) {
                          var elp, t;
                  
                          if (!this.rendered || this.preventMark ) {
                              return;
                  Severity: Minor
                  Found in manager/assets/modext/util/superboxselect.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 initEvents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      initEvents : function() {
                          var el = this.el;
                          el.on({
                              click   : this.onClick,
                              focus   : this.clearCurrentFocus,
                  Severity: Minor
                  Found in manager/assets/modext/util/superboxselect.js - About 1 hr to fix

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

                        onRender : function(ct, position){
                            
                            Ext.ux.form.SuperBoxSelectItem.superclass.onRender.call(this, ct, position);
                            
                            var el = this.el;
                    Severity: Minor
                    Found in manager/assets/modext/util/superboxselect.js - About 1 hr to fix

                      Function clearInvalid has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          clearInvalid : function(){
                              if(!this.rendered || this.preventMark){ // not rendered
                                  return;
                              }
                              this.outerWrapEl.removeClass(this.invalidClass);
                      Severity: Minor
                      Found in manager/assets/modext/util/superboxselect.js - About 1 hr to fix

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

                            initComponent:function() {
                               Ext.apply(this, {
                                    items            : new Ext.util.MixedCollection(false),
                                    usedRecords      : new Ext.util.MixedCollection(false),
                                    addedRecords     : [],
                        Severity: Minor
                        Found in manager/assets/modext/util/superboxselect.js - About 1 hr to fix

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

                              initEvents : function() {
                                  var el = this.el;
                                  el.on({
                                      click   : this.onClick,
                                      focus   : this.clearCurrentFocus,
                          Severity: Minor
                          Found in manager/assets/modext/util/superboxselect.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 doTransform has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              doTransform : function() {
                                  var s = Ext.getDom(this.transform), transformValues = [];
                                      if(!this.store){
                                          this.mode = 'local';
                                          var d = [], opts = s.options;
                          Severity: Minor
                          Found in manager/assets/modext/util/superboxselect.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 doTransform has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              doTransform : function() {
                                  var s = Ext.getDom(this.transform), transformValues = [];
                                      if(!this.store){
                                          this.mode = 'local';
                                          var d = [], opts = s.options;
                          Severity: Minor
                          Found in manager/assets/modext/util/superboxselect.js - About 1 hr to fix

                            Function initButtonEvents has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                                initButtonEvents : function() {
                                    this.buttonClear.addClassOnOver('x-superboxselect-btn-over').on('click', function(e) {
                                        e.stopEvent();
                                        if (this.disabled) {
                                            return;
                            Severity: Minor
                            Found in manager/assets/modext/util/superboxselect.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 autoSize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                autoSize : function(){
                                    if(!this.rendered){
                                        return this;
                                    }
                                    if(!this.metrics){
                            Severity: Minor
                            Found in manager/assets/modext/util/superboxselect.js - About 1 hr to fix

                              Function onSelect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  onSelect : function(record, index) {
                                      if (this.fireEvent('beforeselect', this, record, index) !== false){
                                          var val = record.data[this.valueField];
                                          
                                          if(this.preventDuplicates && this.hasValue(val)){
                              Severity: Minor
                              Found in manager/assets/modext/util/superboxselect.js - About 55 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 onResize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  onResize : function(w, h, rw, rh) {
                                      var reduce = Ext.isIE6 ? 4 : Ext.isIE7 ? 1 : Ext.isIE8 ? 1 : 0;
                                      if(this.wrapEl){
                                          this._width = w;
                                          this.outerWrapEl.setWidth(w - reduce);
                              Severity: Minor
                              Found in manager/assets/modext/util/superboxselect.js - About 55 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 onStoreLoad has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  onStoreLoad : function(store, records, options){
                                      //accomodating for bug in Ext 3.0.0 where options.params are empty
                                      var q = options.params[this.queryParam] || store.baseParams[this.queryParam] || "",
                                          isValuesQuery = options.params[this.queryValuesIndicator] || store.baseParams[this.queryValuesIndicator];
                                      
                              Severity: Minor
                              Found in manager/assets/modext/util/superboxselect.js - About 55 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 onRender has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  onRender : function(ct, position){
                                      
                                      Ext.ux.form.SuperBoxSelectItem.superclass.onRender.call(this, ct, position);
                                      
                                      var el = this.el;
                              Severity: Minor
                              Found in manager/assets/modext/util/superboxselect.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

                              Avoid deeply nested control flow statements.
                              Open

                                                      if(this.currentFocus){
                                                          this.currentFocus.onLnkFocus();
                                                      }
                              Severity: Major
                              Found in manager/assets/modext/util/superboxselect.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if(this.navigateItemsWithTab){
                                                            it.onElClick();
                                                        }else{
                                                            this.on('expand',function(){
                                                                this.collapse();
                                Severity: Major
                                Found in manager/assets/modext/util/superboxselect.js - About 45 mins to fix

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

                                      setupFormInterception : function(){
                                          var form;
                                          this.findParentBy(function(p){ 
                                              if(p.getForm){
                                                  form = p.getForm();
                                  Severity: Minor
                                  Found in manager/assets/modext/util/superboxselect.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

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if (this.editable !== false && (!e.isSpecialKey() || e.getKey() === e.BACKSPACE) && this.itemDelimiterKey.indexOf !== e.getKey()  && (!e.hasModifier() || e.shiftKey)) {
                                              this.lastKey = e.getKey();
                                              this.dqTask.delay(this.queryDelay);
                                          }        
                                  Severity: Major
                                  Found in manager/assets/modext/util/superboxselect.js - About 40 mins to fix

                                    Function addItemBox has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        addItemBox : function(itemVal,itemDisplay,itemCaption, itemClass, itemStyle) {
                                    Severity: Minor
                                    Found in manager/assets/modext/util/superboxselect.js - About 35 mins to fix

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

                                          initComponent:function() {
                                             Ext.apply(this, {
                                                  items            : new Ext.util.MixedCollection(false),
                                                  usedRecords      : new Ext.util.MixedCollection(false),
                                                  addedRecords     : [],
                                      Severity: Minor
                                      Found in manager/assets/modext/util/superboxselect.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

                                      Avoid too many return statements within this function.
                                      Open

                                                      return true;
                                      Severity: Major
                                      Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                return true;
                                        Severity: Major
                                        Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                      return true;
                                          Severity: Major
                                          Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                            return;
                                            Severity: Major
                                            Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                              return true;
                                              Severity: Major
                                              Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                            return true;
                                                Severity: Major
                                                Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                              return;
                                                  Severity: Major
                                                  Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                                return;
                                                    Severity: Major
                                                    Found in manager/assets/modext/util/superboxselect.js - About 30 mins to fix

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

                                                          clearInvalid : function(){
                                                              if(!this.rendered || this.preventMark){ // not rendered
                                                                  return;
                                                              }
                                                              this.outerWrapEl.removeClass(this.invalidClass);
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.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 autoSize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          autoSize : function(){
                                                              if(!this.rendered){
                                                                  return this;
                                                              }
                                                              if(!this.metrics){
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js - About 25 mins to fix

                                                      Cognitive Complexity

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

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

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

                                                      Further reading

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

                                                          onDisable: function(){
                                                              Ext.ux.form.SuperBoxSelect.superclass.onDisable.call(this);
                                                              this.items.each(function(item){
                                                                  item.disable();
                                                              });
                                                      Severity: Major
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 2 hrs to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 682..690

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

                                                      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

                                                          onEnable: function(){
                                                              Ext.ux.form.SuperBoxSelect.superclass.onEnable.call(this);
                                                              this.items.each(function(item){
                                                                  item.enable();
                                                              });
                                                      Severity: Major
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 2 hrs to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 691..699

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

                                                      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

                                                                  {
                                                                      key: [Ext.EventObject.LEFT,Ext.EventObject.UP],
                                                                      fn: function(){
                                                                          this.moveFocus('left');
                                                                      },
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 50 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 1790..1799

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

                                                      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

                                                                  }, {
                                                                      key: [
                                                                          Ext.EventObject.RIGHT,
                                                                          Ext.EventObject.DOWN
                                                                      ],
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 50 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 1800..1806

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

                                                      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

                                                          enableLnkListeners : function() {
                                                              this.lnk.on({
                                                                  click: this.onLnkClick,
                                                                  focus: this.onLnkFocus,
                                                                  blur:  this.onLnkBlur,
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 50 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 234..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 51.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                              if(this.forceFormValue){
                                                                  this.items.on({
                                                                     add: this.manageNameAttribute,
                                                                     remove: this.manageNameAttribute,
                                                                     clear: this.manageNameAttribute,
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 50 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 1705..1712

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

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                                      if(idx < (this.items.getCount() -1)){
                                                                          nextFocus = this.items.itemAt(idx+1);
                                                                      }
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 40 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 756..758

                                                      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

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

                                                                  if(idx < (this.items.getCount() -1)){
                                                                      nextFocus = this.items.itemAt(idx+1);
                                                                  }
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 40 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 828..830

                                                      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

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

                                                                  if(nextFocus){
                                                                      (function(){
                                                                          nextFocus.onLnkFocus();
                                                                          this.currentFocus = nextFocus;
                                                                      }).defer(200,this);
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 30 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 834..839

                                                      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

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

                                                                      if(nextFocus){
                                                                          (function(){
                                                                              nextFocus.onLnkFocus();
                                                                              this.currentFocus = nextFocus;
                                                                          }).defer(200,this);
                                                      Severity: Minor
                                                      Found in manager/assets/modext/util/superboxselect.js and 1 other location - About 30 mins to fix
                                                      manager/assets/modext/util/superboxselect.js on lines 761..766

                                                      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