Showing 33 of 66 total issues
File chosen.jquery.js
has 911 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Chosen, a Select Box Enhancer for jQuery and Protoype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 0.9.8
// Full source at https://github.com/harvesthq/chosen
Function _mouseDrag
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
//Compute the helpers position
this.position = this._generatePosition(event);
this.positionAbs = this._convertPositionTo("absolute");
Class ManyToManyGenerator
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ManyToManyGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :controller_path, :type => :string
argument :child_controller_path, :type => :string
argument :join_controller_path, :type => :string, :default => nil, :required => false
File jquery.mjs.nestedSortable.js
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* jQuery UI Nested Sortable
* v 1.3.5 / 21 jun 2012
* http://mjsarfatti.com/code/nestedSortable
*
Class TreeGenerator
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class TreeGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :controller_path, :type => :string
argument :model_name, :type => :string, :required => false
argument :layout, :type => :string, :default => "application",
Class ImagesScaffoldGenerator
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ImagesScaffoldGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :controller_path, :type => :string
argument :model_name, :type => :string, :required => false
argument :layout, :type => :string, :default => "application",
Class ScaffoldGenerator
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ScaffoldGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :controller_path, :type => :string
argument :model_name, :type => :string, :required => false
argument :layout, :type => :string, :default => "application",
Class CropGenerator
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class CropGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :controller_path, :type => :string
argument :model_name, :type => :string, :required => false
argument :layout, :type => :string, :default => "application",
Function winnow_results
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.winnow_results = function() {
var found, option, part, parts, regex, regexAnchor, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len2, _ref;
this.no_results_clear();
results = 0;
searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html();
Function register_observers
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.register_observers = function() {
var _this = this;
this.container.mousedown(function(evt) {
return _this.container_mousedown(evt);
});
Function set_up_html
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.set_up_html = function() {
var container_div, dd_top, dd_width, sf_width;
this.container_id = this.form_field.id.length ? this.form_field.id.replace(/[^\w]/g, '_') : this.generate_field_id();
this.container_id += "_chzn";
this.f_width = this.form_field_jq.outerWidth();
Function toArray
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toArray: function(options) {
var o = $.extend({}, this.options, options),
sDepth = o.startDepthCount || 0,
ret = [],
Method sort_tree
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def sort_tree(url, maxlevels)
%Q{
<script type="text/javascript">
$(document).ready(function(){
Function results_build
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.results_build = function() {
var content, data, _i, _len, _ref;
this.parsing = true;
this.results_data = root.SelectParser.select_to_array(this.form_field);
if (this.is_multiple && this.choices > 0) {
Consider simplifying this complex logical expression. Open
Open
if (!o.isAllowed(this.currentItem, parentItem) ||
parentItem && parentItem.hasClass(o.disableNesting) ||
o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) {
this.placeholder.addClass(o.errorClass);
if (maxLevels < levels && maxLevels != 0) {
Function result_select
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.result_select = function(evt) {
var high, high_id, item, position;
if (this.result_highlight) {
high = this.result_highlight;
high_id = high.attr("id");
Method cropable
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cropable(image_name, x,y,w,h)
%Q{
<script type="text/javascript">
function jcropInit() {
Function keyup_checker
has 29 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) {
Method updating_models
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def updating_models
inject_into_file "app/models/#{resource_name}.rb", "\n
has_ancestry :orphan_strategy => :rootify
Function search_field_scale
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.search_field_scale = function() {
var dd_top, div, h, style, style_block, styles, w, _i, _len;
if (this.is_multiple) {
h = 0;
w = 0;