mirror of
https://github.com/django/django.git
synced 2025-02-06 15:35:37 +00:00
[4.2.x] Fixed #34395 -- Updated admin's jQuery to 3.6.4.
Backport of 18473004afd82a616ba6c9ac22f476347fde4846 from main
This commit is contained in:
parent
6937c92169
commit
87a55e0b51
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* jQuery JavaScript Library v3.6.3
|
* jQuery JavaScript Library v3.6.4
|
||||||
* https://jquery.com/
|
* https://jquery.com/
|
||||||
*
|
*
|
||||||
* Includes Sizzle.js
|
* Includes Sizzle.js
|
||||||
@ -9,7 +9,7 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://jquery.org/license
|
* https://jquery.org/license
|
||||||
*
|
*
|
||||||
* Date: 2022-12-20T21:28Z
|
* Date: 2023-03-08T15:28Z
|
||||||
*/
|
*/
|
||||||
( function( global, factory ) {
|
( function( global, factory ) {
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ function toType( obj ) {
|
|||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
version = "3.6.3",
|
version = "3.6.4",
|
||||||
|
|
||||||
// Define a local copy of jQuery
|
// Define a local copy of jQuery
|
||||||
jQuery = function( selector, context ) {
|
jQuery = function( selector, context ) {
|
||||||
@ -522,14 +522,14 @@ function isArrayLike( obj ) {
|
|||||||
}
|
}
|
||||||
var Sizzle =
|
var Sizzle =
|
||||||
/*!
|
/*!
|
||||||
* Sizzle CSS Selector Engine v2.3.9
|
* Sizzle CSS Selector Engine v2.3.10
|
||||||
* https://sizzlejs.com/
|
* https://sizzlejs.com/
|
||||||
*
|
*
|
||||||
* Copyright JS Foundation and other contributors
|
* Copyright JS Foundation and other contributors
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://js.foundation/
|
* https://js.foundation/
|
||||||
*
|
*
|
||||||
* Date: 2022-12-19
|
* Date: 2023-02-14
|
||||||
*/
|
*/
|
||||||
( function( window ) {
|
( function( window ) {
|
||||||
var i,
|
var i,
|
||||||
@ -633,7 +633,7 @@ var i,
|
|||||||
whitespace + "+$", "g" ),
|
whitespace + "+$", "g" ),
|
||||||
|
|
||||||
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
||||||
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
|
rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
|
||||||
"*" ),
|
"*" ),
|
||||||
rdescend = new RegExp( whitespace + "|>" ),
|
rdescend = new RegExp( whitespace + "|>" ),
|
||||||
|
|
||||||
@ -850,7 +850,7 @@ function Sizzle( selector, context, results, seed ) {
|
|||||||
// as such selectors are not recognized by querySelectorAll.
|
// as such selectors are not recognized by querySelectorAll.
|
||||||
// Thanks to Andrew Dupont for this technique.
|
// Thanks to Andrew Dupont for this technique.
|
||||||
if ( nodeType === 1 &&
|
if ( nodeType === 1 &&
|
||||||
( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
|
( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
|
||||||
|
|
||||||
// Expand context for sibling selectors
|
// Expand context for sibling selectors
|
||||||
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
||||||
@ -879,27 +879,6 @@ function Sizzle( selector, context, results, seed ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// `qSA` may not throw for unrecognized parts using forgiving parsing:
|
|
||||||
// https://drafts.csswg.org/selectors/#forgiving-selector
|
|
||||||
// like the `:has()` pseudo-class:
|
|
||||||
// https://drafts.csswg.org/selectors/#relational
|
|
||||||
// `CSS.supports` is still expected to return `false` then:
|
|
||||||
// https://drafts.csswg.org/css-conditional-4/#typedef-supports-selector-fn
|
|
||||||
// https://drafts.csswg.org/css-conditional-4/#dfn-support-selector
|
|
||||||
if ( support.cssSupportsSelector &&
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
!CSS.supports( "selector(:is(" + newSelector + "))" ) ) {
|
|
||||||
|
|
||||||
// Support: IE 11+
|
|
||||||
// Throw to get to the same code path as an error directly in qSA.
|
|
||||||
// Note: once we only support browser supporting
|
|
||||||
// `CSS.supports('selector(...)')`, we can most likely drop
|
|
||||||
// the `try-catch`. IE doesn't implement the API.
|
|
||||||
throw new Error();
|
|
||||||
}
|
|
||||||
|
|
||||||
push.apply( results,
|
push.apply( results,
|
||||||
newContext.querySelectorAll( newSelector )
|
newContext.querySelectorAll( newSelector )
|
||||||
);
|
);
|
||||||
@ -1195,29 +1174,22 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
!el.querySelectorAll( ":scope fieldset div" ).length;
|
!el.querySelectorAll( ":scope fieldset div" ).length;
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Support: Chrome 105+, Firefox 104+, Safari 15.4+
|
// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
|
||||||
// Make sure forgiving mode is not used in `CSS.supports( "selector(...)" )`.
|
// Make sure the the `:has()` argument is parsed unforgivingly.
|
||||||
//
|
// We include `*` in the test to detect buggy implementations that are
|
||||||
// `:is()` uses a forgiving selector list as an argument and is widely
|
// _selectively_ forgiving (specifically when the list includes at least
|
||||||
// implemented, so it's a good one to test against.
|
// one valid selector).
|
||||||
support.cssSupportsSelector = assert( function() {
|
// Note that we treat complete lack of support for `:has()` as if it were
|
||||||
/* eslint-disable no-undef */
|
// spec-compliant support, which is fine because use of `:has()` in such
|
||||||
|
// environments will fail in the qSA path and fall back to jQuery traversal
|
||||||
return CSS.supports( "selector(*)" ) &&
|
// anyway.
|
||||||
|
support.cssHas = assert( function() {
|
||||||
// Support: Firefox 78-81 only
|
try {
|
||||||
// In old Firefox, `:is()` didn't use forgiving parsing. In that case,
|
document.querySelector( ":has(*,:jqfake)" );
|
||||||
// fail this test as there's no selector to test against that.
|
return false;
|
||||||
// `CSS.supports` uses unforgiving parsing
|
} catch ( e ) {
|
||||||
document.querySelectorAll( ":is(:jqfake)" ) &&
|
return true;
|
||||||
|
}
|
||||||
// `*` is needed as Safari & newer Chrome implemented something in between
|
|
||||||
// for `:has()` - it throws in `qSA` if it only contains an unsupported
|
|
||||||
// argument but multiple ones, one of which is supported, are fine.
|
|
||||||
// We want to play safe in case `:is()` gets the same treatment.
|
|
||||||
!CSS.supports( "selector(:is(*,:jqfake))" );
|
|
||||||
|
|
||||||
/* eslint-enable */
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
/* Attributes
|
/* Attributes
|
||||||
@ -1486,14 +1458,14 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !support.cssSupportsSelector ) {
|
if ( !support.cssHas ) {
|
||||||
|
|
||||||
// Support: Chrome 105+, Safari 15.4+
|
// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
|
||||||
// `:has()` uses a forgiving selector list as an argument so our regular
|
// Our regular `try-catch` mechanism fails to detect natively-unsupported
|
||||||
// `try-catch` mechanism fails to catch `:has()` with arguments not supported
|
// pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
|
||||||
// natively like `:has(:contains("Foo"))`. Where supported & spec-compliant,
|
// in browsers that parse the `:has()` argument as a forgiving selector list.
|
||||||
// we now use `CSS.supports("selector(:is(SELECTOR_TO_BE_TESTED))")`, but
|
// https://drafts.csswg.org/selectors/#relational now requires the argument
|
||||||
// outside that we mark `:has` as buggy.
|
// to be parsed unforgivingly, but browsers have not yet fully adjusted.
|
||||||
rbuggyQSA.push( ":has" );
|
rbuggyQSA.push( ":has" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2406,7 +2378,7 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|||||||
matched = false;
|
matched = false;
|
||||||
|
|
||||||
// Combinators
|
// Combinators
|
||||||
if ( ( match = rcombinators.exec( soFar ) ) ) {
|
if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
|
||||||
matched = match.shift();
|
matched = match.shift();
|
||||||
tokens.push( {
|
tokens.push( {
|
||||||
value: matched,
|
value: matched,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -2112,7 +2112,7 @@ jQuery
|
|||||||
Django admin JavaScript makes use of the `jQuery`_ library.
|
Django admin JavaScript makes use of the `jQuery`_ library.
|
||||||
|
|
||||||
To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
|
To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
|
||||||
(version 3.6.3) is namespaced as ``django.jQuery``. If you want to use jQuery
|
(version 3.6.4) is namespaced as ``django.jQuery``. If you want to use jQuery
|
||||||
in your own admin JavaScript without including a second copy, you can use the
|
in your own admin JavaScript without including a second copy, you can use the
|
||||||
``django.jQuery`` object on changelist and add/edit views. Also, your own admin
|
``django.jQuery`` object on changelist and add/edit views. Also, your own admin
|
||||||
forms or widgets depending on ``django.jQuery`` must specify
|
forms or widgets depending on ``django.jQuery`` must specify
|
||||||
@ -2121,7 +2121,7 @@ forms or widgets depending on ``django.jQuery`` must specify
|
|||||||
|
|
||||||
.. versionchanged:: 4.2
|
.. versionchanged:: 4.2
|
||||||
|
|
||||||
jQuery was upgraded from 3.6.0 to 3.6.3.
|
jQuery was upgraded from 3.6.0 to 3.6.4.
|
||||||
|
|
||||||
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
||||||
to add jQuery to your ``ModelAdmin``’s list of media resources unless you have
|
to add jQuery to your ``ModelAdmin``’s list of media resources unless you have
|
||||||
|
@ -136,7 +136,7 @@ Minor features
|
|||||||
* :attr:`.ModelAdmin.list_editable` now uses atomic transactions when making
|
* :attr:`.ModelAdmin.list_editable` now uses atomic transactions when making
|
||||||
edits.
|
edits.
|
||||||
|
|
||||||
* jQuery is upgraded from version 3.6.0 to 3.6.3.
|
* jQuery is upgraded from version 3.6.0 to 3.6.4.
|
||||||
|
|
||||||
:mod:`django.contrib.auth`
|
:mod:`django.contrib.auth`
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Loading…
x
Reference in New Issue
Block a user