Showing 836 of 1,675 total issues
Function addHeaderResizeEvent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ts.addHeaderResizeEvent = function(table, disable, options){
var defaults = {
timer : 250
},
o = $.extend({}, defaults, options),
Function format
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
format: function(table, c, wo, init){
var sl, time,
$t = c.$table,
ss = wo.saveSort !== false, // make saveSort active/inactive; default to true
sortList = { "sortList" : c.sortList };
Function storage
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ts.storage = function(table, key, val){
var d, k, ls = false, v = {},
id = table.id || $('.tablesorter').index( $(table) ),
url = window.location.pathname;
// https://gist.github.com/paulirish/5558557
Function scrollFunction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function scrollFunction(){
for (var i=0;i<dynamicDisplayList["length"];i++) {
if (isScrolledIntoView(dynamicDisplay[dynamicDisplayList[i]][5]) && dynamicDisplay[dynamicDisplayList[i]][2]==false) {
dynamicDisplay[dynamicDisplayList[i]][1]=true;
switch(dynamicDisplay[dynamicDisplayList[i]][6]){
Method display_text_field_tag
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def display_text_field_tag(level, est_val, module_project, level_estimation_values, pbs_project_element, attribute_type="", read_only_value=false)
est_val_pe_attribute = est_val.pe_attribute
organization = module_project.project.organization
precision = est_val_pe_attribute.precision.nil? ? user_number_precision : est_val_pe_attribute.precision
Consider simplifying this complex logical expression. Open
Open
} else if ( this.value !== '' && (
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
// let return & backspace continue on, but ignore arrows & non-valid characters
( event.which !== 13 && event.which !== 8 && ( event.which < 32 || (event.which >= 37 && event.which <= 40) ) ) ) ) {
Consider simplifying this complex logical expression. Open
Open
if ((readable && ! bestIsReadable) ||
(readable && bestIsReadable && score > bestScore) ||
((! readable) && (! bestIsReadable) && score > bestScore)) {
bestIsReadable = readable;
bestScore = score;
Consider simplifying this complex logical expression. Open
Open
if ((angle > jsGraphAnnotate[ctx.canvas.id][i][5] && angle < jsGraphAnnotate[ctx.canvas.id][i][6]) || (angle > jsGraphAnnotate[ctx.canvas.id][i][5]-2*Math.PI && angle < jsGraphAnnotate[ctx.canvas.id][i][6]-2*Math.PI)|| (angle > jsGraphAnnotate[ctx.canvas.id][i][5]+2*Math.PI && angle < jsGraphAnnotate[ctx.canvas.id][i][6]+2*Math.PI)) {
annotateDIV.style.border = config.annotateBorder;
annotateDIV.style.padding = config.annotatePadding;
annotateDIV.style.borderRadius = config.annotateBorderRadius;
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'render': function(node, canvas) {
var height = node.getData('height');
var ldist = height? height : this.config.levelDistance;
var span = node.getData('span') / 2, theta = node.pos.theta;
var begin = theta - span, end = theta + span;
Function getPos
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.getPos = function(elem) {
var offset = getOffsets(elem);
var scroll = getScrolls(elem);
return {
x: offset.x - scroll.x,
Function renderLabel
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderLabel: function(canvas, node, controller) {
var span = node.getData('span');
if(span < Math.PI /2 && Math.tan(span) *
this.config.levelDistance * node._depth < 10) {
return;
Function register
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.register = function(el) {
var jpcl = jsPlumb.CurrentLibrary;
el = jpcl.getElementObject(el);
var id = _currentInstance.getId(el),
domEl = jpcl.getDOMElement(el),
Function can_go_widget_up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fn.can_go_widget_up = function(widget_grid_data) {
var p_bottom_row = widget_grid_data.row + widget_grid_data.size_y - 1;
var result = true;
var upper_rows = [];
var min_row = 10000;
Function add_widget
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
var pos;
size_x || (size_x = 1);
size_y || (size_y = 1);
Function datepicker
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.datepicker = function ( option ) {
var args = Array.apply(null, arguments);
args.shift();
var internal_return,
this_return;
Function Doughnut
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.Doughnut = function (data, options) {
chart.Doughnut.defaults = {
inGraphDataShow: false,
inGraphDataPaddingRadius: 0,
Function Pie
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.Pie = function (data, options) {
chart.Pie.defaults = {
inGraphDataShow: false,
inGraphDataPaddingRadius: 5,
inGraphDataPaddingAngle: 0,
Method compute_component_estimation_value
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def compute_component_estimation_value(component, pe_attribute_id, level_estimation_value, wbs_project_elt_root=nil)
#No authorize required since this method is private and won't be call from any route
component_children_results_array = Array.new
new_effort_person_hour = Hash.new
pe_attribute = PeAttribute.find(pe_attribute_id)
Method collapse_project_version
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def collapse_project_version
projects = Project.find_all_by_id(params[:project_ids])
flash_error = ""
Project.transaction do
projects.each do |project|
Method set_project_version
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_project_version(project_to_checkout)
#No authorize is required as method is private and could not be accessed by any route
new_version = ''
parent_version = project_to_checkout.version