Showing 32 of 46 total issues

File chosen.jquery.js has 1109 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com

Version 1.1.0
Severity: Major
Found in app/assets/javascripts/chosen.jquery.js - About 2 days to fix

    Function factory has 371 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var factory = function( $, DataTable ) {
    "use strict";
    
    /**
     * Responsive is a plug-in for the DataTables library that makes use of
    Severity: Major
    Found in app/assets/javascripts/dataTables.responsive.js - About 1 day to fix

      File dataTables.responsive.js has 385 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! Responsive 1.0.1
       * 2014 SpryMedia Ltd - datatables.net/license
       */
      
      /**
      Severity: Minor
      Found in app/assets/javascripts/dataTables.responsive.js - About 5 hrs to fix

        Function _classLogic has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _classLogic: function ()
            {
                var that = this;
                var calc = {};
                var breakpoints = this.c.breakpoints;
        Severity: Major
        Found in app/assets/javascripts/dataTables.responsive.js - About 3 hrs to fix

          Function register_observers has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Chosen.prototype.register_observers = function() {
                var _this = this;
                this.container.bind('mousedown.chosen', function(evt) {
                  _this.container_mousedown(evt);
                });
          Severity: Major
          Found in app/assets/javascripts/chosen.jquery.js - About 2 hrs to fix

            Function winnow_results has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                AbstractChosen.prototype.winnow_results = function() {
                  var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
                  this.no_results_clear();
                  results = 0;
                  searchText = this.get_search_text();
            Severity: Major
            Found in app/assets/javascripts/chosen.jquery.js - About 2 hrs to fix

              Function _columnsVisiblity has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _columnsVisiblity: function ( breakpoint )
                  {
                      var dt = this.s.dt;
                      var columns = this.s.columns;
                      var i, ien;
              Severity: Minor
              Found in app/assets/javascripts/dataTables.responsive.js - About 1 hr to fix

                Function set_up_html has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Chosen.prototype.set_up_html = function() {
                      var container_classes, container_props;
                      container_classes = ["chosen-container"];
                      container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
                      if (this.inherit_select_classes && this.form_field.className) {
                Severity: Minor
                Found in app/assets/javascripts/chosen.jquery.js - About 1 hr to fix

                  Function result_select has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Chosen.prototype.result_select = function(evt) {
                        var high, item;
                        if (this.result_highlight) {
                          high = this.result_highlight;
                          this.result_clear_highlight();
                  Severity: Minor
                  Found in app/assets/javascripts/chosen.jquery.js - About 1 hr to fix

                    Function keyup_checker has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        AbstractChosen.prototype.keyup_checker = function(evt) {
                          var stroke, _ref;
                          stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
                          this.search_field_scale();
                          switch (stroke) {
                    Severity: Minor
                    Found in app/assets/javascripts/chosen.jquery.js - About 1 hr to fix

                      Function _resizeAuto has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _resizeAuto: function ()
                          {
                              var dt = this.s.dt;
                              var columns = this.s.columns;
                      
                      
                      Severity: Minor
                      Found in app/assets/javascripts/dataTables.responsive.js - About 1 hr to fix

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

                            _detailsInit: function ()
                            {
                                var that    = this;
                                var dt      = this.s.dt;
                                var details = this.c.details;
                        Severity: Minor
                        Found in app/assets/javascripts/dataTables.responsive.js - About 1 hr to fix

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

                              AbstractChosen.prototype.result_add_option = function(option) {
                                var classes, option_el;
                                if (!option.search_match) {
                                  return '';
                                }
                          Severity: Minor
                          Found in app/assets/javascripts/chosen.jquery.js - About 1 hr to fix

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

                                Chosen.prototype.keydown_checker = function(evt) {
                                  var stroke, _ref1;
                                  stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
                                  this.search_field_scale();
                                  if (stroke !== 8 && this.pending_backstroke) {
                            Severity: Minor
                            Found in app/assets/javascripts/chosen.jquery.js - About 1 hr to fix

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

                                  _detailsVis: function ()
                                  {
                                      var that = this;
                                      var dt = this.s.dt;
                              
                              
                              Severity: Minor
                              Found in app/assets/javascripts/dataTables.responsive.js - About 1 hr to fix

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

                                        var column = function ( colIdx, name, operator, matched ) {
                                            var size, i, ien;
                                
                                            if ( ! operator ) {
                                                columns[ colIdx ].includeIn.push( name );
                                Severity: Minor
                                Found in app/assets/javascripts/dataTables.responsive.js - About 1 hr to fix

                                  Method process_new_dsvs has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def process_new_dsvs(new_version)
                                      SubmittedVariant.where(status: 'accepted').find_each do |submitted_variant|
                                        dsv_tags = extract_tags(submitted_variant.tags)
                                        batch_tags = extract_tags(submitted_variant.batch.tags)
                                        all_tags = (dsv_tags + batch_tags).uniq.map do |t|
                                  Severity: Minor
                                  Found in app/jobs/create_new_version.rb - About 1 hr to fix

                                    Function add_option has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
                                          if (option.nodeName.toUpperCase() === "OPTION") {
                                            if (option.text !== "") {
                                              if (group_position != null) {
                                                this.parsed[group_position].children += 1;
                                    Severity: Minor
                                    Found in app/assets/javascripts/chosen.jquery.js - About 1 hr to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                  } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
                                                    option.search_match = true;
                                                  }
                                      Severity: Major
                                      Found in app/assets/javascripts/chosen.jquery.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if ( breakpoints[i].name.indexOf( matched ) === -1 ) {
                                                                add( colIdx, breakpoints[i].name );
                                                            }
                                        Severity: Major
                                        Found in app/assets/javascripts/dataTables.responsive.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language