crmis/weddings

View on GitHub

Showing 334 of 334 total issues

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

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

                _create: function () {
                    var selectees,
                        that = this;
        
                    this.element.addClass("ui-selectable");
        Severity: Minor
        Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                  _createWidget: function (options, element) {
                      element = $(element || this.defaultElement || this)[0];
                      this.element = $(element);
                      this.uuid = uuid++;
                      this.eventNamespace = "." + this.widgetName + this.uuid;
          Severity: Minor
          Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        } else if (/^(sw)$/.test(a)) {
                            that.size.width = newWidth;
                            that.size.height = newHeight;
                            that.position.left = op.left - ox;
                        } else {
            Severity: Major
            Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
            app/assets/javascripts/viewable_calendar-editable.js on lines 3777..3790

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        } else if (/^(ne)$/.test(a)) {
                            that.size.width = newWidth;
                            that.size.height = newHeight;
                            that.position.top = op.top - oy;
                        } else if (/^(sw)$/.test(a)) {
            Severity: Major
            Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
            app/assets/javascripts/viewable_calendar-editable.js on lines 3781..3790

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function daySelectionMousedown has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function daySelectionMousedown(ev) { // not really a generic manager method, oh well
                        var cellToDate = t.cellToDate;
                        var getIsCellAllDay = t.getIsCellAllDay;
                        var hoverListener = t.getHoverListener();
                        var reportDayClick = t.reportDayClick; // this is hacky and sort of weird
            Severity: Minor
            Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

              Function getDimensions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function getDimensions(elem) {
                      var raw = elem[0];
                      if (raw.nodeType === 9) {
                          return {
                              width: elem.width(),
              Severity: Minor
              Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

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

                  Function top has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              top: function (position, data) {
                                  var within = data.within,
                                      withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
                                      outerHeight = data.within.height,
                                      collisionPosTop = position.top - data.collisionPosition.marginTop,
                  Severity: Minor
                  Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                    Function _updateVirtualBoundaries has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _updateVirtualBoundaries: function (forceAspectRatio) {
                                var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
                                    o = this.options;
                    
                                b = {
                    Severity: Minor
                    Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                      Function stop has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              stop: function (event) {
                                  var that = $(this).data("ui-resizable"),
                                      o = that.options,
                                      pr = that._proportionallyResizeElements,
                                      ista = pr.length && (/textarea/i).test(pr[0].nodeName),
                      Severity: Minor
                      Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                        if (!this.containers[innermostIndex].containerCache.over) {
                                            this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
                                            this.containers[innermostIndex].containerCache.over = 1;
                                        }
                        Severity: Major
                        Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
                        app/assets/javascripts/viewable_calendar-editable.js on lines 4895..4898

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                            if (this.containers[i].containerCache.over) {
                                                this.containers[i]._trigger("out", event, this._uiHash(this));
                                                this.containers[i].containerCache.over = 0;
                                            }
                        Severity: Major
                        Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
                        app/assets/javascripts/viewable_calendar-editable.js on lines 4910..4913

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Function _renderDayEvents has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function _renderDayEvents(events, doAppend, doRowHeights) {
                        
                                    // where the DOM nodes will eventually end up
                                    var finalContainer = getDaySegmentContainer();
                        
                        
                        Severity: Minor
                        Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

                          Function _mouseStop has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  _mouseStop: function (event) {
                          
                                      this.resizing = false;
                                      var pr, ista, soffseth, soffsetw, s, left, top,
                                          o = this.options, that = this;
                          Severity: Minor
                          Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                            Function compileSlotSegs has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function compileSlotSegs(events) {
                                        var colCnt = getColCnt(),
                                            minMinute = getMinMinute(),
                                            maxMinute = getMaxMinute(),
                                            d,
                            Severity: Minor
                            Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                                      function render(date, delta) {
                              
                                          if (delta) {
                                              addMonths(date, delta);
                                              date.setDate(1);
                              Severity: Minor
                              Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

                                Function set has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                                    set: function (elem, value) {
                                                        var parsed, curElem,
                                                            backgroundColor = "";
                                
                                                        if (value !== "transparent" && ( jQuery.type(value) !== "string" || ( parsed = stringParse(value) ) )) {
                                Severity: Minor
                                Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language