crmis/weddings

View on GitHub

Showing 334 of 334 total issues

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

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

    Function scale has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.effects.effect.scale = function (o, done) {
    
            // Create element
            var el = $(this),
                options = $.extend(true, {}, o),
    Severity: Minor
    Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

      Function renderSlotSelection has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function renderSlotSelection(startDate, endDate) {
                  var helperOption = opt('selectHelper');
                  coordinateGrid.build();
                  if (helperOption) {
                      var col = dateToCell(startDate).col;
      Severity: Minor
      Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                    return {
                        top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
                        left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 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 5045..5048

        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 72.

        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

                    return {
                        top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
                        left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 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 1807..1810

        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 72.

        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

                            left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
        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 1982..1982

        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 72.

        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

                            top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
        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 1985..1985

        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 72.

        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 _generatePosition has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _generatePosition: function (event) {
        
                    var top, left,
                        o = this.options,
                        pageX = event.pageX,
        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

                      this.originalSize = this._helper ? {width: el.outerWidth(), height: el.outerHeight()} : {
                          width: el.width(),
                          height: el.height()
                      };
          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 3097..3100

          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 71.

          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

                      this.size = this._helper ? {width: el.outerWidth(), height: el.outerHeight()} : {
                          width: el.width(),
                          height: el.height()
                      };
          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 3101..3104

          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 71.

          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 _setContainment has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _setContainment: function () {
          
                      var over, c, ce,
                          o = this.options;
          
          
          Severity: Minor
          Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

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

                      resize: function (event) {
                          var woset, hoset, isParent, isOffsetRelative,
                              that = $(this).data("ui-resizable"),
                              o = that.options,
                              co = that.containerOffset, cp = that.position,
              Severity: Minor
              Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                                    if (event.pageX - this.offset.click.left > this.containment[2]) {
                                        pageX = this.containment[2] + this.offset.click.left;
                                    }
                Severity: Major
                Found in app/assets/javascripts/viewable_calendar-editable.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/viewable_calendar-editable.js on lines 5161..5163
                app/assets/javascripts/viewable_calendar-editable.js on lines 5164..5166
                app/assets/javascripts/viewable_calendar-editable.js on lines 5170..5172

                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 70.

                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 4 locations. Consider refactoring.
                Open

                                    if (event.pageX - this.offset.click.left < this.containment[0]) {
                                        pageX = this.containment[0] + this.offset.click.left;
                                    }
                Severity: Major
                Found in app/assets/javascripts/viewable_calendar-editable.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/viewable_calendar-editable.js on lines 5164..5166
                app/assets/javascripts/viewable_calendar-editable.js on lines 5167..5169
                app/assets/javascripts/viewable_calendar-editable.js on lines 5170..5172

                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 70.

                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 (rs) {
                                        ui.position.left = inst._convertPositionTo("relative", {
                                            top: 0,
                                            left: r - inst.helperProportions.width
                                        }).left - inst.margins.left;
                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 2350..2355

                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 70.

                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 4 locations. Consider refactoring.
                Open

                                    if (event.pageY - this.offset.click.top < this.containment[1]) {
                                        pageY = this.containment[1] + this.offset.click.top;
                                    }
                Severity: Major
                Found in app/assets/javascripts/viewable_calendar-editable.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/viewable_calendar-editable.js on lines 5161..5163
                app/assets/javascripts/viewable_calendar-editable.js on lines 5167..5169
                app/assets/javascripts/viewable_calendar-editable.js on lines 5170..5172

                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 70.

                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 (bs) {
                                        ui.position.top = inst._convertPositionTo("relative", {
                                            top: b - inst.helperProportions.height,
                                            left: 0
                                        }).top - inst.margins.top;
                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 2341..2346

                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 70.

                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 (ls) {
                                        ui.position.left = inst._convertPositionTo("relative", {
                                            top: 0,
                                            left: l - inst.helperProportions.width
                                        }).left - inst.margins.left;
                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 2386..2391

                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 70.

                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 4 locations. Consider refactoring.
                Open

                                    if (event.pageY - this.offset.click.top > this.containment[3]) {
                                        pageY = this.containment[3] + this.offset.click.top;
                                    }
                Severity: Major
                Found in app/assets/javascripts/viewable_calendar-editable.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/viewable_calendar-editable.js on lines 5161..5163
                app/assets/javascripts/viewable_calendar-editable.js on lines 5164..5166
                app/assets/javascripts/viewable_calendar-editable.js on lines 5167..5169

                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 70.

                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

                Severity
                Category
                Status
                Source
                Language