myems-admin/js/jcui/angular.integralui.checkbox.min.js

Summary

Maintainability
F
1 wk
Test Coverage

Function link has 247 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        link: function(b, f, m, a, t) {
          var g = this,
            e = f.children().eq(0),
            h = f.children().eq(1);
          b.$on("$destroy", function(a) {
Severity: Major
Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js - About 1 day to fix

    File angular.integralui.checkbox.min.js has 544 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
      filename: angular.integralui.checkbox.min.js
      version : 1.4.5
      Copyright � 2014-2018 Lidor Systems. All rights reserved.
    
    
    Severity: Major
    Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js - About 1 day to fix

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

                a.updateCheckMark = function() {
                  if (e) {
                    var b = getComputedStyle(e[0])["background-image"];
                    if (b && "none" != b) k();
                    else if ("CANVAS" == e[0].tagName) {
      Severity: Minor
      Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js - About 1 hr to fix

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

                  a.updateLayout = function() {
                    if (a.allowUpdate) {
                      n();
                      a.refresh();
                      var b = c(function() {
        Severity: Minor
        Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js - About 1 hr to fix

          Function b has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                        var b = c(function() {
                          var d = "ltr";
                          !0 === a.options.rtl && (d = "rtl");
                          f.css("direction", d);
                          if (
          Severity: Minor
          Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js - About 1 hr to fix

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

                    link: function(b, f, m, a, t) {
            Severity: Minor
            Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js - About 35 mins to fix

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

                    this.callClick = function(a) {
                      a = b.getCheckValue(a);
                      var d = "checked" == a ? !0 : !1;
                      angular.isDefined(c.events) && c.events.click
                        ? c.events.click({ checked: d, checkState: a })
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 2 other locations - About 4 hrs to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 120..126
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 134..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 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 3 locations. Consider refactoring.
              Open

                    this.callCheckStateChanged = function(a) {
                      a = b.getCheckValue(a);
                      var d = "checked" == a ? !0 : !1;
                      angular.isDefined(c.events) && c.events.checkstateChanged
                        ? c.events.checkstateChanged({ checked: d, checkState: a })
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 2 other locations - About 4 hrs to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 120..126
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 141..147

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

                    this.callCheckedChanged = function(a) {
                      a = b.getCheckValue(a);
                      var d = "checked" == a ? !0 : !1;
                      angular.isDefined(c.events) && c.events.checkedChanged
                        ? c.events.checkedChanged({ checked: d, checkState: a })
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 2 other locations - About 4 hrs to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 134..140
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 141..147

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

                    this.callCheckedChanging = function(a) {
                      a = b.getCheckValue(a);
                      var d = "checked" == a ? !0 : !1;
                      return angular.isDefined(c.events) && c.events.checkedChanging
                        ? c.events.checkedChanging({ checked: d, checkState: a })
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 4 hrs to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 127..133

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

                    this.callCheckStateChanging = function(a) {
                      a = b.getCheckValue(a);
                      var d = "checked" == a ? !0 : !1;
                      return angular.isDefined(c.events) && c.events.checkstateChanging
                        ? c.events.checkstateChanging({ checked: d, checkState: a })
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 4 hrs to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 113..119

              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

                    this.callStyleChanged = function(a) {
                      angular.isDefined(c.events) && c.events.styleChanged
                        ? c.events.styleChanged({ style: a })
                        : c.styleChanged({ e: { style: a } });
                    };
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 3 other locations - About 2 hrs to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 148..152
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 1534..1538
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 1550..1554

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

              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

                    this.callEnabledChanged = function(a) {
                      angular.isDefined(c.events) && c.events.enabledChanged
                        ? c.events.enabledChanged({ enabled: a })
                        : c.enabledChanged({ e: { enabled: a } });
                    };
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 3 other locations - About 2 hrs to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 153..157
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 1534..1538
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 1550..1554

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

              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

                              0 == a.options.enabled &&
                                a.options.controlStyle.content.disabled &&
                                d.isString(a.options.controlStyle.content.disabled) &&
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 1 hr to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 437..439

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

              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

                    c.$watch("controlStyle", function(a, c) {
                      a !== c &&
                        ((b.options.controlStyle = a), b.refresh(), b.callStyleChanged(a));
                    });
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 1 hr to fix
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2425..2428

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

              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

                            0 == a.options.enabled &&
                            a.options.controlStyle.box.disabled &&
                            d.isString(a.options.controlStyle.box.disabled)
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 1 hr to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 464..466

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

              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

                                (0 != a.options.enabled &&
                                  (a.setCheckValue(a.options.checkState),
                                  a.callClick(a.options.checkState),
                                  a.updateLayout()),
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 1 hr to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 321..324

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

              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

                              0 != a.options.enabled &&
                                (a.setCheckValue(a.options.checkState),
                                a.callClick(a.options.checkState),
                                a.updateLayout());
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 1 hr to fix
              myems-admin/js/jcui/angular.integralui.checkbox.min.js on lines 335..338

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

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

                    c.$watch("rtl", function(a, c) {
                      a !== c && ((b.options.rtl = a), b.updateLayout());
                    });
              Severity: Major
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 15 other locations - About 50 mins to fix
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2395..2397
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2398..2400
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2404..2406
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2410..2412
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2413..2415
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2429..2431
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2435..2437
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2438..2440
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2453..2455
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2456..2458
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2459..2461
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2462..2464
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2465..2467
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2468..2470
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2471..2473

              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

                    c.$watch(
                      "options",
                      function(a, c) {
                        a !== c && (b.updateOptions(a), b.updateLayout());
                      },
              Severity: Minor
              Found in myems-admin/js/jcui/angular.integralui.checkbox.min.js and 1 other location - About 50 mins to fix
              myems-admin/js/jcui/angular.integralui.treeview.min.js on lines 2388..2394

              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

              There are no issues that match your filters.

              Category
              Status