bborn/communityengine

View on GitHub
app/assets/javascripts/tag-it/tag-it.js

Summary

Maintainability
D
2 days
Test Coverage

Function _create has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _create: function() {
            // for handling static scoping inside callbacks
            var that = this;

            // There are 2 kinds of DOM nodes this widget can be instantiated on:
Severity: Major
Found in app/assets/javascripts/tag-it/tag-it.js - About 5 hrs to fix

    File tag-it.js has 402 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
    * jQuery UI Tag-it!
    *
    * @version v2.0 (06/2011)
    *
    Severity: Minor
    Found in app/assets/javascripts/tag-it/tag-it.js - About 5 hrs to fix

      Function createTag has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              createTag: function(value, additionalClass, duringInitialization) {
                  var that = this;
      
                  value = $.trim(value);
      
      
      Severity: Major
      Found in app/assets/javascripts/tag-it/tag-it.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                            if (
                                (event.which === $.ui.keyCode.COMMA && event.shiftKey === false) ||
                                event.which === $.ui.keyCode.ENTER ||
                                (
                                    event.which == $.ui.keyCode.TAB &&
        Severity: Critical
        Found in app/assets/javascripts/tag-it/tag-it.js - About 2 hrs to fix

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

                  destroy: function() {
                      $.Widget.prototype.destroy.call(this);
          
                      this.element.unbind('.tagit');
                      this.tagList.unbind('.tagit');
          Severity: Minor
          Found in app/assets/javascripts/tag-it/tag-it.js - About 1 hr to fix

            Function removeTag has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    removeTag: function(tag, animate) {
                        animate = typeof animate === 'undefined' ? this.options.animate : animate;
            
                        tag = $(tag);
            
            
            Severity: Minor
            Found in app/assets/javascripts/tag-it/tag-it.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status