angelakuo/citydogshare

View on GitHub
public/assets/jquery-ui/datepicker-d71e97c5117a122fd20879c108bef1c459737ec0c284887efd057839fc5b57bf.js

Summary

Maintainability
F
1 wk
Test Coverage

File datepicker-d71e97c5117a122fd20879c108bef1c459737ec0c284887efd057839fc5b57bf.js has 1877 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery UI Core 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors

    Function _generateHTML has 169 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _generateHTML: function(inst) {
            var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
                controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
                monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
                selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,

      Function parseDate has 149 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          parseDate: function (format, value, settings) {
              if (format == null || value == null) {
                  throw "Invalid arguments";
              }
      
      

        Function _doKeyDown has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _doKeyDown: function(event) {
                var onSelect, dateStr, sel,
                    inst = $.datepicker._getInst(event.target),
                    handled = true,
                    isRTL = inst.dpDiv.is(".ui-datepicker-rtl");

          Function formatDate has 79 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              formatDate: function (format, date, settings) {
                  if (!date) {
                      return "";
                  }
          
          

            Function Datepicker has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Datepicker() {
                this._curInst = null; // The current instance in use
                this._keyEvent = false; // If the last event was a key event
                this._disabledInputs = []; // List of date picker inputs that have been disabled
                this._datepickerShowing = false; // True if the popup picker is showing , false if not

              Function _showDatepicker has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _showDatepicker: function(input) {
                      input = input.target || input;
                      if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
                          input = $("input", input.parentNode)[0];
                      }

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

                    _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                            secondary, monthNames, monthNamesShort) {
                
                        var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
                            changeMonth = this._get(inst, "changeMonth"),

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

                      _determineDate: function(inst, date, defaultDate) {
                          var offsetNumeric = function(offset) {
                                  var date = new Date();
                                  date.setDate(date.getDate() + offset);
                                  return date;

                    Consider simplifying this complex logical expression.
                    Open

                            if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
                                    $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
                                    !$target.hasClass($.datepicker.markerClassName) &&
                                    !$target.closest("." + $.datepicker._triggerClass).length &&
                                    $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||

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

                          _attachments: function(input, inst) {
                              var showOn, buttonText, buttonImage,
                                  appendText = this._get(inst, "appendText"),
                                  isRTL = this._get(inst, "isRTL");
                      
                      

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

                            _optionDatepicker: function(target, name, value) {
                                var settings, date, minDate, maxDate,
                                    inst = this._getInst(target);
                        
                                if (arguments.length === 2 && typeof name === "string") {

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

                              _possibleChars: function (format) {
                                  var iFormat,
                                      chars = "",
                                      literal = false,
                                      // Check whether a format character is doubled

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

                                _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                                    var id, browserWidth, browserHeight, scrollX, scrollY,
                                        inst = this._dialogInst; // internal instance
                            
                                    if (!inst) {

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

                                  _hideDatepicker: function(input) {
                                      var showAnim, duration, postProcess, onClose,
                                          inst = this._curInst;
                              
                                      if (!inst || (input && inst !== $.data(input, "datepicker"))) {

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

                                    _updateDatepicker: function(inst) {
                                        this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
                                        datepicker_instActive = inst; // for delegate hover events
                                        inst.dpDiv.empty().append(this._generateHTML(inst));
                                        this._attachHandlers(inst);

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

                                              offsetString = function(offset) {
                                                  try {
                                                      return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
                                                          offset, $.datepicker._getFormatConfig(inst));
                                                  }

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

                                        _attachHandlers: function(inst) {
                                            var stepMonths = this._get(inst, "stepMonths"),
                                                id = "#" + inst.id.replace( /\\\\/g, "\\" );
                                            inst.dpDiv.find("[data-handler]").map(function () {
                                                var handler = {

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if ($.datepicker._datepickerShowing) {
                                                  switch (event.keyCode) {
                                                      case 9: $.datepicker._hideDatepicker();
                                                              handled = false;
                                                              break; // hide on tab out

                                        Function _generateMonthYearHeader has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                                                    secondary, monthNames, monthNamesShort) {

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                      if (lookAhead("'")) {
                                                                          output += "'";
                                                                      } else {
                                                                          literal = true;
                                                                      }

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    switch (col) {
                                                                        case 0: calender += " ui-datepicker-group-first";
                                                                            cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
                                                                        case numMonths[1]-1: calender += " ui-datepicker-group-last";
                                                                            cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;

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

                                                  _dialogDatepicker: function(input, date, onSelect, settings, pos) {

                                                There are no issues that match your filters.

                                                Category
                                                Status