Showing 50 of 103 total issues
Function _formatTime
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_formatTime: function(time, format, ampm) {
if (ampm == undefined) ampm = this._defaults.ampm;
time = time || { hour: this.hour, minute: this.minute, second: this.second, ampm: this.ampm };
var tmptime = format || this._defaults.timeFormat.toString();
Function quit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.quit = function(kwargs) {
// make sure whatever is open is now closed
$.modal.close();
if (kwargs && kwargs.timeout) {
//MAKE IT SO WHEN IT TIMES OUT IT CHECKS WHAT ROUND IT IS ON AND DOES THE RIghT ThinG
Function _parseTime
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_parseTime: function(timeString, withDate) {
var regstr = this._defaults.timeFormat.toString()
.replace(/h{1,2}/ig, '(\\d?\\d)')
.replace(/m{1,2}/ig, '(\\d?\\d)')
.replace(/s{1,2}/ig, '(\\d?\\d)')
Function fancybox
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.fancybox = function(options) {
if (!$(this).length) {
return this;
}
Avoid deeply nested control flow statements. Open
Open
if (h == 0) tmph = 12 +'a';
else if (h < 12) tmph += 'a';
else tmph += 'p';
Avoid deeply nested control flow statements. Open
Open
if (aph == 12) h = 0;
else h = aph;
Avoid deeply nested control flow statements. Open
Open
} else if (aph == 12) h = 12;
else h = aph + 12;
Consider simplifying this complex logical expression. Open
Open
if (force || this.hour != hour || this.minute != minute || this.second != second || (this.ampm.length > 0 && this.ampm != ampm))
hasChanged = true;
Consider simplifying this complex logical expression. Open
Open
if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax)) {
hour = defaults.hourMin;
minute = defaults.minuteMin;
second = defaults.secondMin;
}
Consider simplifying this complex logical expression. Open
Open
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
e.preventDefault();
$.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
}