Showing 135 of 334 total issues
Function _create
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function () {
var selectees,
that = this;
this.element.addClass("ui-selectable");
Function _createWidget
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createWidget: function (options, element) {
element = $(element || this.defaultElement || this)[0];
this.element = $(element);
this.uuid = uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
Function daySelectionMousedown
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function daySelectionMousedown(ev) { // not really a generic manager method, oh well
var cellToDate = t.cellToDate;
var getIsCellAllDay = t.getIsCellAllDay;
var hoverListener = t.getHoverListener();
var reportDayClick = t.reportDayClick; // this is hacky and sort of weird
Function getDimensions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDimensions(elem) {
var raw = elem[0];
if (raw.nodeType === 9) {
return {
width: elem.width(),
Function left
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
left: function (position, data) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
outerWidth = within.width,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
Function top
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
top: function (position, data) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top - data.collisionPosition.marginTop,
Function _updateVirtualBoundaries
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_updateVirtualBoundaries: function (forceAspectRatio) {
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
o = this.options;
b = {
Function stop
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function (event) {
var that = $(this).data("ui-resizable"),
o = that.options,
pr = that._proportionallyResizeElements,
ista = pr.length && (/textarea/i).test(pr[0].nodeName),
Function _renderDayEvents
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _renderDayEvents(events, doAppend, doRowHeights) {
// where the DOM nodes will eventually end up
var finalContainer = getDaySegmentContainer();
Function _mouseStop
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStop: function (event) {
this.resizing = false;
var pr, ista, soffseth, soffsetw, s, left, top,
o = this.options, that = this;
Function compileSlotSegs
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function compileSlotSegs(events) {
var colCnt = getColCnt(),
minMinute = getMinMinute(),
maxMinute = getMaxMinute(),
d,
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function render(date, delta) {
if (delta) {
addMonths(date, delta);
date.setDate(1);
Function set
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set: function (elem, value) {
var parsed, curElem,
backgroundColor = "";
if (value !== "transparent" && ( jQuery.type(value) !== "string" || ( parsed = stringParse(value) ) )) {
Consider simplifying this complex logical expression. Open
Open
if (request.path != "/users/sign_in" &&
request.path != "/users/sign_up" &&
request.path != "/users/password/new" &&
request.path != "/users/password/edit" &&
request.path != "/users/confirmation" &&
Consider simplifying this complex logical expression. Open
Open
if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () {
if (that._trigger("stop", event) !== false) {
that._clear();
}
Consider simplifying this complex logical expression. Open
Open
if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), {snapItem: inst.snapElements[i].item})));
}
Consider simplifying this complex logical expression. Open
Open
if (this.options.tolerance === "pointer" ||
this.options.forcePointerForContainers ||
(this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
) {
return isOverElement;
Function eventDrop
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function eventDrop(e, event, dayDelta, minuteDelta, allDay, ev, ui) {
Avoid deeply nested control flow statements. Open
Open
else if (c == '{') {
date = date2;
otherDate = date1;
}
else if (c == '}') {
Function eventResize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function eventResize(e, event, dayDelta, minuteDelta, ev, ui) {