Showing 836 of 1,675 total issues
Method get_chart_data_effort_and_cost
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_chart_data_effort_and_cost(pbs_project_element, module_project, estimation_value, view_widget)
chart_data = []
effort_breakdown_stacked_bar_dataset = {}
return chart_data if (!module_project.pemodule.alias.eql?(Projestimate::Application::EFFORT_BREAKDOWN) || estimation_value.nil?)
Method render_selected_wbs_activity_elements
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def render_selected_wbs_activity_elements
@project = Project.find(params[:project_id])
authorize! :edit_project, @project
@pe_wbs_project_activity = @project.pe_wbs_projects.activities_wbs.first
Function plotTree
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
plotTree: function(node, opt, animating) {
var that = this,
viz = this.viz,
canvas = viz.canvas,
config = this.config,
Function deleteEndpoint
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.deleteEndpoint = function(object, doNotRepaintAfterwards) {
_currentInstance.doWhileSuspended(function() {
var endpoint = (typeof object == "string") ? endpointsByUUID[object] : object;
if (endpoint) {
var uuid = endpoint.getUuid();
Function applyOptions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function applyOptions() {
if (opts.showPaletteOnly) {
opts.showPalette = true;
}
Function placeAnchors
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
placeAnchors = function(elementId, _anchorLists) {
var cd = jsPlumbInstance.getCachedData(elementId), sS = cd.s, sO = cd.o,
placeSomeAnchors = function(desc, elementDimensions, elementPosition, unsortedConnections, isHorizontal, otherMultiplier, orientation) {
if (unsortedConnections.length > 0) {
var sc = _sortHelper(unsortedConnections, edgeSortFunctions[desc]), // puts them in order based on the target element's pos on screen
Function VmlEndpoint
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
VmlEndpoint = window.VmlEndpoint = function(params) {
VmlComponent.apply(this, arguments);
var vml = null, self = this, opacityStrokeNode = null, opacityFillNode = null;
self.canvas = document.createElement("div");
self.canvas.style["position"] = "absolute";
Function on_dragstart
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fn.on_dragstart = function(e) {
e.preventDefault();
if (this.is_dragging) { return this; }
Function keydown
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, keydown: function (e) {
var $this
, $items
, $active
, $parent
Function draggable
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fn.draggable = function() {
var self = this;
var draggable_options = $.extend(true, {}, this.options.draggable, {
offset_left: this.options.widget_margins[0],
offset_top: this.options.widget_margins[1],
Function refresh_me
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function refresh_me(data){
var show_exclude = false;
//if($('input:checkbox').is(":checked")) {
if($('#show_excluded_elt:checkbox').is(":checked")) { show_exclude = true; }
else{ show_exclude = false; }
Method create
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create
@project = Project.find(params[:project_id])
authorize! :alter_project_pbs_products, @project
@pbs_project_element = PbsProjectElement.new(params[:pbs_project_element])
Consider simplifying this complex logical expression. Open
Open
if(this.config.animate) {
this.compute('end');
this.config.levelsToShow > 0 && this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode
&& this.clickedNode.id || this.root));
this.fx.animate($.merge(this.config, {
Consider simplifying this complex logical expression. Open
Open
if ((wo.filter_$anyMatch && wo.filter_$anyMatch.length) || filters[c.columns]) {
data.anyMatchFlag = true;
data.anyMatchFilter = wo.filter_$anyMatch && ts.filter.getLatestSearch( wo.filter_$anyMatch ).val() || filters[c.columns] || '';
if (c.sortLocaleCompare) {
// replace accents
Function computeSubtree
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
computeSubtree: function (root, x, y, width, height, initialDepth, maxDepth, posType) {
Consider simplifying this complex logical expression. Open
Open
if ( ts.filter.regex.toTest.test(data.iFilter) ) {
var result, tmp,
table = c.table,
index = data.index,
parsed = data.parsed[index],
Consider simplifying this complex logical expression. Open
Open
if (!self.isFull() && !(idx == 0 && !self.isSource) && !(idx == 1 && !self.isTarget) && endpointEnabled) {
var _doContinue = true;
// the second check here is for the case that the user is dropping it back
// where it came from.
Consider simplifying this complex logical expression. Open
Open
} else if (/\s+(-|to)\s+/.test(val)){
s = val.split(/(?: - | to )/); // make sure the dash is for a range and not indicating a negative number
r1 = fmt(s[0].replace(wo.filter_regex.nondigit, ''), table);
r2 = fmt(s[1].replace(wo.filter_regex.nondigit, ''), table);
// parse filter value in case we're comparing numbers (dates)
Consider simplifying this complex logical expression. Open
Open
if ((config.savePngFunction.split(' ')[1]=="left" && event.which==1) ||
(config.savePngFunction.split(' ')[1]=="middle" && event.which==2) ||
(config.savePngFunction.split(' ')[1]=="right" && event.which==3) ||
(typeof(config.savePngFunction.split(' ')[1])!="string")) saveCanvas(ctx,data,config,tpgraph);
Consider simplifying this complex logical expression. Open
Open
if ((config.annotateFunction.split(' ')[1]=="left" && event.which==1) ||
(config.annotateFunction.split(' ')[1]=="middle" && event.which==2) ||
(config.annotateFunction.split(' ')[1]=="right" && event.which==3) ||
(typeof(config.annotateFunction.split(' ')[1])!="string")) doMouseMove(ctx, config, event)