Undev/redmine-stuff-to-do-plugin

View on GitHub
assets/javascripts/ui/ui.tabs.js

Summary

Maintainability
D
2 days
Test Coverage

Function _tabify has 168 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _tabify: function(init) {

        this.$lis = $('li:has(a[href])', this.element);
        this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
        this.$panels = $([]);
Severity: Major
Found in assets/javascripts/ui/ui.tabs.js - About 6 hrs to fix

    File ui.tabs.js has 408 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * jQuery UI Tabs @VERSION
     *
     * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
     * Dual licensed under the MIT (MIT-LICENSE.txt)
    Severity: Minor
    Found in assets/javascripts/ui/ui.tabs.js - About 5 hrs to fix

      Function load has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          load: function(index, callback) { // callback is for internal usage only
      
              var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
                      bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');
      
      
      Severity: Minor
      Found in assets/javascripts/ui/ui.tabs.js - About 1 hr to fix

        Function add has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            add: function(url, label, index) {
                if (index == undefined)
                    index = this.$tabs.length; // append by default
        
                var o = this.options;
        Severity: Minor
        Found in assets/javascripts/ui/ui.tabs.js - About 1 hr to fix

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

              rotate: function(ms, continuing) {
          
                  continuing = continuing || false;
          
                  var self = this, t = this.options.selected;
          Severity: Minor
          Found in assets/javascripts/ui/ui.tabs.js - About 1 hr to fix

            Avoid deeply nested control flow statements.
            Open

                            else if (self.$lis.filter('.' + o.selectedClass).length)
                                o.selected = self.$lis.index( self.$lis.filter('.' + o.selectedClass)[0] );
            Severity: Major
            Found in assets/javascripts/ui/ui.tabs.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if (index && self.$tabs[index]) o.selected = index;
              Severity: Major
              Found in assets/javascripts/ui/ui.tabs.js - About 45 mins to fix

                There are no issues that match your filters.

                Category
                Status