Showing 32 of 46 total issues
File chosen.jquery.js
has 1109 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.1.0
Function factory
has 371 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var factory = function( $, DataTable ) {
"use strict";
/**
* Responsive is a plug-in for the DataTables library that makes use of
File dataTables.responsive.js
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! Responsive 1.0.1
* 2014 SpryMedia Ltd - datatables.net/license
*/
/**
Function _classLogic
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_classLogic: function ()
{
var that = this;
var calc = {};
var breakpoints = this.c.breakpoints;
Function register_observers
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.register_observers = function() {
var _this = this;
this.container.bind('mousedown.chosen', function(evt) {
_this.container_mousedown(evt);
});
Function winnow_results
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
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();
Function _columnsVisiblity
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_columnsVisiblity: function ( breakpoint )
{
var dt = this.s.dt;
var columns = this.s.columns;
var i, ien;
Function set_up_html
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
Function result_select
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.result_select = function(evt) {
var high, item;
if (this.result_highlight) {
high = this.result_highlight;
this.result_clear_highlight();
Function keyup_checker
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AbstractChosen.prototype.keyup_checker = function(evt) {
var stroke, _ref;
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
this.search_field_scale();
switch (stroke) {
Function _resizeAuto
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_resizeAuto: function ()
{
var dt = this.s.dt;
var columns = this.s.columns;
Function _detailsInit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_detailsInit: function ()
{
var that = this;
var dt = this.s.dt;
var details = this.c.details;
Function result_add_option
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AbstractChosen.prototype.result_add_option = function(option) {
var classes, option_el;
if (!option.search_match) {
return '';
}
Function keydown_checker
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
Function _detailsVis
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_detailsVis: function ()
{
var that = this;
var dt = this.s.dt;
Function column
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var column = function ( colIdx, name, operator, matched ) {
var size, i, ien;
if ( ! operator ) {
columns[ colIdx ].includeIn.push( name );
Method process_new_dsvs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
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|
Function add_option
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Avoid deeply nested control flow statements. Open
Open
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
option.search_match = true;
}
Avoid deeply nested control flow statements. Open
Open
if ( breakpoints[i].name.indexOf( matched ) === -1 ) {
add( colIdx, breakpoints[i].name );
}