Undev/redmine-stuff-to-do-plugin

View on GitHub

Showing 175 of 609 total issues

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

    _determineDate: function(date, defaultDate) {
        var offsetNumeric = function(offset) {
            var date = new Date();
            date.setDate(date.getDate() + offset);
            return date;
Severity: Minor
Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

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

        _mouseStart: function(event) {
            var self = this;
    
            this.opos = [event.pageX, event.pageY];
    
    
    Severity: Minor
    Found in assets/javascripts/ui/ui.selectable.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

              if (this.floating && horizontalDirection) {
                  return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
              } else {
                  return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
              }
      Severity: Critical
      Found in assets/javascripts/ui/ui.sortable.js - About 1 hr to fix

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

            _clear: function(event, noPropagation) {
        
                this.reverting = false;
        
                //We first have to update the dom position of the actual currentItem
        Severity: Minor
        Found in assets/javascripts/ui/ui.sortable.js - About 1 hr to fix

          Function _hideDatepicker has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _hideDatepicker: function(input, duration) {
                  var inst = this._curInst;
                  if (!inst || (input && inst != $.data(input, PROP_NAME)))
                      return;
                  var rangeSelect = this._get(inst, 'rangeSelect');
          Severity: Minor
          Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

            Function drag has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                drag: function(event, ui) {
            
                    var inst = $(this).data("draggable"), self = this;
            
                    var checkPos = function(o) {
            Severity: Minor
            Found in assets/javascripts/ui/ui.draggable.js - About 1 hr to fix

              Function _selectDay has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _selectDay: function(id, month, year, td) {
                      if ($(td).hasClass(this._unselectableClass))
                          return;
                      var target = $(id);
                      var inst = this._getInst(target[0]);
              Severity: Minor
              Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                Function intersect has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.ui.intersect = function(draggable, droppable, toleranceMode) {
                
                    if (!droppable.offset) return false;
                
                    var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
                Severity: Minor
                Found in assets/javascripts/ui/ui.droppable.js - About 1 hr to fix

                  Function drag has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      drag: function(e, ui) {
                      
                          var inst = $(this).data("draggable");
                          var d = ui.options.snapTolerance || 20;
                  
                  
                  Severity: Minor
                  Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                    Function drag has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        drag: function(e,ui) {
                    
                            var inst = $(this).data("draggable"), self = this;
                            
                            var checkPos = function(o) {
                    Severity: Minor
                    Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                      Function drag has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          drag: function(event, ui) {
                      
                              var inst = $(this).data("draggable");
                              var d = ui.options.snapTolerance;
                      
                      
                      Severity: Minor
                      Found in assets/javascripts/ui/ui.draggable.js - About 1 hr to fix

                        Function create has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            create: function(dialog) {
                                if (this.instances.length === 0) {
                                    // prevent use of anchors and inputs
                                    // we use a setTimeout in case the overlay is created from an
                                    // event that we're going to be cancelling (see #2804)
                        Severity: Minor
                        Found in assets/javascripts/ui/ui.dialog.js - About 1 hr to fix

                          Function intersect has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          $.ui.intersect = function(draggable, droppable, toleranceMode) {
                              
                              if (!droppable.offset) return false;
                              
                              var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
                          Severity: Minor
                          Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                            Function _setData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _setData: function(key, value){
                                    (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value));
                                    switch (key) {
                                        case "buttons":
                                            this._createButtons(value);
                            Severity: Minor
                            Found in assets/javascripts/ui/ui.dialog.js - About 1 hr to fix

                              Function _connectDatepicker has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _connectDatepicker: function(target, inst) {
                                      var input = $(target);
                                      if (input.hasClass(this.markerClassName))
                                          return;
                                      var appendText = this._get(inst, 'appendText');
                              Severity: Minor
                              Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                                Function _clear has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _clear: function(e, noPropagation) {
                                
                                        //We first have to update the dom position of the actual currentItem
                                        if(!this._noFinalSort) this.placeholder.before(this.currentItem);
                                        this._noFinalSort = null;
                                Severity: Minor
                                Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
                                              var self = this;
                                              $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10) || 500, function() {
                                                  self._propagate("stop", e);
                                                  self._clear();
                                  Severity: Critical
                                  Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                    Function _mouseStart has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        _mouseStart: function(event) {
                                    
                                            var o = this.options;
                                    
                                            //Create and append the visible helper
                                    Severity: Minor
                                    Found in assets/javascripts/ui/ui.draggable.js - About 1 hr to fix

                                      Function refreshPositions has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          refreshPositions: function(fast) {
                                      
                                              //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
                                              if(this.offsetParent && this.helper) {
                                                  this.offset.parent = this._getParentOffset();
                                      Severity: Minor
                                      Found in assets/javascripts/ui/ui.sortable.js - About 1 hr to fix

                                        Function _generatePosition has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            _generatePosition: function(e) {
                                        
                                                var o = this.options;
                                                var position = {
                                                    top: (
                                        Severity: Minor
                                        Found in assets/javascripts/jquery-ui.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language