1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Use Library Manager to load jQuery, jQuery UI... etc.

This commit is contained in:
lonalore
2016-12-22 15:07:00 +01:00
parent 0e7a45d69d
commit 9172068f4e

View File

@@ -234,23 +234,34 @@ class e_jsmanager
$minified = deftrue('e_DEBUG') == true ? null : 'minified';
if(isset($_SERVER['E_DEV_LOCALJS']) && $_SERVER['E_DEV_LOCALJS'] === 'true' || !deftrue('e_CDN',true)) // Test with Local JS Framework files.
// Use local files.
if(isset($_SERVER['E_DEV_LOCALJS']) && $_SERVER['E_DEV_LOCALJS'] === 'true' || !deftrue('e_CDN',true))
{
if($this->isInAdmin()) // Admin Area.
{
// TODO
}
elseif($this->isInAdmin())
else // Front-End.
{
// TODO
}
}
else // Use CDN files.
{
if($this->isInAdmin()) // Admin Area.
{
e107::library('load', 'cdn.jquery', $minified);
// jQuery Once is used in e107.behaviors.
e107::library('load', 'cdn.jquery.once', $minified);
e107::library('load', 'cdn.jquery.ui', $minified);
}
else
else // Front-End.
{
e107::library('load', 'cdn.jquery', $minified);
// jQuery Once is used in e107.behaviors.
e107::library('load', 'cdn.jquery.once', $minified);
}
}
$customJqueryUrls = e107::getPref('library-jquery-urls');
$this->_cache_enabled = e107::getPref('jscsscachestatus',false);