yippie-io/iUPB

View on GitHub
app/assets/javascripts/libs/bootstrap-datepicker.js

Summary

Maintainability
C
1 day
Test Coverage

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

/* =========================================================
 * bootstrap-datepicker.js 
 * http://www.eyecon.ro/bootstrap-datepicker
 * =========================================================
 * Copyright 2012 Stefan Petre
Severity: Minor
Found in app/assets/javascripts/libs/bootstrap-datepicker.js - About 4 hrs to fix

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

            fill: function() {
                var d = new Date(this.viewDate),
                    year = d.getFullYear(),
                    month = d.getMonth(),
                    currentDate = this.date.valueOf();
    Severity: Major
    Found in app/assets/javascripts/libs/bootstrap-datepicker.js - About 2 hrs to fix

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

              click: function(e) {
                  e.stopPropagation();
                  e.preventDefault();
                  var target = $(e.target).closest('span, td, th');
                  if (target.length == 1) {
      Severity: Major
      Found in app/assets/javascripts/libs/bootstrap-datepicker.js - About 2 hrs to fix

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

            var Datepicker = function(element, options){
                this.element = $(element);
                this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
                this.picker = $(DPGlobal.template)
                                    .appendTo('body')
        Severity: Minor
        Found in app/assets/javascripts/libs/bootstrap-datepicker.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status