wikimedia/mediawiki-extensions-Wikibase

View on GitHub
view/resources/jquery/ui/jquery.ui.tagadata.js

Summary

Maintainability
C
1 day
Test Coverage

File jquery.ui.tagadata.js has 305 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * 'tag-a-data' jQuery widget
 *
 * 'tag-a-data' is based on the original jQuery extension 'tag-it' v2.0 (06/2011) by
 *   Levy Carneiro Jr.
Severity: Minor
Found in view/resources/jquery/ui/jquery.ui.tagadata.js - About 3 hrs to fix

    Function _initTagEvents has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _initTagEvents: function ( $tag ) {
                var self = this,
                    $input = $tag.find( 'input' );
    
                $input
    Severity: Major
    Found in view/resources/jquery/ui/jquery.ui.tagadata.js - About 2 hrs to fix

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

              createTag: function ( value, additionalClasses, forceTextInput ) {
                  value = this._formatLabel( value );
      
                  var $tag = this.getTag( value );
      
      
      Severity: Minor
      Found in view/resources/jquery/ui/jquery.ui.tagadata.js - About 1 hr to fix

        Function _createHelperTag has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _createHelperTag: function () {
                    var $tag = this.createTag( '', '', true ),
                        input = $tag.find( 'input' );
        
                    // Add placeholder and auto-expand afterwards:
        Severity: Minor
        Found in view/resources/jquery/ui/jquery.ui.tagadata.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status