hauntd/help-center

View on GitHub
modules/management/assets/static/js/management-categories.js

Summary

Maintainability
C
1 day
Test Coverage

Function init has 123 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    init: function() {
        this.treeElement = $('#category-list');
        if (!this.treeElement.length) {
            return false;
        }
Severity: Major
Found in modules/management/assets/static/js/management-categories.js - About 4 hrs to fix

    Function display has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        display: function() {
            var options = {
                dragAndDrop: true,
                selectable: true,
                autoOpen: true,
    Severity: Major
    Found in modules/management/assets/static/js/management-categories.js - About 2 hrs to fix

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

                  onCreateLi: function(node, li) {
                      if (node.isEmpty) {
                          li.addClass('jqtree-empty');
                          return;
                      }
      Severity: Minor
      Found in modules/management/assets/static/js/management-categories.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status