next-l/enju_leaf

View on GitHub
app/assets/javascripts/enju_event/fullcalendar.js

Summary

Maintainability
F
2 mos
Test Coverage

File fullcalendar.js has 8211 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * FullCalendar v2.9.0
 * Docs & License: http://fullcalendar.io/
 * (c) 2016 Adam Shaw
 */
Severity: Major
Found in app/assets/javascripts/enju_event/fullcalendar.js - About 3 wks to fix

    Function EventManager has 850 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function EventManager() { // assumed to be a calendar
        var t = this;
        
        
        // exports
    Severity: Major
    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 4 days to fix

      Function Calendar_constructor has 484 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Calendar_constructor(element, overrides) {
          var t = this;
      
      
          // Exports
      Severity: Major
      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 days to fix

        Function Header has 210 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Header(calendar) {
            var t = this;
            
            // exports
            t.render = render;
        Severity: Major
        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 day to fix

          Function renderSection has 135 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function renderSection(position) {
                  var sectionEl = $('<div class="fc-' + position + '"/>');
                  var options = calendar.options;
                  var buttonStr = options.header[position];
          
          
          Severity: Major
          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 5 hrs to fix

            Function _fetchEventSource has 91 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _fetchEventSource(source, callback) {
                    var i;
                    var fetchers = FC.sourceFetchers;
                    var res;
            
            
            Severity: Major
            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 3 hrs to fix

              Function buildSegDragListener has 87 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  buildSegDragListener: function(seg) {
                      var _this = this;
                      var view = this.view;
                      var calendar = view.calendar;
                      var el = seg.el;
              Severity: Major
              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 3 hrs to fix

                Function limitRow has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    limitRow: function(row, levelLimit) {
                        var _this = this;
                        var rowStruct = this.rowStructs[row];
                        var moreNodes = []; // array of "more" <a> links and <td> DOM nodes
                        var col = 0; // col #, left-to-right (not chronologically)
                Severity: Major
                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

                  Function renderSegRow has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      renderSegRow: function(row, rowSegs) {
                          var colCnt = this.colCnt;
                          var segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels
                          var levelCnt = Math.max(1, segLevels.length); // ensure at least one level
                          var tbody = $('<tbody/>');
                  Severity: Major
                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

                    Function mutateEvent has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function mutateEvent(event, newProps, largeUnit) {
                            var miscProps = {};
                            var oldProps;
                            var clearEnd;
                            var startDelta;
                    Severity: Major
                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

                      Function buildEventFromInput has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function buildEventFromInput(input, source) {
                              var out = {};
                              var start, end;
                              var allDay;
                      
                      
                      Severity: Major
                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

                        Function mutateEvents has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {
                                var isAmbigTimezone = t.getIsAmbigTimezone();
                                var undoFunctions = [];
                        
                                // normalize zero-length deltas to be null
                        Severity: Major
                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

                          Function buildSegResizeListener has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              buildSegResizeListener: function(seg, isStart) {
                                  var _this = this;
                                  var view = this.view;
                                  var calendar = view.calendar;
                                  var el = seg.el;
                          Severity: Major
                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

                            Function buildDayDragListener has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                buildDayDragListener: function() {
                                    var _this = this;
                                    var view = this.view;
                                    var isSelectable = view.opt('selectable');
                                    var dayClickHit; // null if invalid dayClick
                            Severity: Major
                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

                              Function makeMoment has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function makeMoment(args, parseAsUTC, parseZone) {
                                  var input = args[0];
                                  var isSingleString = args.length == 1 && typeof input === 'string';
                                  var isAmbigTime;
                                  var isAmbigZone;
                              Severity: Major
                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

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

                                    fgSegHtml: function(seg, disableResizing) {
                                        var view = this.view;
                                        var event = seg.event;
                                        var isDraggable = view.isEventDraggable(event);
                                        var isResizableFromStart = !disableResizing && seg.isStart && view.isEventResizableFromStart(event);
                                Severity: Major
                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 2 hrs to fix

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

                                      buildViewSpec: function(requestedViewType) {
                                          var viewOverrides = this.overrides.views || {};
                                          var specChain = []; // for the view. lowest to highest priority
                                          var defaultsChain = []; // for the view. lowest to highest priority
                                          var overridesChain = []; // for the view. lowest to highest priority
                                  Severity: Minor
                                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

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

                                        fgSegHtml: function(seg, disableResizing) {
                                            var view = this.view;
                                            var event = seg.event;
                                            var isDraggable = view.isEventDraggable(event);
                                            var isResizableFromStart = !disableResizing && event.allDay &&
                                    Severity: Minor
                                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

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

                                          function expandEvent(abstractEvent, _rangeStart, _rangeEnd) {
                                              var events = [];
                                              var dowHash;
                                              var dow;
                                              var i;
                                      Severity: Minor
                                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                        Function position has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            position: function() {
                                                var options = this.options;
                                                var origin = this.el.offsetParent().offset();
                                                var width = this.el.outerWidth();
                                                var height = this.el.outerHeight();
                                        Severity: Minor
                                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                          Function isSpanAllowed has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              function isSpanAllowed(span, constraint, overlap, event) {
                                                  var constraintEvents;
                                                  var anyContainment;
                                                  var peerEvents;
                                                  var i, peerEvent;
                                          Severity: Minor
                                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

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

                                                listenToExternalDrag: function(el, ev, ui) {
                                                    var _this = this;
                                                    var calendar = this.view.calendar;
                                                    var meta = getDraggedElMeta(el); // extra data about event drop, including possible event to create
                                                    var dropLocation; // a null value signals an unsuccessful drag
                                            Severity: Minor
                                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                              Function formatRangeWithChunks has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              function formatRangeWithChunks(date1, date2, chunks, separator, isRTL) {
                                                  var unzonedDate1 = date1.clone().stripZone(); // for formatSimilarChunk
                                                  var unzonedDate2 = date2.clone().stripZone(); // "
                                                  var chunkStr; // the rendering of the chunk
                                                  var leftI;
                                              Severity: Minor
                                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

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

                                                    updateDayTable: function() {
                                                        var view = this.view;
                                                        var date = this.start.clone();
                                                        var dayIndex = -1;
                                                        var dayIndices = [];
                                                Severity: Minor
                                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                  Function setOptions has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      function setOptions(newOptionHash) {
                                                          var optionCnt = 0;
                                                          var optionName;
                                                  
                                                          for (optionName in newOptionHash) {
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                    Function computeEventDrop has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        computeEventDrop: function(startSpan, endSpan, event) {
                                                            var calendar = this.view.calendar;
                                                            var dragStart = startSpan.start;
                                                            var dragEnd = endSpan.start;
                                                            var delta;
                                                    Severity: Minor
                                                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                      Function massageOverrides has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      function massageOverrides(input) {
                                                          var overrides = { views: input.views || {} }; // the output. ensure a `views` hash
                                                          var subObj;
                                                      
                                                          // iterate through all option override properties (except `views`)
                                                      Severity: Minor
                                                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                        Function distributeHeight has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        function distributeHeight(els, availableHeight, shouldRedistribute) {
                                                        
                                                            // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,
                                                            // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                          Function bindHandlers has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              bindHandlers: function() {
                                                                  var _this = this;
                                                                  var touchStartIgnores = 1;
                                                          
                                                                  if (this.isTouch) {
                                                          Severity: Minor
                                                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                            Function mergeProps has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            function mergeProps(propObjs, complexProps) {
                                                                var dest = {};
                                                                var i, name;
                                                                var complexObjs;
                                                                var j, val;
                                                            Severity: Minor
                                                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                              Function showSegPopover has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  showSegPopover: function(row, col, moreLink, segs) {
                                                                      var _this = this;
                                                                      var view = this.view;
                                                                      var moreWrap = moreLink.parent(); // the <div> wrapper around the <a>
                                                                      var topEl; // the element we want to match the top coordinate of
                                                              Severity: Minor
                                                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                Function buildEventSource has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    function buildEventSource(sourceInput) { // will return undefined if invalid source
                                                                        var normalizers = FC.sourceNormalizers;
                                                                        var source;
                                                                        var i;
                                                                
                                                                
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                  Function startInteraction has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                      startInteraction: function(ev, extraOptions) {
                                                                          var isTouch = getEvIsTouch(ev);
                                                                  
                                                                          if (ev.type === 'mousedown') {
                                                                              if (this.isIgnoringMouse) {
                                                                  Severity: Minor
                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                    Function getDraggedElMeta has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                    function getDraggedElMeta(el) {
                                                                        var prefix = FC.dataAttrPrefix;
                                                                        var eventProps; // properties for creating the event, not related to date/time
                                                                        var startTime; // a Duration
                                                                        var duration;
                                                                    Severity: Minor
                                                                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                      Function renderView has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          function renderView(viewType, explicitScrollState) {
                                                                              ignoreWindowResize++;
                                                                      
                                                                              // if viewType is changing, remove the old view's rendering
                                                                              if (currentView && viewType && currentView.type !== viewType) {
                                                                      Severity: Minor
                                                                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                        Function intersectRanges has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                        function intersectRanges(subjectRange, constraintRange) {
                                                                            var subjectStart = subjectRange.start;
                                                                            var subjectEnd = subjectRange.end;
                                                                            var constraintStart = constraintRange.start;
                                                                            var constraintEnd = constraintRange.end;
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                          Function setHeight has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                              setHeight: function(totalHeight, isAuto) {
                                                                                  var eventLimit;
                                                                                  var scrollerHeight;
                                                                                  var scrollbarWidths;
                                                                          
                                                                          
                                                                          Severity: Minor
                                                                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                            Function renderSlatRowHtml has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                renderSlatRowHtml: function() {
                                                                                    var view = this.view;
                                                                                    var isRTL = this.isRTL;
                                                                                    var html = '';
                                                                                    var slotTime = moment.duration(+this.minTime); // wish there was .clone() for durations
                                                                            Severity: Minor
                                                                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                              Function renderMoreLink has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                  renderMoreLink: function(row, col, hiddenSegs) {
                                                                                      var _this = this;
                                                                                      var view = this.view;
                                                                              
                                                                                      return $('<a class="fc-more"/>')
                                                                              Severity: Minor
                                                                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                Function renderDates has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                    renderDates: function(isRigid) {
                                                                                        var view = this.view;
                                                                                        var rowCnt = this.rowCnt;
                                                                                        var colCnt = this.colCnt;
                                                                                        var html = '';
                                                                                Severity: Minor
                                                                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                  Function renderContentSkeleton has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      renderContentSkeleton: function() {
                                                                                          var cellHtml = '';
                                                                                          var i;
                                                                                          var skeletonEl;
                                                                                  
                                                                                  
                                                                                  Severity: Minor
                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                    Function tryFetchEventSource has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                        function tryFetchEventSource(source, fetchId) {
                                                                                            _fetchEventSource(source, function(eventInputs) {
                                                                                                var isArraySource = $.isArray(source.events);
                                                                                                var i, eventInput;
                                                                                                var abstractEvent;
                                                                                    Severity: Minor
                                                                                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                      Function sliceRangeByDay has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                          sliceRangeByDay: function(range) {
                                                                                              var daysPerRow = this.daysPerRow;
                                                                                              var normalRange = this.view.computeDayRange(range); // make whole-day range, considering nextDayThreshold
                                                                                              var rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index
                                                                                              var rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index
                                                                                      Severity: Minor
                                                                                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                        Function getBusinessHoursEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                            function getBusinessHoursEvents(wholeDay) {
                                                                                                var optionVal = t.options.businessHours;
                                                                                                var defaultVal = {
                                                                                                    className: 'fc-nonbusiness',
                                                                                                    start: '09:00',
                                                                                        Severity: Minor
                                                                                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                          Function ListenerMixin has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                          var ListenerMixin = FC.ListenerMixin = (function() {
                                                                                              var guid = 0;
                                                                                              var ListenerMixin = {
                                                                                          
                                                                                                  listenerId: null,
                                                                                          Severity: Minor
                                                                                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                            Function renderSegPopoverContent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                renderSegPopoverContent: function(row, col, segs) {
                                                                                                    var view = this.view;
                                                                                                    var isTheme = view.opt('theme');
                                                                                                    var title = this.getCellDate(row, col).format(view.opt('dayPopoverFormat'));
                                                                                                    var content = $(
                                                                                            Severity: Minor
                                                                                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                              Function debounce has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                              function debounce(func, wait, immediate) {
                                                                                                  var timeout, args, context, timestamp, result;
                                                                                              
                                                                                                  var later = function() {
                                                                                                      var last = +new Date() - timestamp;
                                                                                              Severity: Minor
                                                                                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                Function populateOptionsHash has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                    populateOptionsHash: function() {
                                                                                                        var lang, langDefaults;
                                                                                                        var isRTL, dirDefaults;
                                                                                                
                                                                                                        lang = firstDefined( // explicit lang option given?
                                                                                                Severity: Minor
                                                                                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                  Function computeEventResize has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      computeEventResize: function(type, startSpan, endSpan, event) {
                                                                                                          var calendar = this.view.calendar;
                                                                                                          var delta = this.diffDates(endSpan[type], startSpan[type]);
                                                                                                          var resizeLocation; // zoned event date properties
                                                                                                          var defaultDuration;
                                                                                                  Severity: Minor
                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                    Function computeRange has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                        computeRange: function(date) {
                                                                                                            var intervalUnit = computeIntervalUnit(this.intervalDuration);
                                                                                                            var intervalStart = date.clone().startOf(intervalUnit);
                                                                                                            var intervalEnd = intervalStart.clone().add(this.intervalDuration);
                                                                                                            var start, end;
                                                                                                    Severity: Minor
                                                                                                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                      Function handleInteractionStart has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          handleInteractionStart: function(ev) {
                                                                                                              var subjectEl = this.subjectEl;
                                                                                                              var subjectRect;
                                                                                                              var origPoint;
                                                                                                              var point;
                                                                                                      Severity: Minor
                                                                                                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                        Function stop has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                            stop: function(shouldRevert, callback) {
                                                                                                                var _this = this;
                                                                                                                var revertDuration = this.options.revertDuration;
                                                                                                        
                                                                                                                function complete() {
                                                                                                        Severity: Minor
                                                                                                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                          Function sliceRangeByRow has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                              sliceRangeByRow: function(range) {
                                                                                                                  var daysPerRow = this.daysPerRow;
                                                                                                                  var normalRange = this.view.computeDayRange(range); // make whole-day range, considering nextDayThreshold
                                                                                                                  var rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index
                                                                                                                  var rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index
                                                                                                          Severity: Minor
                                                                                                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                            Function getSegSkinCss has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                getSegSkinCss: function(seg) {
                                                                                                                    var event = seg.event;
                                                                                                                    var view = this.view;
                                                                                                                    var source = event.source || {};
                                                                                                                    var eventColor = event.color;
                                                                                                            Severity: Minor
                                                                                                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                              Function hitOver has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                          hitOver: function(hit, isOrig, origHit) {
                                                                                                                              var dragHelperEls;
                                                                                                              
                                                                                                                              // starting hit could be forced (DayGrid.limit)
                                                                                                                              if (seg.hit) {
                                                                                                              Severity: Minor
                                                                                                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 1 hr to fix

                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                Open

                                                                                                                                        if (endTime) {
                                                                                                                                            end = date.clone().time(endTime);
                                                                                                                                        }
                                                                                                                Severity: Major
                                                                                                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 45 mins to fix

                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                  Open

                                                                                                                                                          if (
                                                                                                                                                              button.hasClass(tm + '-state-active') ||
                                                                                                                                                              button.hasClass(tm + '-state-disabled')
                                                                                                                                                          ) {
                                                                                                                                                              button.removeClass(tm + '-state-hover');
                                                                                                                  Severity: Major
                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 45 mins to fix

                                                                                                                    Function mutateEvents has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {
                                                                                                                    Severity: Minor
                                                                                                                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 45 mins to fix

                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                      Open

                                                                                                                                              if (startTime) {
                                                                                                                                                  start = start.time(startTime);
                                                                                                                                              }
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 45 mins to fix

                                                                                                                        Function formatSimilarChunk has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        function formatSimilarChunk(date1, date2, unzonedDate1, unzonedDate2, chunk) {
                                                                                                                        Severity: Minor
                                                                                                                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                          Function reportEventDrop has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                              reportEventDrop: function(event, dropLocation, largeUnit, el, ev) {
                                                                                                                          Severity: Minor
                                                                                                                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                            Function reportEventResize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                reportEventResize: function(event, resizeLocation, largeUnit, el, ev) {
                                                                                                                            Severity: Minor
                                                                                                                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                              Function formatRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                              function formatRange(date1, date2, formatStr, separator, isRTL) {
                                                                                                                              Severity: Minor
                                                                                                                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                                Function triggerExternalDrop has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                Open

                                                                                                                                    triggerExternalDrop: function(event, dropLocation, el, ev, ui) {
                                                                                                                                Severity: Minor
                                                                                                                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                                  Function reportExternalDrop has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                      reportExternalDrop: function(meta, dropLocation, el, ev, ui) {
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                                    Function triggerEventDrop has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        triggerEventDrop: function(event, dateDelta, undoFunc, el, ev) {
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                                      Function triggerEventResize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                          triggerEventResize: function(event, durationDelta, undoFunc, el, ev) {
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                                        Function formatRangeWithChunks has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                        function formatRangeWithChunks(date1, date2, chunks, separator, isRTL) {
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in app/assets/javascripts/enju_event/fullcalendar.js - About 35 mins to fix

                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                          Open

                                                                                                                                              return a - b;
                                                                                                                                          Severity: Major
                                                                                                                                          Found in app/assets/javascripts/enju_event/fullcalendar.js - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                            Open

                                                                                                                                                    return true;
                                                                                                                                            Severity: Major
                                                                                                                                            Found in app/assets/javascripts/enju_event/fullcalendar.js - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                              Open

                                                                                                                                                  return '';
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/assets/javascripts/enju_event/fullcalendar.js - About 30 mins to fix

                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                Open

                                                                                                                                                                        return false;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in app/assets/javascripts/enju_event/fullcalendar.js - About 30 mins to fix

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

                                                                                                                                                      getVerticalIndex: function(topOffset) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                  
                                                                                                                                                          var boundingRect = this.boundingRect;
                                                                                                                                                          var tops = this.tops;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 6 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2317..2333

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

                                                                                                                                                  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

                                                                                                                                                      getHorizontalIndex: function(leftOffset) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                  
                                                                                                                                                          var boundingRect = this.boundingRect;
                                                                                                                                                          var lefts = this.lefts;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 6 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2338..2354

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

                                                                                                                                                  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

                                                                                                                                                      buildElHorizontals: function() {
                                                                                                                                                          var lefts = [];
                                                                                                                                                          var rights = [];
                                                                                                                                                  
                                                                                                                                                          this.els.each(function(i, node) {
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 5 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2297..2312

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

                                                                                                                                                  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

                                                                                                                                                      buildElVerticals: function() {
                                                                                                                                                          var tops = [];
                                                                                                                                                          var bottoms = [];
                                                                                                                                                  
                                                                                                                                                          this.els.each(function(i, node) {
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 5 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2278..2293

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

                                                                                                                                                  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.scrollTopVel < 0) { // scrolling up?
                                                                                                                                                              if (el.scrollTop() <= 0) { // already scrolled all the way up?
                                                                                                                                                                  this.scrollTopVel = 0;
                                                                                                                                                              }
                                                                                                                                                          }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 4 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2922..2931

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

                                                                                                                                                  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.scrollLeftVel < 0) { // scrolling left?
                                                                                                                                                              if (el.scrollLeft() <= 0) { // already scrolled all the left?
                                                                                                                                                                  this.scrollLeftVel = 0;
                                                                                                                                                              }
                                                                                                                                                          }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 4 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2911..2920

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

                                                                                                                                                  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

                                                                                                                                                      groupSegsByCol: function(segs) {
                                                                                                                                                          var segsByCol = [];
                                                                                                                                                          var i;
                                                                                                                                                  
                                                                                                                                                          for (i = 0; i < this.colCnt; i++) {
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 3 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 6295..6308

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

                                                                                                                                                  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

                                                                                                                                                      groupSegRows: function(segs) {
                                                                                                                                                          var segRows = [];
                                                                                                                                                          var i;
                                                                                                                                                  
                                                                                                                                                          for (i = 0; i < this.rowCnt; i++) {
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 3 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 7404..7417

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

                                                                                                                                                  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

                                                                                                                                                      reportEventResize: function(event, resizeLocation, largeUnit, el, ev) {
                                                                                                                                                          var calendar = this.calendar;
                                                                                                                                                          var mutateResult = calendar.mutateEvent(event, resizeLocation, largeUnit);
                                                                                                                                                          var undoFunc = function() {
                                                                                                                                                              mutateResult.undo();
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 3 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 8592..8602

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

                                                                                                                                                  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

                                                                                                                                                      reportEventDrop: function(event, dropLocation, largeUnit, el, ev) {
                                                                                                                                                          var calendar = this.calendar;
                                                                                                                                                          var mutateResult = calendar.mutateEvent(event, dropLocation, largeUnit);
                                                                                                                                                          var undoFunc = function() {
                                                                                                                                                              mutateResult.undo();
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 3 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 8695..8705

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

                                                                                                                                                  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

                                                                                                                                                      renderNumberCellsHtml: function(row) {
                                                                                                                                                          var htmls = [];
                                                                                                                                                          var col, date;
                                                                                                                                                  
                                                                                                                                                          for (col = 0; col < this.colCnt; col++) {
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 3 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 5530..5540

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

                                                                                                                                                  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

                                                                                                                                                      renderBgCellsHtml: function(row) {
                                                                                                                                                          var htmls = [];
                                                                                                                                                          var col, date;
                                                                                                                                                  
                                                                                                                                                          for (col = 0; col < this.colCnt; col++) {
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 3 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 5721..5731

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

                                                                                                                                                  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

                                                                                                                                                      renderNumberTrHtml: function(row) {
                                                                                                                                                          return '' +
                                                                                                                                                              '<tr>' +
                                                                                                                                                                  (this.isRTL ? '' : this.renderNumberIntroHtml(row)) +
                                                                                                                                                                  this.renderNumberCellsHtml(row) +
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 2 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 5515..5522

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

                                                                                                                                                  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

                                                                                                                                                      renderBgTrHtml: function(row) {
                                                                                                                                                          return '' +
                                                                                                                                                              '<tr>' +
                                                                                                                                                                  (this.isRTL ? '' : this.renderBgIntroHtml(row)) +
                                                                                                                                                                  this.renderBgCellsHtml(row) +
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 2 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 5706..5713

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

                                                                                                                                                  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

                                                                                                                                                      renderBusinessSegs: function(segs) {
                                                                                                                                                          segs = this.renderFillSegEls('businessHours', segs); // TODO: old fill system
                                                                                                                                                          this.updateSegVerticals(segs);
                                                                                                                                                          this.attachSegsByCol(this.groupSegsByCol(segs), this.businessContainerEls);
                                                                                                                                                          this.businessSegs = segs;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 2 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 7369..7374

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

                                                                                                                                                  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

                                                                                                                                                      renderHighlightSegs: function(segs) {
                                                                                                                                                          segs = this.renderFillSegEls('highlight', segs); // TODO: old fill system
                                                                                                                                                          this.updateSegVerticals(segs);
                                                                                                                                                          this.attachSegsByCol(this.groupSegsByCol(segs), this.highlightContainerEls);
                                                                                                                                                          this.highlightSegs = segs;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 2 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 7386..7391

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

                                                                                                                                                  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 (overflowY === 'auto') {
                                                                                                                                                              overflowY = (
                                                                                                                                                                      scrollbarWidths.left || scrollbarWidths.right || // vertical scrollbars?
                                                                                                                                                                      // OR scrolling pane with massless scrollbars?
                                                                                                                                                                      this.scrollEl[0].scrollHeight - 1 > this.scrollEl[0].clientHeight
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 2 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 9022..9029

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

                                                                                                                                                  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 (overflowX === 'auto') {
                                                                                                                                                              overflowX = (
                                                                                                                                                                      scrollbarWidths.top || scrollbarWidths.bottom || // horizontal scrollbars?
                                                                                                                                                                      // OR scrolling pane with massless scrollbars?
                                                                                                                                                                      this.scrollEl[0].scrollWidth - 1 > this.scrollEl[0].clientWidth
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 2 hrs to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 9031..9038

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

                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                  Refactorings

                                                                                                                                                  Further Reading

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

                                                                                                                                                          return '<a class="' + classes.join(' ') + '"' +
                                                                                                                                                              (event.url ?
                                                                                                                                                                  ' href="' + htmlEscape(event.url) + '"' :
                                                                                                                                                                  ''
                                                                                                                                                                  ) +
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 6140..6154

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

                                                                                                                                                      function eventIntersectsRange(event, range) {
                                                                                                                                                          var eventStart = event.start.clone().stripZone();
                                                                                                                                                          var eventEnd = t.getEventEnd(event).stripZone();
                                                                                                                                                  
                                                                                                                                                          return range.start < eventEnd && range.end > eventStart;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12003..12008

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

                                                                                                                                                          return '<a class="' + classes.join(' ') + '"' +
                                                                                                                                                                  (event.url ?
                                                                                                                                                                      ' href="' + htmlEscape(event.url) + '"' :
                                                                                                                                                                      ''
                                                                                                                                                                      ) +
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 7507..7526

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

                                                                                                                                                      function eventContainsRange(event, range) {
                                                                                                                                                          var eventStart = event.start.clone().stripZone();
                                                                                                                                                          var eventEnd = t.getEventEnd(event).stripZone();
                                                                                                                                                  
                                                                                                                                                          return range.start >= eventStart && range.end <= eventEnd;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12013..12018

                                                                                                                                                  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

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

                                                                                                                                                              if (segFirst <= segLast) { // was there any intersection with the current row?
                                                                                                                                                                  segs.push({
                                                                                                                                                                      row: row,
                                                                                                                                                  
                                                                                                                                                                      // normalize to start of row
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 5423..5435

                                                                                                                                                  Duplicated Code

                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                  Tuning

                                                                                                                                                  This issue has a mass of 72.

                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                  Refactorings

                                                                                                                                                  Further Reading

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

                                                                                                                                                                  if (segFirst <= segLast) { // was there any intersection with the current row?
                                                                                                                                                                      segs.push({
                                                                                                                                                                          row: row,
                                                                                                                                                  
                                                                                                                                                                          // normalize to start of row
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 5377..5389

                                                                                                                                                  Duplicated Code

                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                  Tuning

                                                                                                                                                  This issue has a mass of 72.

                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                  Refactorings

                                                                                                                                                  Further Reading

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

                                                                                                                                                      isEventResizable: function(event) {
                                                                                                                                                          var source = event.source || {};
                                                                                                                                                  
                                                                                                                                                          return firstDefined(
                                                                                                                                                              event.durationEditable,
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 8576..8587

                                                                                                                                                  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

                                                                                                                                                      isEventDraggable: function(event) {
                                                                                                                                                          var source = event.source || {};
                                                                                                                                                  
                                                                                                                                                          return firstDefined(
                                                                                                                                                              event.startEditable,
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 8680..8691

                                                                                                                                                  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

                                                                                                                                                  function getEvX(ev) {
                                                                                                                                                      if (ev.pageX !== undefined) {
                                                                                                                                                          return ev.pageX;
                                                                                                                                                      }
                                                                                                                                                      var touches = ev.originalEvent.touches;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 443..451

                                                                                                                                                  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

                                                                                                                                                  function getEvY(ev) {
                                                                                                                                                      if (ev.pageY !== undefined) {
                                                                                                                                                          return ev.pageY;
                                                                                                                                                      }
                                                                                                                                                      var touches = ev.originalEvent.touches;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 432..440

                                                                                                                                                  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

                                                                                                                                                          return '' +
                                                                                                                                                              '<table>' +
                                                                                                                                                                  '<thead class="fc-head">' +
                                                                                                                                                                      '<tr>' +
                                                                                                                                                                          '<td class="fc-head-container ' + this.widgetHeaderClass + '"></td>' +
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12185..12195

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

                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                  Refactorings

                                                                                                                                                  Further Reading

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

                                                                                                                                                          return '' +
                                                                                                                                                              '<table>' +
                                                                                                                                                                  '<thead class="fc-head">' +
                                                                                                                                                                      '<tr>' +
                                                                                                                                                                          '<td class="fc-head-container ' + this.widgetHeaderClass + '"></td>' +
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12665..12679

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

                                                                                                                                                  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

                                                                                                                                                      segDragStop: function(seg, ev) {
                                                                                                                                                          this.isDraggingSeg = false;
                                                                                                                                                          this.view.trigger('eventDragStop', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4472..4475
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4746..4749
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4753..4756

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

                                                                                                                                                  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

                                                                                                                                                      segResizeStart: function(seg, ev) {
                                                                                                                                                          this.isResizingSeg = true;
                                                                                                                                                          this.view.trigger('eventResizeStart', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4472..4475
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4479..4482
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4753..4756

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

                                                                                                                                                  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

                                                                                                                                                      segDragStart: function(seg, ev) {
                                                                                                                                                          this.isDraggingSeg = true;
                                                                                                                                                          this.view.trigger('eventDragStart', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4479..4482
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4746..4749
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4753..4756

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

                                                                                                                                                  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

                                                                                                                                                      segResizeStop: function(seg, ev) {
                                                                                                                                                          this.isResizingSeg = false;
                                                                                                                                                          this.view.trigger('eventResizeStop', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4472..4475
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4479..4482
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4746..4749

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

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

                                                                                                                                                      hourFormat: function(momOptions) {
                                                                                                                                                          return momOptions.longDateFormat('LT')
                                                                                                                                                              .replace(':mm', '')
                                                                                                                                                              .replace(/(\Wmm)$/, '') // like above, but for foreign langs
                                                                                                                                                              .replace(/\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10427..10432
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10435..10440

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

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

                                                                                                                                                      smallTimeFormat: function(momOptions) {
                                                                                                                                                          return momOptions.longDateFormat('LT')
                                                                                                                                                              .replace(':mm', '(:mm)')
                                                                                                                                                              .replace(/(\Wmm)$/, '($1)') // like above, but for foreign langs
                                                                                                                                                              .replace(/\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10435..10440
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10443..10448

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

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

                                                                                                                                                      extraSmallTimeFormat: function(momOptions) {
                                                                                                                                                          return momOptions.longDateFormat('LT')
                                                                                                                                                              .replace(':mm', '(:mm)')
                                                                                                                                                              .replace(/(\Wmm)$/, '($1)') // like above, but for foreign langs
                                                                                                                                                              .replace(/\s*a$/i, 't'); // convert to AM/PM/am/pm to lowercase one-letter. remove any spaces beforehand
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10427..10432
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10443..10448

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

                                                                                                                                                  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() {
                                                                                                                                                                                          // the *hover* effect.
                                                                                                                                                                                          // only on buttons that are not the "active" tab, or disabled
                                                                                                                                                                                          button
                                                                                                                                                                                              .not('.' + tm + '-state-active')
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10673..10680

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

                                                                                                                                                  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 disableButton(buttonName) {
                                                                                                                                                          if (el) {
                                                                                                                                                              el.find('.fc-' + buttonName + '-button')
                                                                                                                                                                  .prop('disabled', true)
                                                                                                                                                                  .addClass(tm + '-state-disabled');
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10763..10769

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

                                                                                                                                                  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 enableButton(buttonName) {
                                                                                                                                                          if (el) {
                                                                                                                                                              el.find('.fc-' + buttonName + '-button')
                                                                                                                                                                  .prop('disabled', false)
                                                                                                                                                                  .removeClass(tm + '-state-disabled');
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10754..10760

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

                                                                                                                                                  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

                                                                                                                                                                                  .mousedown(function() {
                                                                                                                                                                                      // the *down* effect (mouse pressed in).
                                                                                                                                                                                      // only on buttons that are not the "active" tab, or disabled
                                                                                                                                                                                      button
                                                                                                                                                                                          .not('.' + tm + '-state-active')
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 1 hr to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10686..10693

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

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

                                                                                                                                                      smallWeekFormat: function(options) {
                                                                                                                                                          return options.isRTL ?
                                                                                                                                                              'w[' + options.weekNumberTitle + ']' :
                                                                                                                                                              '[' + options.weekNumberTitle + ']w';
                                                                                                                                                      }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 45 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10394..10398
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10472..10476

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

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

                                                                                                                                                      monthYearFormat: function(dpOptions) {
                                                                                                                                                          return dpOptions.showMonthAfterYear ?
                                                                                                                                                              'YYYY[' + dpOptions.yearSuffix + '] MMMM' :
                                                                                                                                                              'MMMM YYYY[' + dpOptions.yearSuffix + ']';
                                                                                                                                                      }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 45 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10472..10476
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10479..10483

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

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

                                                                                                                                                      weekFormat: function(options) {
                                                                                                                                                          return options.isRTL ?
                                                                                                                                                              'w[ ' + options.weekNumberTitle + ']' :
                                                                                                                                                              '[' + options.weekNumberTitle + ' ]w';
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 45 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10394..10398
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10479..10483

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

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

                                                                                                                                                      unrenderDrag: function() {
                                                                                                                                                          this.timeGrid.unrenderDrag();
                                                                                                                                                          if (this.dayGrid) {
                                                                                                                                                              this.dayGrid.unrenderDrag();
                                                                                                                                                          }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 40 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12709..12715
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12858..12863

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

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

                                                                                                                                                      releaseHits: function() {
                                                                                                                                                          this.timeGrid.releaseHits();
                                                                                                                                                          if (this.dayGrid) {
                                                                                                                                                              this.dayGrid.releaseHits();
                                                                                                                                                          }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 40 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12709..12715
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12960..12965

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

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

                                                                                                                                                      unrenderBusinessHours: function() {
                                                                                                                                                          this.timeGrid.unrenderBusinessHours();
                                                                                                                                                  
                                                                                                                                                          if (this.dayGrid) {
                                                                                                                                                              this.dayGrid.unrenderBusinessHours();
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 2 other locations - About 40 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12858..12863
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12960..12965

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

                                                                                                                                                  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

                                                                                                                                                      removeElement: function() {
                                                                                                                                                          if (this.el) {
                                                                                                                                                              this.el.remove();
                                                                                                                                                              this.el = null;
                                                                                                                                                          }
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 40 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 5946..5951

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

                                                                                                                                                  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

                                                                                                                                                      unrenderHelper: function() {
                                                                                                                                                          if (this.helperEls) {
                                                                                                                                                              this.helperEls.remove();
                                                                                                                                                              this.helperEls = null;
                                                                                                                                                          }
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 40 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 3328..3333

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

                                                                                                                                                  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

                                                                                                                                                      getBottomPosition: function(topIndex) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                          return this.bottoms[topIndex] - this.origin.top;
                                                                                                                                                      },
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2381..2384

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

                                                                                                                                                  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

                                                                                                                                                      hideEvent: function(event) {
                                                                                                                                                          this.renderedEventSegEach(function(seg) {
                                                                                                                                                              seg.el.css('visibility', 'hidden');
                                                                                                                                                          }, event);
                                                                                                                                                      },
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 8532..8536

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

                                                                                                                                                  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

                                                                                                                                                      showEvent: function(event) {
                                                                                                                                                          this.renderedEventSegEach(function(seg) {
                                                                                                                                                              seg.el.css('visibility', '');
                                                                                                                                                          }, event);
                                                                                                                                                      },
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 8540..8544

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

                                                                                                                                                  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 deactivateButton(buttonName) {
                                                                                                                                                          if (el) {
                                                                                                                                                              el.find('.fc-' + buttonName + '-button')
                                                                                                                                                                  .removeClass(tm + '-state-active');
                                                                                                                                                          }
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10738..10743

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

                                                                                                                                                  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

                                                                                                                                                      getRightPosition: function(leftIndex) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                          return this.rights[leftIndex] - this.origin.left;
                                                                                                                                                      },
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2417..2420

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

                                                                                                                                                  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 activateButton(buttonName) {
                                                                                                                                                          if (el) {
                                                                                                                                                              el.find('.fc-' + buttonName + '-button')
                                                                                                                                                                  .addClass(tm + '-state-active');
                                                                                                                                                          }
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 10746..10751

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

                                                                                                                                                  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

                                                                                                                                                      getHeight: function(topIndex) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                          return this.bottoms[topIndex] - this.tops[topIndex];
                                                                                                                                                      }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2365..2368
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2388..2391
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2402..2405

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

                                                                                                                                                  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

                                                                                                                                                      getWidth: function(leftIndex) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                          return this.rights[leftIndex] - this.lefts[leftIndex];
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2365..2368
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2402..2405
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2424..2427

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

                                                                                                                                                  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

                                                                                                                                                      getTopPosition: function(topIndex) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                          return this.tops[topIndex] - this.origin.top;
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2365..2368
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2388..2391
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2424..2427

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

                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                  Refactorings

                                                                                                                                                  Further Reading

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

                                                                                                                                                      return {
                                                                                                                                                          left: left,
                                                                                                                                                          right: left + el.outerWidth(),
                                                                                                                                                          top: top,
                                                                                                                                                          bottom: top + el.outerHeight()
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 352..357

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

                                                                                                                                                  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

                                                                                                                                                      t.getIsAmbigTimezone = function() {
                                                                                                                                                          return t.options.timezone !== 'local' && t.options.timezone !== 'UTC';
                                                                                                                                                      };
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 9781..9783

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

                                                                                                                                                  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

                                                                                                                                                      t.isHeightAuto = function() {
                                                                                                                                                          return t.options.contentHeight === 'auto' || t.options.height === 'auto';
                                                                                                                                                      };
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 9488..9490

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

                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                  Refactorings

                                                                                                                                                  Further Reading

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

                                                                                                                                                      return {
                                                                                                                                                          left: left,
                                                                                                                                                          right: left + el.width(),
                                                                                                                                                          top: top,
                                                                                                                                                          bottom: top + el.height()
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 314..319

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

                                                                                                                                                  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

                                                                                                                                                      getLeftPosition: function(leftIndex) {
                                                                                                                                                          this.ensureBuilt();
                                                                                                                                                          return this.lefts[leftIndex] - this.origin.left;
                                                                                                                                                      },
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 3 other locations - About 35 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2388..2391
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2402..2405
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 2424..2427

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

                                                                                                                                                  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

                                                                                                                                                      renderBgEvents: function(events) {
                                                                                                                                                          var segs = this.eventsToSegs(events);
                                                                                                                                                  
                                                                                                                                                          // renderBgSegs might return a subset of segs, segs that were actually rendered
                                                                                                                                                          return this.renderBgSegs(segs) || segs;
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4069..4074

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

                                                                                                                                                  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 (src._ambigTime) {
                                                                                                                                                          dest._ambigTime = true;
                                                                                                                                                      }
                                                                                                                                                      else if (dest._ambigTime) {
                                                                                                                                                          dest._ambigTime = false;
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 1528..1533

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

                                                                                                                                                  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

                                                                                                                                                      renderFgEvents: function(events) {
                                                                                                                                                          var segs = this.eventsToSegs(events);
                                                                                                                                                  
                                                                                                                                                          // renderFgSegs might return a subset of segs, segs that were actually rendered
                                                                                                                                                          return this.renderFgSegs(segs) || segs;
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 4061..4066

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

                                                                                                                                                  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

                                                                                                                                                      pushLoading: function() {
                                                                                                                                                          if (!(this.loadingLevel++)) {
                                                                                                                                                              this.trigger('loading', null, true, this.view);
                                                                                                                                                          }
                                                                                                                                                      },
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 9309..9313

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

                                                                                                                                                  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

                                                                                                                                                      popLoading: function() {
                                                                                                                                                          if (!(--this.loadingLevel)) {
                                                                                                                                                              this.trigger('loading', null, false, this.view);
                                                                                                                                                          }
                                                                                                                                                      },
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 9301..9305

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

                                                                                                                                                  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 (src._ambigZone) {
                                                                                                                                                          dest._ambigZone = true;
                                                                                                                                                      }
                                                                                                                                                      else if (dest._ambigZone) {
                                                                                                                                                          dest._ambigZone = false;
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 1521..1526

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

                                                                                                                                                  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

                                                                                                                                                      weekNumberStyleAttr: function() {
                                                                                                                                                          if (this.weekNumberWidth !== null) {
                                                                                                                                                              return 'style="width:' + this.weekNumberWidth + 'px"';
                                                                                                                                                          }
                                                                                                                                                          return '';
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12688..12693

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

                                                                                                                                                  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

                                                                                                                                                      axisStyleAttr: function() {
                                                                                                                                                          if (this.axisWidth !== null) {
                                                                                                                                                               return 'style="width:' + this.axisWidth + 'px"';
                                                                                                                                                          }
                                                                                                                                                          return '';
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/enju_event/fullcalendar.js and 1 other location - About 30 mins to fix
                                                                                                                                                  app/assets/javascripts/enju_event/fullcalendar.js on lines 12202..12207

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

                                                                                                                                                  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

                                                                                                                                                  There are no issues that match your filters.

                                                                                                                                                  Category
                                                                                                                                                  Status