Showing 46 of 129 total issues
File jquery-ui.js
has 3302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! jQuery UI - v1.13.1 - 2022-02-05
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, keycode.js, scroll-parent.js, unique-id.js, widgets/sortable.js, widgets/autocomplete.js, widgets/menu.js, widgets/mouse.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
Function _create
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
// Some browsers only repeat keydown events, not keypress events,
// so we use the suppressKeyPress flag to determine if we've already
// handled the keydown event. #7269
Function position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
Function _mouseStart
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function( event, overrideHandle, noActivation ) {
var i, body,
o = this.options;
Function _clear
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_clear: function( event, noPropagation ) {
this.reverting = false;
// We delay all events that have to be triggered to after the point where the placeholder
Function _contactContainers
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_contactContainers: function( event ) {
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
floating, axis,
innermostContainer = null,
innermostIndex = null;
Function widget
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var existingConstructor, constructor, basePrototype;
// ProxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
Function _generatePosition
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_generatePosition: function( event ) {
var top, left,
o = this.options,
pageX = event.pageX,
Function _keydown
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_keydown: function( event ) {
var match, prev, character, skip,
preventDefault = true;
switch ( event.keyCode ) {
Function _create
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.activeMenu = this.element;
// Flag used to prevent firing of the click handler
// as the event bubbles up through nested menus
Function _mouseDrag
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function( event ) {
var i, item, itemElement, intersection,
o = this.options;
//Compute the helpers position
Function keydown
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
keydown: function( event ) {
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
suppressInput = true;
suppressKeyPressRepeat = true;
Function bridge
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call( arguments, 1 );
Function _createPlaceholder
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createPlaceholder: function( that ) {
that = that || this;
var className, nodeName,
o = that.options;
Function name
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call( arguments, 1 );
var returnValue = this;
Function _classes
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_classes: function( options ) {
var full = [];
var that = this;
options = $.extend( {
Function refresh
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
refresh: function() {
var menus, items, newSubmenus, newItems, newWrappers,
that = this,
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus );
Function _mouseDown
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDown: function( event ) {
// don't let more than one widget handle mouseStart
if ( mouseHandled ) {
return;
Consider simplifying this complex logical expression. Open
Open
if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
ce = $( o.containment )[ 0 ];
co = $( o.containment ).offset();
over = ( $( ce ).css( "overflow" ) !== "hidden" );
Consider simplifying this complex logical expression. Open
Open
if ( this.floating && horizontalDirection ) {
return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
( horizontalDirection === "left" && !isOverRightHalf ) );
} else {
return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||