estimancy/projestimate

View on GitHub

Showing 836 of 1,675 total issues

Function onComplete has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      onComplete: function() {
        //ensure that nodes are shown for that level
        if(config.levelsToShow > 0) {
          that.geom.setRightLevelToShow(n);
        }
Severity: Minor
Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

    Function getEdge has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getEdge: function(node, type, s) {
            var $C = function(a, b) { 
              return function(){
                return node.pos.add(new Complex(a, b));
              }; 
    Severity: Minor
    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

      Function FloatingAnchor has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          jsPlumb.FloatingAnchor = function(params) {
              
              jsPlumb.Anchor.apply(this, arguments);
      
              // this is the anchor that this floating anchor is referenced to for
      Severity: Minor
      Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

        Function setConnector has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.setConnector = function(connectorSpec, doNotRepaint) {
                    if (connector != null) _ju.removeElements(connector.getDisplayElements());
                    var connectorArgs = { 
                        _jsPlumb:self._jsPlumb, 
                        parent:params.parent, 
        Severity: Minor
        Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

          Function showPicker has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  this.showPicker = function() {
                      if(!isPickerOwner()) {
                          var tp = jscolor.getElementPos(target); // target pos
                          var ts = jscolor.getElementSize(target); // target size
                          var vp = jscolor.getViewPos(); // view pos
          Severity: Minor
          Found in app/assets/javascripts/jscolor.js - About 1 hr to fix

            Function applyPlacement has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              , applyPlacement: function(offset, placement){
                  var $tip = this.tip()
                    , width = $tip[0].offsetWidth
                    , height = $tip[0].offsetHeight
                    , actualWidth
            Severity: Minor
            Found in app/assets/javascripts/bootstrap.js - About 1 hr to fix

              Function buildParserCache has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          function buildParserCache(table) {
                              var c = table.config,
                              // update table bodies in case we start with an empty table
                                  tb = c.$tbodies = c.$table.children('tbody:not(.' + c.cssInfoBlock + ')'),
                                  rows, list, l, i, h, ch, p, parsersDebug = "";
              Severity: Minor
              Found in app/assets/javascripts/pager.js - About 1 hr to fix

                Function resize_widget has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    fn.resize_widget = function($widget, size_x, size_y, callback) {
                        var wgd = $widget.coords().grid;
                        var col = wgd.col;
                        var max_cols = this.options.max_cols;
                        var old_size_y = wgd.size_y;
                Severity: Minor
                Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

                  Function updateNavArrows has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          updateNavArrows: function() {
                              if (!this._allow_update) return;
                  
                              var d = new Date(this.viewDate),
                                  year = d.getUTCFullYear(),
                  Severity: Minor
                  Found in app/assets/javascripts/bootstrap-datepicker.js - About 1 hr to fix

                    Function set_player has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        fn.set_player = function(col, row, no_player) {
                            var self = this;
                            if (!no_player) {
                                this.empty_cells_player_occupies();
                            }
                    Severity: Minor
                    Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

                      Function get_valid_rows has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          fn.get_valid_rows = function(widget_grid_data, upper_rows, min_row) {
                              var p_top_row = widget_grid_data.row;
                              var p_bottom_row = widget_grid_data.row + widget_grid_data.size_y - 1;
                              var size_y = widget_grid_data.size_y;
                              var r = min_row - 1;
                      Severity: Minor
                      Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

                        Method import_user_from_ldap_mail has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def import_user_from_ldap_mail(ldap_cn, email, ldap_server)
                            login_filter = Net::LDAP::Filter.eq ldap_server.email_attribute, "#{email}"
                            object_filter = Net::LDAP::Filter.eq 'objectClass', '*'
                            #is_an_automatic_account_activation? ? status = 'active' : 'pending'
                        
                        
                        Severity: Minor
                        Found in app/models/user.rb - About 1 hr to fix

                          Method import_user_from_ldap has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def import_user_from_ldap(ldap_cn, login, ldap_server)
                              login_filter = Net::LDAP::Filter.eq ldap_server.user_name_attribute, "#{login}"
                              object_filter = Net::LDAP::Filter.eq 'objectClass', '*'
                              #is_an_automatic_account_activation? ? status = 'active' : status = 'pending'
                          
                          
                          Severity: Minor
                          Found in app/models/user.rb - About 1 hr to fix

                            Function defMouse has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function defMouse(ctx,data,config,tpgraph) {
                            
                                    if (config.annotateDisplay == true) {
                                        if (cursorDivCreated == false) oCursor = new makeCursorObj('divCursor');
                                        if (isIE() < 9 && isIE() != false) ctx.canvas.attachEvent("on" + config.annotateFunction.split(' ')[0], function (event) { 
                            Severity: Minor
                            Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                              Method show has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def show
                                  @project = Project.find(params[:id])
                              
                                  @organization = @project.organization
                              
                              
                              Severity: Minor
                              Found in app/controllers/projects_controller.rb - About 1 hr to fix

                                Method perform has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def perform(pbs_project_elt_id, estimation_value_id)
                                    #No authorize required since this method is private and won't be call from any route
                                
                                    pbs_project_elt = PbsProjectElement.find(pbs_project_elt_id)
                                    estimation_value = EstimationValue.find(estimation_value_id)
                                Severity: Minor
                                Found in app/workers/estimations_worker.rb - About 1 hr to fix

                                  Function onComplete has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        onComplete: function() {
                                          //compute positions of newly inserted nodes
                                          if(config.request)
                                            that.compute();
                                  
                                  
                                  Severity: Minor
                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                    Function normalizeDims has 30 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 onPlaceLabel has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            onPlaceLabel: function(domElement, node) {
                                              if(!config.showLabels) return;
                                              var pos = node.pos.getp(true),
                                                  dimArray = node.getData('dimArray'),
                                                  span = node.getData('span') / 2,
                                      Severity: Minor
                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                        Function contract has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            contract: function(node, opt) {
                                              var viz = this.viz;
                                              if(node.collapsed || !node.anySubnode($.lambda(true))) return;
                                              opt = $.merge(this.options, viz.config, opt || {}, {
                                                'modes': ['node-property:alpha:span', 'linear']
                                        Severity: Minor
                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language