crmis/weddings

View on GitHub

Showing 334 of 334 total issues

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

            left: function () {
                $.ui.position.flip.left.apply(this, arguments);
                $.ui.position.fit.left.apply(this, arguments);
            },
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 1429..1432

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

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

        _on: function (suppressDisabledCheck, element, handlers) {
            var delegateElement,
                instance = this;

            // no suppressDisabledCheck flag, shuffle arguments
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 (options.at[1] === "bottom") {
                basePosition.top += targetHeight;
            } else if (options.at[1] === "center") {
                basePosition.top += targetHeight / 2;
            }
    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 1158..1162
    app/assets/javascripts/viewable_calendar-editable.js on lines 1186..1190
    app/assets/javascripts/viewable_calendar-editable.js on lines 1192..1196

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

    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 (options.my[0] === "right") {
                    position.left -= elemWidth;
                } else if (options.my[0] === "center") {
                    position.left -= elemWidth / 2;
                }
    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 1158..1162
    app/assets/javascripts/viewable_calendar-editable.js on lines 1164..1168
    app/assets/javascripts/viewable_calendar-editable.js on lines 1192..1196

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

    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

                    switch (origin[1]) {
                        case "left":
                            x = 0;
                            break;
                        case "center":
    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 6299..6311

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

    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 (options.at[0] === "right") {
                basePosition.left += targetWidth;
            } else if (options.at[0] === "center") {
                basePosition.left += targetWidth / 2;
            }
    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 1164..1168
    app/assets/javascripts/viewable_calendar-editable.js on lines 1186..1190
    app/assets/javascripts/viewable_calendar-editable.js on lines 1192..1196

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

    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 (options.my[1] === "bottom") {
                    position.top -= elemHeight;
                } else if (options.my[1] === "center") {
                    position.top -= elemHeight / 2;
                }
    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 1158..1162
    app/assets/javascripts/viewable_calendar-editable.js on lines 1164..1168
    app/assets/javascripts/viewable_calendar-editable.js on lines 1186..1190

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

    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

                    switch (origin[0]) {
                        case "top":
                            y = 0;
                            break;
                        case "middle":
    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 6312..6324

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

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

            _respectSize: function (data) {
    
                var o = this._vBoundaries,
                    a = this.axis,
                    ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
    Severity: Minor
    Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

              function buildDayTableHeadHTML() {
                  var headerClass = tm + "-widget-header";
                  var date;
                  var html = '';
                  var weekText;
      Severity: Minor
      Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

            $.effects.effect.drop = function (o, done) {
        
                var el = $(this),
                    props = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"],
                    mode = $.effects.setMode(el, o.mode || "hide"),
        Severity: Minor
        Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                  function draggableDayEvent(event, eventElement) {
                      var hoverListener = getHoverListener();
                      var dayDelta;
                      eventElement.draggable({
                          delay: 50,
          Severity: Minor
          Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                    function setWidth(width) {
                        viewWidth = width;
                        colPositions.clear();
                        colContentPositions.clear();
            
            
            Severity: Minor
            Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                      drag: function (draggable, event) {
              
                          //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
                          if (draggable.options.refreshPositions) {
                              $.ui.ddmanager.prepareOffsets(draggable, event);
              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

                            for (i = 0; i < rowCnt; i++) {
                                if (y >= rows[i][0] && y < rows[i][1]) {
                                    r = i;
                                    break;
                                }
                Severity: Major
                Found in app/assets/javascripts/viewable_fullcalendar.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/viewable_fullcalendar.js on lines 6051..6056

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

                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

                                    delayedTriggers.push((function (c) {
                                        return function (event) {
                                            c._trigger("out", event, this._uiHash(this));
                                        };
                                    }).call(this, this.containers[i]));
                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 5285..5289

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

                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

                            for (i = 0; i < colCnt; i++) {
                                if (x >= cols[i][0] && x < cols[i][1]) {
                                    c = i;
                                    break;
                                }
                Severity: Major
                Found in app/assets/javascripts/viewable_fullcalendar.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/viewable_fullcalendar.js on lines 6045..6050

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

                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

                                    delayedTriggers.push((function (c) {
                                        return function (event) {
                                            c._trigger("deactivate", event, this._uiHash(this));
                                        };
                                    }).call(this, this.containers[i]));
                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 5292..5296

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

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

                        start: function () {
                            var element, p, co, ch, cw, width, height,
                                that = $(this).data("ui-resizable"),
                                o = that.options,
                                el = that.element,
                Severity: Minor
                Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                          function resizableSlotEvent(event, eventElement, timeElement) {
                              var snapDelta, prevSnapDelta;
                              var snapHeight = getSnapHeight();
                              var snapMinutes = getSnapMinutes();
                              eventElement.resizable({
                  Severity: Minor
                  Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language