crmis/weddings

View on GitHub

Showing 334 of 334 total issues

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

                    if (ts) {
                        ui.position.top = inst._convertPositionTo("relative", {
                            top: t - 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 2374..2379

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

            hoset = Math.abs((that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.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 3580..3580

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

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

            woset = Math.abs((that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width);
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 3581..3581

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

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

        _mouseDrag: function (event) {

            //Increase performance, avoid regex
            var data,
                el = this.helper, props = {},
Severity: Minor
Found in app/assets/javascripts/viewable_calendar-editable.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 app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if (!(/^(document|window|parent)$/).test(o.containment)) {
                      ce = $(o.containment)[0];
                      co = $(o.containment).offset();
                      over = ($(ce).css("overflow") !== "hidden");
      
      
      Severity: Critical
      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.options.axis || this.options.axis !== "x") {
                        this.helper[0].style.top = this.position.top + "px";
                    }
        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 1668..1670

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

        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 (o.opacity) { // opacity option
                        if (this.helper.css("opacity")) {
                            this._storedOpacity = this.helper.css("opacity");
                        }
                        this.helper.css("opacity", o.opacity);
        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 4302..4307

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

        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.options.axis || this.options.axis !== "y") {
                        this.helper[0].style.left = this.position.left + "px";
                    }
        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 1671..1673

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

        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 (o.zIndex) { // zIndex option
                        if (this.helper.css("zIndex")) {
                            this._storedZIndex = this.helper.css("zIndex");
                        }
                        this.helper.css("zIndex", o.zIndex);
        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 4295..4300

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

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

                _createPlaceholder: function (that) {
                    that = that || this;
                    var className,
                        o = that.options;
        
        
        Severity: Minor
        Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                          start: function (ev, ui) {
                              trigger('eventDragStart', eventElement, event, ev, ui);
                              hideEvents(event, eventElement);
                              origWidth = eventElement.width();
                              hoverListener.start(function (cell, origCell) {
          Severity: Minor
          Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                    color.hook = function (hook) {
                        var hooks = hook.split(" ");
                        each(hooks, function (i, hook) {
                            jQuery.cssHooks[hook] = {
                                set: function (elem, value) {
            Severity: Minor
            Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

              Function buildCellHTML has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function buildCellHTML(date) {
                          var contentClass = tm + "-widget-content";
                          var month = t.start.getMonth();
                          var today = clearTime(new Date());
                          var html = '';
              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

                                    co.left + (parseInt($(ce).css("borderLeftWidth"), 10) || 0) + (parseInt($(ce).css("paddingLeft"), 10) || 0) - this.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 5103..5103

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

                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

                                    co.top + (parseInt($(ce).css("borderTopWidth"), 10) || 0) + (parseInt($(ce).css("paddingTop"), 10) || 0) - this.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 5102..5102

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

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

                    $.fn.fullCalendar = function (options) {
                
                
                        // method calling
                        if (typeof options == 'string') {
                Severity: Minor
                Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                          _mouseDown: function (event) {
                              // don't let more than one widget handle mouseStart
                              if (mouseHandled) {
                                  return;
                              }
                  Severity: Minor
                  Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                        $.widget.bridge = function (name, object) {
                            var fullName = object.prototype.widgetFullName || name;
                            $.fn[name] = function (options) {
                                var isMethodCall = typeof options === "string",
                                    args = slice.call(arguments, 1),
                    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

                                  top: function () {
                                      $.ui.position.flip.top.apply(this, arguments);
                                      $.ui.position.fit.top.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 1425..1428

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language