crmis/weddings

View on GitHub

Showing 334 of 334 total issues

File viewable_calendar-editable.js has 5492 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! jQuery UI - v1.10.3 - 2013-10-31
 * http://jqueryui.com
 * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.effect-drop.js, jquery.ui.effect-fade.js, jquery.ui.effect-scale.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
 * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */

Severity: Major
Found in app/assets/javascripts/viewable_calendar-editable.js - About 2 wks to fix

    File viewable_fullcalendar.js has 4418 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * FullCalendar v1.6.4
     * Docs & License: http://arshaw.com/fullcalendar/
     * (c) 2013 Adam Shaw
     */
    Severity: Major
    Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 wk to fix

      Function AgendaView has 684 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function AgendaView(element, calendar, viewName) {
              var t = this;
      
      
              // exports
      Severity: Major
      Found in app/assets/javascripts/viewable_fullcalendar.js - About 3 days to fix

        Function AgendaEventRenderer has 536 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function AgendaEventRenderer() {
                var t = this;
        
        
                // exports
        Severity: Major
        Found in app/assets/javascripts/viewable_fullcalendar.js - About 2 days to fix

          Function DayEventRenderer has 463 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function DayEventRenderer() {
                  var t = this;
          
          
                  // exports
          Severity: Major
          Found in app/assets/javascripts/viewable_fullcalendar.js - About 2 days to fix

            Function BasicView has 371 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function BasicView(element, calendar, viewName) {
                    var t = this;
            
            
                    // exports
            Severity: Major
            Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 day to fix

              Function Calendar has 360 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function Calendar(element, options, eventSources) {
                      var t = this;
              
              
                      // exports
              Severity: Major
              Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 day to fix

                Function View has 328 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function View(element, calendar, viewName) {
                        var t = this;
                
                
                        // exports
                Severity: Major
                Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 day to fix

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

                          _adjustOffsetFromHelper: function (obj) {
                              if (typeof obj === "string") {
                                  obj = obj.split(" ");
                              }
                              if ($.isArray(obj)) {
                  Severity: Major
                  Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 day to fix
                  app/assets/javascripts/viewable_calendar-editable.js on lines 1765..1784

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

                  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

                          _adjustOffsetFromHelper: function (obj) {
                              if (typeof obj === "string") {
                                  obj = obj.split(" ");
                              }
                              if ($.isArray(obj)) {
                  Severity: Major
                  Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 day to fix
                  app/assets/javascripts/viewable_calendar-editable.js on lines 5002..5021

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

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

                      function EventManager(options, _sources) {
                          var t = this;
                  
                  
                          // exports
                  Severity: Major
                  Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 day to fix

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

                                    if (data.collisionWidth > outerWidth) {
                                        // element is initially over the left side of within
                                        if (overLeft > 0 && overRight <= 0) {
                                            newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
                                            position.left += overLeft - newOverRight;
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 day to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 1324..1349

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

                    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 (data.collisionHeight > outerHeight) {
                                        // element is initially over the top of within
                                        if (overTop > 0 && overBottom <= 0) {
                                            newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
                                            position.top += overTop - newOverBottom;
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 day to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 1287..1312

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

                    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.axis || o.axis !== "x") {
                                        if ((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
                                            i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
                                        } else if (event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
                                            i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 7 hrs to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 2256..2262

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

                    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.axis || o.axis !== "y") {
                                        if ((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
                                            i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
                                        } else if (event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
                                            i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 7 hrs to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 2248..2254

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

                    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

                        $.ui.plugin.add("draggable", "zIndex", {
                            start: function (event, ui) {
                                var t = $(ui.helper), o = $(this).data("ui-draggable").options;
                                if (t.css("zIndex")) {
                                    o._zIndex = t.css("zIndex");
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 7 hrs to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 2219..2233

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

                    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

                        $.ui.plugin.add("draggable", "opacity", {
                            start: function (event, ui) {
                                var t = $(ui.helper), o = $(this).data("ui-draggable").options;
                                if (t.css("opacity")) {
                                    o._opacity = t.css("opacity");
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 7 hrs to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 2424..2438

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

                    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.axis || o.axis !== "y") {
                                        if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
                                            scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
                                        } else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
                                            scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 7 hrs to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 2266..2272

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

                    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.axis || o.axis !== "x") {
                                        if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
                                            scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
                                        } else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
                                            scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 7 hrs to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 2274..2280

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

                    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

                            _over: function (event) {
                    
                                var draggable = $.ui.ddmanager.current;
                    
                                // Bail if draggable and droppable are same element
                    Severity: Major
                    Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 7 hrs to fix
                    app/assets/javascripts/viewable_calendar-editable.js on lines 2550..2566

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

                    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