crmis/weddings

View on GitHub

Showing 334 of 334 total issues

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

                if (!event.metaKey && !event.ctrlKey) {
                    selectee.$element.removeClass("ui-selected");
                    selectee.selected = false;
                    selectee.$element.addClass("ui-unselecting");
                    selectee.unselecting = true;
Severity: Major
Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/viewable_calendar-editable.js on lines 4014..4024

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

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 (inst.snapElements[i].snapping) {
                        (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), {snapItem: inst.snapElements[i].item})));
                    }
Severity: Major
Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/viewable_calendar-editable.js on lines 2394..2396

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

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

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

                        if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
                            selectee.$element.removeClass("ui-selected");
                            selectee.selected = false;

                            selectee.$element.addClass("ui-unselecting");
Severity: Major
Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/viewable_calendar-editable.js on lines 3892..3901

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

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

        _generatePosition: function (event) {

            var containment, co, top, left,
                o = this.options,
                scroll = this.cssPosition === "absolute" && !( this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0]) ) ? this.offsetParent : this.scrollParent,
Severity: Major
Found in app/assets/javascripts/viewable_calendar-editable.js - About 2 hrs to fix

    Function createWrapper has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                createWrapper: function (element) {
    
                    // if the element is already wrapped, return it
                    if (element.parent().is(".ui-effects-wrapper")) {
                        return element.parent();
    Severity: Major
    Found in app/assets/javascripts/viewable_calendar-editable.js - About 2 hrs to fix

      Function buildHTMLForSegment has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function buildHTMLForSegment(segment) {
                  var html = '';
                  var isRTL = opt('isRTL');
                  var event = segment.event;
                  var url = event.url;
      Severity: Major
      Found in app/assets/javascripts/viewable_fullcalendar.js - About 2 hrs to fix

        Function _mouseStart has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _mouseStart: function (event) {
                    var that = this,
                        options = this.options;
        
                    this.opos = [event.pageX, event.pageY];
        Severity: Major
        Found in app/assets/javascripts/viewable_calendar-editable.js - About 2 hrs to fix

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

              function setOuterHeight(element, height, includeMargins) {
                  for (var i = 0, e; i < element.length; i++) {
                      e = $(element[i]);
                      e.height(Math.max(0, height - vsides(e, includeMargins)));
                  }
          Severity: Major
          Found in app/assets/javascripts/viewable_fullcalendar.js and 1 other location - About 2 hrs to fix
          app/assets/javascripts/viewable_fullcalendar.js on lines 1764..1769

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

          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

              function setOuterWidth(element, width, includeMargins) {
                  for (var i = 0, e; i < element.length; i++) {
                      e = $(element[i]);
                      e.width(Math.max(0, width - hsides(e, includeMargins)));
                  }
          Severity: Major
          Found in app/assets/javascripts/viewable_fullcalendar.js and 1 other location - About 2 hrs to fix
          app/assets/javascripts/viewable_fullcalendar.js on lines 1772..1777

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

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

                      parse: function (red, green, blue, alpha) {
                          if (red === undefined) {
                              this._rgba = [null, null, null, null];
                              return this;
                          }
          Severity: Major
          Found in app/assets/javascripts/viewable_calendar-editable.js - About 2 hrs to fix

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

                                    if (!p.height()) {
                                        p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop") || 0, 10) - parseInt(that.currentItem.css("paddingBottom") || 0, 10));
                                    }
            Severity: Major
            Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/viewable_calendar-editable.js on lines 4852..4854

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

            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 (!p.width()) {
                                        p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft") || 0, 10) - parseInt(that.currentItem.css("paddingRight") || 0, 10));
                                    }
            Severity: Major
            Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 2 hrs to fix
            app/assets/javascripts/viewable_calendar-editable.js on lines 4849..4851

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

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

                    $.effects.animateClass = function (value, duration, easing, callback) {
                        var o = $.speed(duration, easing, callback);
            
                        return this.queue(function () {
                            var animated = $(this),
            Severity: Minor
            Found in app/assets/javascripts/viewable_calendar-editable.js - About 2 hrs to fix

              Function buildDayTableBodyHTML has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function buildDayTableBodyHTML() {
                          var headerClass = tm + "-widget-header"; // TODO: make these when updateOptions() called
                          var contentClass = tm + "-widget-content";
                          var date;
                          var today = clearTime(new Date());
              Severity: Minor
              Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                                scroll = this.cssPosition === "absolute" && !( this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0]) ) ? this.offsetParent : this.scrollParent,
                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 1908..1908
                app/assets/javascripts/viewable_calendar-editable.js on lines 5117..5117
                app/assets/javascripts/viewable_calendar-editable.js on lines 5143..5143

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

                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

                                scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
                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 1908..1908
                app/assets/javascripts/viewable_calendar-editable.js on lines 1936..1936
                app/assets/javascripts/viewable_calendar-editable.js on lines 5143..5143

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

                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

                                scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
                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 1908..1908
                app/assets/javascripts/viewable_calendar-editable.js on lines 1936..1936
                app/assets/javascripts/viewable_calendar-editable.js on lines 5117..5117

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

                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

                                scroll = this.cssPosition === "absolute" && !( this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0]) ) ? this.offsetParent : this.scrollParent;
                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 1936..1936
                app/assets/javascripts/viewable_calendar-editable.js on lines 5117..5117
                app/assets/javascripts/viewable_calendar-editable.js on lines 5143..5143

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

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

                    function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
                        // derived from http://delete.me.uk/2005/03/iso8601.html
                        // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html
                        var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);
                        if (!m) {
                Severity: Minor
                Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

                  Function slotSegHtml has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function slotSegHtml(event, seg) {
                              var html = "<";
                              var url = event.url;
                              var skinCss = getSkinCss(event, opt);
                              var classes = ['fc-event', 'fc-event-vert'];
                  Severity: Minor
                  Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language