estimancy/projestimate

View on GitHub

Showing 836 of 1,675 total issues

Function GuideLines has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    jsPlumb.Overlays.svg.GuideLines = function() {
        var path = null, self = this, p1_1, p1_2;        
        jsPlumb.Overlays.GuideLines.apply(this, arguments);
        this.paint = function(params, containerExtents) {
            if (path == null) {
Severity: Minor
Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

      initialize: function(controller) {
        var $Hypertree = $jit.Hypertree;
    
        var config = {
          radius: "auto",
    Severity: Minor
    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

        updateJSON: function(json, onComplete) {
          if(this.busy) return;
          this.busy = true;
          this.select(false, false, false);
          var delegate = this.delegate;
      Severity: Minor
      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

             construct: function(json) {
                var isGraph = ($.type(json) == 'array');
                var ans = new Graph(this.graphOptions, this.config.Node, this.config.Edge, this.config.Label);
                if(!isGraph) 
                    //make tree
        Severity: Minor
        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

            , show: function () {
                var $tip
                  , pos
                  , actualWidth
                  , actualHeight
          Severity: Minor
          Found in app/assets/javascripts/bootstrap.js - About 1 hr to fix

            Method is_validate has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def is_validate(val)
                pe_attribute = self.pe_attribute
                #if value is mandatory and not fill => false
                if self.is_mandatory and val.blank?
                  false
            Severity: Minor
            Found in app/models/estimation_value.rb - About 1 hr to fix

              Method compute_probable_value has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def compute_probable_value(minimum, most_likely, maximum, estimation_value=nil)
                  # Get the number of not null value
                  input_data = {:min => minimum, :ml => most_likely, :max => maximum}
                  not_integer_or_float = Array.new
                  sum_of_not_null = 0.0
              Severity: Minor
              Found in app/helpers/module_projects_helper.rb - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                            if ((params.isTarget || forceInit) && jpcl.isDropSupported(_element)) {
                                var dropOptions = params.dropOptions || _jsPlumb.Defaults.DropOptions || jsPlumb.Defaults.DropOptions;
                                dropOptions = jsPlumb.extend( {}, dropOptions);
                                dropOptions.scope = dropOptions.scope || self.scope;
                                var dropEvent = jpcl.dragEvents['drop'],
                Severity: Critical
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                                              if (cv === '' || wo.filter_serversideFiltering){
                                                  $tb.children().show().removeClass(wo.filter_filteredRow);
                                              } else {
                                                  // optimize searching only through already filtered rows - see #313
                                                  searchFiltered = true;
                  Severity: Critical
                  Found in app/assets/javascripts/pager.js - About 1 hr to fix

                    Function storage has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        ts.storage = function(table, key, value, options) {
                            table = $(table)[0];
                            var cookieIndex, cookies, date,
                                hasLocalStorage = false,
                                values = {},
                    Severity: Minor
                    Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                      Function computePositions has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        computePositions: function(par, ch, orn, prop) {
                          //compute children areas
                          var totalArea = 0;
                          par.eachSubnode(function(n) {
                            totalArea += n.getData('area', prop);
                      Severity: Minor
                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                        Function toJSON has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            toJSON: function(type) {
                              type = type || "tree";
                              if(type == 'tree') {
                                var ans = {};
                                var rootNode = this.graph.getNode(this.root);
                        Severity: Minor
                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                          Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              'render': function(node, canvas, animating){
                                var leaf = this.viz.leaf(node),
                                    config = this.config,
                                    offst = config.offset,
                                    titleHeight = config.titleHeight,
                          Severity: Minor
                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                            Function normalizeDims has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              normalizeDims: function() {
                                //number of elements
                                var root = this.delegate.graph.getNode(this.delegate.root), l=0;
                                root.eachAdjacency(function() {
                                  l++;
                            Severity: Minor
                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                              Function calculateOrientation has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          calculateOrientation = function(sourceId, targetId, sd, td, sourceAnchor, targetAnchor) {
                                      
                                              if (sourceId === targetId) return {
                                                  orientation:Orientation.IDENTITY,
                                                  a:["top", "top"]
                              Severity: Minor
                              Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

                                Function Datepicker has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    var Datepicker = function(element, options) {
                                        var that = this;
                                
                                        this._process_options(options);
                                
                                
                                Severity: Minor
                                Found in app/assets/javascripts/bootstrap-datepicker.js - About 1 hr to fix

                                  Method generate_wbs_project_elt_tree has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def generate_wbs_project_elt_tree(element, tree, show_hidden=false, is_project_show_view=false)
                                      #Root is always display
                                      gap = 2.5
                                      tree ||= String.new
                                      unless element.nil?
                                  Severity: Minor
                                  Found in app/helpers/wbs_activity_elements_helper.rb - About 1 hr to fix

                                    Method display_effort_balancing_output has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      def display_effort_balancing_output(module_project)
                                        pbs_project_element = @pbs_project_element || current_component
                                        res = String.new
                                        if module_project.compatible_with(current_component.work_element_type.alias) || current_component
                                          pemodule = Pemodule.find(module_project.pemodule.id)
                                    Severity: Minor
                                    Found in app/helpers/projects_helper.rb - About 1 hr to fix

                                      Function animationLoop has 13 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          function animationLoop(config, drawScale, drawData, ctx, clrx, clry, clrwidth, clrheight, midPosX, midPosY, borderX, borderY, data) {
                                      Severity: Major
                                      Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                                        Function AbstractSvgArrowOverlay has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            var AbstractSvgArrowOverlay = function(superclass, originalArgs) {
                                                superclass.apply(this, originalArgs);
                                                jsPlumb.jsPlumbUIComponent.apply(this, originalArgs);
                                                this.isAppendedAtTopLevel = false;
                                                var self = this, path = null;
                                        Severity: Minor
                                        Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language