crmis/weddings

View on GitHub

Showing 135 of 334 total issues

Function _normalizeArguments has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function _normalizeArguments(effect, options, speed, callback) {

            // allow passing all options as the first parameter
            if ($.isPlainObject(effect)) {
                options = effect;
Severity: Minor
Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

    Function _refreshItems has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _refreshItems: function (event) {
    
                this.items = [];
                this.containers = [this];
    
    
    Severity: Minor
    Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

      Function left has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  left: function (position, data) {
                      var within = data.within,
                          withinOffset = within.offset.left + within.scrollLeft,
                          outerWidth = within.width,
                          offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
      Severity: Minor
      Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

        Function HoverListener has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function HoverListener(coordinateGrid) {
        
        
                var t = this;
                var bindType;
        Severity: Minor
        Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

          Function calendar has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          var calendar = function () {
              // page is now ready, initialize the calendar...
              var current_room = function () {
                  return window.location.href.match(/rooms\/(\d+)\/viewings/)[1];
              };
          Severity: Minor
          Found in app/assets/javascripts/viewable_custom.js - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

                      getBaseline: function (origin, original) {
                          var y, x;
                          switch (origin[0]) {
                              case "top":
                                  y = 0;
          Severity: Minor
          Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                    _drop: function (event, custom) {
            
                        var draggable = custom || $.ui.ddmanager.current,
                            childrenIntersection = false;
            
            
            Severity: Minor
            Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                      option: function (key, value) {
                          var options = key,
                              parts,
                              curOption,
                              i;
              Severity: Minor
              Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                        spaces.hsla.to = function (rgba) {
                            if (rgba[0] == null || rgba[1] == null || rgba[2] == null) {
                                return [null, null, null, rgba[3]];
                            }
                            var r = rgba[0] / 255,
                Severity: Minor
                Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                                  drag: function (ev, ui) {
                  
                                      // NOTE: this `cell` value is only useful for determining in-bounds and all-day.
                                      // Bad for anything else due to the discrepancy between the mouse position and the
                                      // element position while snapping. (problem revealed in PR #55)
                  Severity: Minor
                  Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                        function AgendaWeekView(element, calendar) {
                            var t = this;
                    
                    
                            // exports
                    Severity: Minor
                    Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                          function BasicWeekView(element, calendar) {
                              var t = this;
                      
                      
                              // exports
                      Severity: Minor
                      Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

                        Function refreshPositions has 30 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 app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                          Function transition has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      transition: function (other, distance) {
                                          var end = color(other),
                                              spaceName = end._space(),
                                              space = spaces[spaceName],
                                              startColor = this.alpha() === 0 ? color("transparent") : this,
                          Severity: Minor
                          Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                            Function complete has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        complete: function () {
                                            if (el.to.opacity === 0) {
                                                el.css("opacity", el.from.opacity);
                                            }
                                            if (mode === "hide") {
                            Severity: Minor
                            Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                              Function slotSelectionMousedown has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function slotSelectionMousedown(ev) {
                                          if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button
                                              unselect(ev);
                                              var dates;
                                              hoverListener.start(function (cell, origCell) {
                              Severity: Minor
                              Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

                                Function transfer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    $.effects.effect.transfer = function (o, done) {
                                        var elem = $(this),
                                            target = $(o.to),
                                            targetFixed = target.css("position") === "fixed",
                                            body = $("body"),
                                Severity: Minor
                                Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                                  Function resize has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          resize: function (event, ui) {
                                              var that = $(this).data("ui-resizable"),
                                                  o = that.options,
                                                  os = that.originalSize,
                                                  op = that.originalPosition,
                                  Severity: Minor
                                  Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                                    Function rangeToSegments has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            function rangeToSegments(startDate, endDate) {
                                                var rowCnt = t.getRowCnt();
                                                var colCnt = t.getColCnt();
                                                var segments = []; // array of segments to return
                                    
                                    
                                    Severity: Minor
                                    Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

                                      Function puff has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          $.effects.effect.puff = function (o, done) {
                                              var elem = $(this),
                                                  mode = $.effects.setMode(elem, o.mode || "hide"),
                                                  hide = mode === "hide",
                                                  percent = parseInt(o.percent, 10) || 150,
                                      Severity: Minor
                                      Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language