Skip to content

Core: Fix style issues #1496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions ui/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//>>docs: http://api.jqueryui.com/category/ui-core/
//>>demos: http://jqueryui.com/

(function( factory ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
Expand All @@ -24,7 +24,7 @@
// Browser globals
factory( jQuery );
}
}(function( $ ) {
}( function( $ ) {

// $.ui might exist from components with no dependencies, e.g., $.ui.position
$.ui = $.ui || {};
Expand Down Expand Up @@ -75,10 +75,10 @@ $.extend( $.ui, {
$( element ).blur();
}
}
});
} );

// plugins
$.fn.extend({
$.fn.extend( {
scrollParent: function( includeHidden ) {
var position = this.css( "position" ),
excludeStaticParent = position === "absolute",
Expand All @@ -89,31 +89,31 @@ $.fn.extend({
return false;
}
return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
}).eq( 0 );
} ).eq( 0 );

return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
},

uniqueId: (function() {
uniqueId: ( function() {
var uuid = 0;

return function() {
return this.each(function() {
return this.each( function() {
if ( !this.id ) {
this.id = "ui-id-" + ( ++uuid );
}
});
} );
};
})(),
} )(),

removeUniqueId: function() {
return this.each(function() {
return this.each( function() {
if ( /^ui-id-\d+$/.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
});
} );
}
});
} );

// selectors
function focusable( element, isTabIndexNotNaN ) {
Expand All @@ -132,25 +132,25 @@ function focusable( element, isTabIndexNotNaN ) {
!element.disabled :
"a" === nodeName ?
element.href || isTabIndexNotNaN :
isTabIndexNotNaN) &&
isTabIndexNotNaN ) &&
// the element and all of its ancestors must be visible
visible( element );
}

function visible( element ) {
return $.expr.filters.visible( element ) &&
!$( element ).parents().addBack().filter(function() {
!$( element ).parents().addBack().filter( function() {
return $.css( this, "visibility" ) === "hidden";
}).length;
} ).length;
}

$.extend( $.expr[ ":" ], {
data: $.expr.createPseudo ?
$.expr.createPseudo(function( dataName ) {
$.expr.createPseudo( function( dataName ) {
return function( elem ) {
return !!$.data( elem, dataName );
};
}) :
} ) :
// support: jQuery <1.8
function( elem, i, match ) {
return !!$.data( elem, match[ 3 ] );
Expand All @@ -165,7 +165,7 @@ $.extend( $.expr[ ":" ], {
isTabIndexNaN = isNaN( tabIndex );
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
}
});
} );

// support: jQuery 1.7 only
// Not a great way to check versions, but since we only support 1.7+ and only
Expand Down Expand Up @@ -197,7 +197,7 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
if ( margin ) {
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
}
});
} );
return size;
}

Expand All @@ -206,21 +206,21 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
return orig[ "inner" + name ].call( this );
}

return this.each(function() {
return this.each( function() {
$( this ).css( type, reduce( this, size ) + "px" );
});
} );
};

$.fn[ "outer" + name] = function( size, margin ) {
$.fn[ "outer" + name ] = function( size, margin ) {
if ( typeof size !== "number" ) {
return orig[ "outer" + name ].call( this, size );
}

return this.each(function() {
$( this).css( type, reduce( this, size, true, margin ) + "px" );
});
return this.each( function() {
$( this ).css( type, reduce( this, size, true, margin ) + "px" );
} );
};
});
} );

$.fn.addBack = function( selector ) {
return this.add( selector == null ?
Expand All @@ -232,23 +232,23 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );

$.fn.extend({
disableSelection: (function() {
$.fn.extend( {
disableSelection: ( function() {
var eventType = "onselectstart" in document.createElement( "div" ) ?
"selectstart" :
"mousedown";

return function() {
return this.bind( eventType + ".ui-disableSelection", function( event ) {
event.preventDefault();
});
} );
};
})(),
} )(),

enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
}
});
} );

// $.ui.plugin is deprecated. Use $.widget() extensions instead.
$.ui.plugin = {
Expand Down Expand Up @@ -280,4 +280,4 @@ $.ui.plugin = {
}
};

}));
} ) );