mirror of
https://github.com/e107inc/e107.git
synced 2025-01-16 20:28:28 +01:00
Closes #4567 - jQuery 3 is now the default for the frontend of e107.
To use v2, add the following to e107_config.php: define('e_DEBUG_JQUERY', 2);
This commit is contained in:
parent
94c5761893
commit
a8ec6435e5
@ -239,16 +239,16 @@ class e_jsmanager
|
||||
}
|
||||
else // Front-End.
|
||||
{
|
||||
if(defset('e_DEBUG_JQUERY') === 3)
|
||||
{
|
||||
e107::library('load', 'cdn.jquery3');
|
||||
}
|
||||
else
|
||||
if(defset('e_DEBUG_JQUERY') === 2)
|
||||
{
|
||||
e107::library('load', 'jquery');
|
||||
// jQuery Once is used in e107.behaviors.
|
||||
e107::library('load', 'jquery.once');
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::library('load', 'jquery3');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -290,6 +290,35 @@ class core_library
|
||||
|
||||
|
||||
// ----------------- jQuery 3 (frontend only) --------------//
|
||||
|
||||
|
||||
// jQuery (local).
|
||||
$libraries['jquery3'] = array(
|
||||
'name' => 'jQuery 3 (local)',
|
||||
'vendor_url' => 'https://jquery.com/',
|
||||
'version_arguments' => array(
|
||||
'file' => 'jquery.min.js',
|
||||
'pattern' => '/v(\d\.\d\.\d+)/',
|
||||
'lines' => 5,
|
||||
),
|
||||
'files' => array(
|
||||
'js' => array(
|
||||
'jquery.min.js' => array(
|
||||
'zone' => 1,
|
||||
'type' => 'url',
|
||||
),
|
||||
),
|
||||
),
|
||||
'variants' => array(
|
||||
),
|
||||
'library_path' => '{e_WEB}lib/jquery',
|
||||
'path' => '3',
|
||||
'version' => '3.6.0',
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
// https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js
|
||||
https://cdn.jsdelivr.net/jquery/npm/jquery@3.6.0/dist/jquery.min.js
|
||||
$libraries['cdn.jquery3'] = array(
|
||||
@ -309,17 +338,6 @@ class core_library
|
||||
),
|
||||
),
|
||||
'variants' => array(
|
||||
// 'unminified' version for debugging.
|
||||
'dev' => array(
|
||||
'files' => array(
|
||||
'js' => array(
|
||||
'jquery.js' => array(
|
||||
'zone' => 1,
|
||||
'type' => 'url',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Override library path to CDN.
|
||||
'library_path' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery',
|
||||
@ -328,6 +346,10 @@ class core_library
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ----------------- Bootstrap 5 ---------------------------//
|
||||
|
||||
// Bootstrap (CDN).
|
||||
|
2
e107_web/lib/jquery/3/jquery.min.js
vendored
Normal file
2
e107_web/lib/jquery/3/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user