Showing 48 of 101 total issues
Function fcbkcomplete
has 551 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.fcbkcomplete = function(opt) {
return this.queue(function() {
function init() {
createFCBK();
addInput(0)
File jquery-ui-timepicker-addon.js
has 1028 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* jQuery timepicker addon
* By: Trent Richardson [http://trentrichardson.com]
* Version 0.9.9
* Last Modified: 02/05/2012
Function _injectTimePicker
has 268 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_injectTimePicker: function() {
var $dp = this.inst.dpDiv,
o = this._defaults,
tp_inst = this,
// Added by Peter Medeiros:
File fcbk.js
has 555 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/** FCBKcomplete v2.8.9.3 is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */
(function($, undefined) {
$.fn.fcbkcomplete = function(opt) {
return this.queue(function() {
function init() {
Method format
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
Open
def format(str, section)
@prefix = ''
@suffix = ''
mods = section[:modifiers]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _limitMinMaxDateTime
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_limitMinMaxDateTime: function(dp_inst, adjustSliders){
var o = this._defaults,
dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
if(!this._defaults.showTimepicker) return; // No time so nothing to check here
Function addInput
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addInput(focusme) {
var li = $('<li class="bit-input" id="' + elemid + '_annoninput">');
var input = $('<input type="text" class="maininput" size="' + options.input_min_size + '" autocomplete="off">');
if (options.input_tabindex > 0) input.attr("tabindex", options.input_tabindex);
if (options.input_name != "") input.attr("name", options.input_name);
Function _newInst
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_newInst: function($input, o) {
var tp_inst = new Timepicker(),
inlineSettings = {};
for (var attrName in this._defaults) {
Method xls_migrate
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
def xls_migrate
begin
@xls = Spreadsheet.open @schema_from[:url]
# TODO: make others workbook accessible by configuration
sheet = @xls.worksheet 0
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _parseTime
has 64 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 Timepicker
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Timepicker() {
this.regional = []; // Available regional settings, indexed by language code
this.regional[''] = { // Default regional settings
currentText: 'Now',
closeText: 'Done',
Method format
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def format(str, section)
@prefix = ''
@suffix = ''
mods = section[:modifiers]
Function elPrepare
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function elPrepare() {
name = element.attr("name");
if (options.bricket) {
if (typeof(name) != 'undefined' && name.indexOf("[]") == -1) {
name = name + "[]"
Function _optionDatepicker
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.datepicker._optionDatepicker = function(target, name, value) {
var inst = this._getInst(target),
tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
var min,max,onselect;
Function addMembers
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addMembers(etext, data) {
feed.html('');
if (!options.cache && data != null) {
cache.clear()
}
Function bindEvents
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindEvents() {
var maininput = $("#" + elemid + "_annoninput").children(".maininput");
bindFeedEvent();
feed.children("li").unbind("mousedown").mousedown(function() {
var option = $(this);
Function formatTime
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.datepicker.formatTime = function(format, time, options) {
options = options || {};
options = $.extend($.timepicker._defaults, options);
time = $.extend({hour:0, minute:0, second:0, millisec:0, timezone:'+0000'}, time);
Function _onTimeChange
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onTimeChange: function() {
var hour = (this.hour_slider) ? this.hour_slider.slider('value') : false,
minute = (this.minute_slider) ? this.minute_slider.slider('value') : false,
second = (this.second_slider) ? this.second_slider.slider('value') : false,
millisec = (this.millisec_slider) ? this.millisec_slider.slider('value') : false,
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) || (millisec < defaults.millisecMin || millisec > defaults.millisecMax)) {
hour = defaults.hourMin;
minute = defaults.minuteMin;
second = defaults.secondMin;
millisec = defaults.millisecMin;
Function createFCBK
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createFCBK() {
holder = $('<ul class="holder"></ul>').width(options.width);
if (options.attachto) {
if (typeof(options.attachto) == "object") {
options.attachto.append(holder)