Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions libraries/cms/html/behavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function core()
}

HTMLHelper::_('form.csrf');
Factory::getContainer()->get('webasset')->enableAsset('core');
Factory::getDocument()->getWebAssetManager()->enableAsset('core');

// Add core and base uri paths so javascript scripts can use them.
Factory::getDocument()->addScriptOptions(
Expand Down Expand Up @@ -140,7 +140,7 @@ public static function formvalidator()
Text::script('JLIB_FORM_FIELD_REQUIRED_CHECK');
Text::script('JLIB_FORM_FIELD_INVALID_VALUE');

Factory::getContainer()->get('webasset')->enableAsset('fields.validate');
Factory::getDocument()->getWebAssetManager()->enableAsset('fields.validate');

static::$loaded[__METHOD__] = true;
}
Expand Down Expand Up @@ -169,7 +169,7 @@ public static function switcher()
*/
public static function combobox()
{
Factory::getContainer()->get('webasset')->enableAsset('awesomplete');
Factory::getDocument()->getWebAssetManager()->enableAsset('awesomplete');
}

/**
Expand Down Expand Up @@ -247,7 +247,7 @@ public static function multiselect($id = 'adminForm')
return;
}

Factory::getContainer()->get('webasset')->enableAsset('multiselect');
Factory::getDocument()->getWebAssetManager()->enableAsset('multiselect');

// Pass the required options to the javascript
Factory::getDocument()->addScriptOptions('js-multiselect', ['formName' => $id]);
Expand Down Expand Up @@ -426,7 +426,7 @@ public static function keepalive()
// Add keepalive script options.
Factory::getDocument()->addScriptOptions('system.keepalive', array('interval' => $refreshTime * 1000, 'uri' => Route::_($uri)));

Factory::getContainer()->get('webasset')->enableAsset('keepalive');
Factory::getDocument()->getWebAssetManager()->enableAsset('keepalive');

static::$loaded[__METHOD__] = true;

Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/html/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static function framework($debug = null)
$debug = (isset($debug) && $debug != JDEBUG) ? $debug : JDEBUG;

// Load the needed scripts
Factory::getContainer()->get('webasset')
Factory::getDocument()->getWebAssetManager()
->enableAsset('core')
->enableAsset('bootstrap.js.bundle');
HTMLHelper::_('script', 'legacy/bootstrap-init.min.js', array('version' => 'auto', 'relative' => true, 'detectDebug' => $debug));
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Service/Provider/WebAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function (Container $container)
$registry->setDispatcher($container->get('Joomla\Event\DispatcherInterface'));

// Add Core registry files
$registry->addRegistryFile('media/system/joomla.asset.json')
->addRegistryFile('media/vendor/joomla.asset.json')
$registry->addRegistryFile('media/vendor/joomla.asset.json')
->addRegistryFile('media/system/joomla.asset.json')
->addRegistryFile('media/legacy/joomla.asset.json');

return $registry;
Expand Down
11 changes: 1 addition & 10 deletions libraries/src/WebAsset/WebAssetItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,14 @@ class WebAssetItem
*/
const ASSET_STATE_ACTIVE = 1;

/**
* Mark active asset. Enabled WITH all dependency
*
* @var integer
*
* @since __DEPLOY_VERSION__
*/
const ASSET_STATE_RESOLVED = 2;

/**
* Mark active asset that is enabled as dependency to another asset
*
* @var integer
*
* @since __DEPLOY_VERSION__
*/
const ASSET_STATE_DEPENDANCY = 3;
const ASSET_STATE_DEPENDANCY = 2;

/**
* Asset state
Expand Down
Loading