Showing 14 of 26 total issues
File jquery.validate.js
has 990 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* jQuery Validation Plugin 1.11.0pre
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation
File bootstrap-datepicker.js
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* =========================================================
* bootstrap-datepicker.js
* http://www.eyecon.ro/bootstrap-datepicker
* =========================================================
* Copyright 2012 Stefan Petre
Function click
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
click: function(e) {
e.stopPropagation();
e.preventDefault();
var target = $(e.target).closest('span, td, th');
if (target.length === 1) {
Function fill
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fill: function() {
var d = new Date(this.viewDate),
year = d.getFullYear(),
month = d.getMonth(),
currentDate = this.date.valueOf();
Function Datepicker
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
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')
Function validate
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate: function( options ) {
// if nothing is selected, return nothing; can't chain anyway
if ( !this.length ) {
if ( options && options.debug && window.console ) {
Function normalizeRules
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
normalizeRules: function( rules, element ) {
// handle dependency check
$.each(rules, function( prop, val ) {
// ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
Function remote
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remote: function( value, element, param ) {
if ( this.optional(element) ) {
return "dependency-mismatch";
}
Function init
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function() {
this.labelContainer = $(this.settings.errorLabelContainer);
this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
this.submitted = {};
Function rules
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
rules: function( command, argument ) {
var element = this[0];
if ( command ) {
var settings = $.data(element.form, "validator").settings;
Function check
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
check: function( element ) {
element = this.validationTargetFor( this.clean( element ) );
var rules = $(element).rules();
var dependencyMismatch = false;
Function parseDate
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function(date, format) {
var parts = date.split(format.separator),
date = new Date(),
val;
date.setHours(0);
Function showLabel
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showLabel: function( element, message ) {
var label = this.errorsFor( element );
if ( label.length ) {
// refresh error/success class
label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
Consider simplifying this complex logical expression. Open
Open
if (element.data('remote') == true) {
e.preventDefault(); e.stopped = true;
JSAdapter.sendRequest(element, {
verb: element.data('method') || element.attr('method') || 'post',
url: element.attr('action'),