mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
84945cabc4
commit
ab2d2eaf94
111 changed files with 4302 additions and 3100 deletions
|
@ -6,6 +6,8 @@ define( [
|
|||
"../selector"
|
||||
], function( jQuery, access, support, rnotwhite ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var boolHook,
|
||||
attrHandle = jQuery.expr.attrHandle;
|
||||
|
||||
|
@ -36,11 +38,10 @@ jQuery.extend( {
|
|||
return jQuery.prop( elem, name, value );
|
||||
}
|
||||
|
||||
// All attributes are lowercase
|
||||
// Attribute hooks are determined by the lowercase version
|
||||
// Grab necessary hook if one is defined
|
||||
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
||||
name = name.toLowerCase();
|
||||
hooks = jQuery.attrHooks[ name ] ||
|
||||
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
||||
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
||||
}
|
||||
|
||||
|
@ -86,21 +87,12 @@ jQuery.extend( {
|
|||
},
|
||||
|
||||
removeAttr: function( elem, value ) {
|
||||
var name, propName,
|
||||
var name,
|
||||
i = 0,
|
||||
attrNames = value && value.match( rnotwhite );
|
||||
|
||||
if ( attrNames && elem.nodeType === 1 ) {
|
||||
while ( ( name = attrNames[ i++ ] ) ) {
|
||||
propName = jQuery.propFix[ name ] || name;
|
||||
|
||||
// Boolean attributes get special treatment (#10870)
|
||||
if ( jQuery.expr.match.bool.test( name ) ) {
|
||||
|
||||
// Set corresponding property to false
|
||||
elem[ propName ] = false;
|
||||
}
|
||||
|
||||
elem.removeAttribute( name );
|
||||
}
|
||||
}
|
||||
|
@ -120,20 +112,23 @@ boolHook = {
|
|||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
||||
var getter = attrHandle[ name ] || jQuery.find.attr;
|
||||
|
||||
attrHandle[ name ] = function( elem, name, isXML ) {
|
||||
var ret, handle;
|
||||
var ret, handle,
|
||||
lowercaseName = name.toLowerCase();
|
||||
|
||||
if ( !isXML ) {
|
||||
|
||||
// Avoid an infinite loop by temporarily removing this function from the getter
|
||||
handle = attrHandle[ name ];
|
||||
attrHandle[ name ] = ret;
|
||||
handle = attrHandle[ lowercaseName ];
|
||||
attrHandle[ lowercaseName ] = ret;
|
||||
ret = getter( elem, name, isXML ) != null ?
|
||||
name.toLowerCase() :
|
||||
lowercaseName :
|
||||
null;
|
||||
attrHandle[ name ] = handle;
|
||||
attrHandle[ lowercaseName ] = handle;
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
|
|
@ -5,6 +5,8 @@ define( [
|
|||
"../core/init"
|
||||
], function( jQuery, rnotwhite, dataPriv ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var rclass = /[\t\r\n\f]/g;
|
||||
|
||||
function getClass( elem ) {
|
||||
|
|
|
@ -5,6 +5,8 @@ define( [
|
|||
"../selector"
|
||||
], function( jQuery, access, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var rfocusable = /^(?:input|select|textarea|button)$/i,
|
||||
rclickable = /^(?:a|area)$/i;
|
||||
|
||||
|
@ -57,9 +59,10 @@ jQuery.extend( {
|
|||
tabIndex: {
|
||||
get: function( elem ) {
|
||||
|
||||
// Support: IE <=9 - 11 only
|
||||
// elem.tabIndex doesn't always return the
|
||||
// correct value when it hasn't been explicitly set
|
||||
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
||||
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
||||
// Use proper attribute retrieval(#12072)
|
||||
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ define( [
|
|||
"../var/support"
|
||||
], function( document, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
( function() {
|
||||
var input = document.createElement( "input" ),
|
||||
select = document.createElement( "select" ),
|
||||
|
@ -10,20 +12,15 @@ define( [
|
|||
|
||||
input.type = "checkbox";
|
||||
|
||||
// Support: iOS<=5.1, Android<=4.2+
|
||||
// Support: Android <=4.3 only
|
||||
// Default value for a checkbox should be "on"
|
||||
support.checkOn = input.value !== "";
|
||||
|
||||
// Support: IE<=11+
|
||||
// Support: IE <=11 only
|
||||
// Must access selectedIndex to make default options select
|
||||
support.optSelected = opt.selected;
|
||||
|
||||
// Support: Android<=2.3
|
||||
// Options inside disabled selects are incorrectly marked as disabled
|
||||
select.disabled = true;
|
||||
support.optDisabled = !opt.disabled;
|
||||
|
||||
// Support: IE<=11+
|
||||
// Support: IE <=11 only
|
||||
// An input loses its value after becoming a radio
|
||||
input = document.createElement( "input" );
|
||||
input.value = "t";
|
||||
|
|
|
@ -4,6 +4,8 @@ define( [
|
|||
"../core/init"
|
||||
], function( jQuery, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var rreturn = /\r/g,
|
||||
rspaces = /[\x20\t\r\n\f]+/g;
|
||||
|
||||
|
@ -85,7 +87,7 @@ jQuery.extend( {
|
|||
return val != null ?
|
||||
val :
|
||||
|
||||
// Support: IE10-11+
|
||||
// Support: IE <=10 - 11 only
|
||||
// option.text throws exceptions (#14686, #14858)
|
||||
// Strip and collapse whitespace
|
||||
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
||||
|
@ -97,7 +99,7 @@ jQuery.extend( {
|
|||
var value, option,
|
||||
options = elem.options,
|
||||
index = elem.selectedIndex,
|
||||
one = elem.type === "select-one" || index < 0,
|
||||
one = elem.type === "select-one",
|
||||
values = one ? null : [],
|
||||
max = one ? index + 1 : options.length,
|
||||
i = index < 0 ?
|
||||
|
@ -108,12 +110,12 @@ jQuery.extend( {
|
|||
for ( ; i < max; i++ ) {
|
||||
option = options[ i ];
|
||||
|
||||
// Support: IE <=9 only
|
||||
// IE8-9 doesn't update selected after form reset (#2551)
|
||||
if ( ( option.selected || i === index ) &&
|
||||
|
||||
// Don't return options that are disabled or in a disabled optgroup
|
||||
( support.optDisabled ?
|
||||
!option.disabled : option.getAttribute( "disabled" ) === null ) &&
|
||||
!option.disabled &&
|
||||
( !option.parentNode.disabled ||
|
||||
!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue