mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUG Prevent icons CSS being included twice
This commit is contained in:
parent
46e2b19337
commit
49fd3391fe
@ -80,6 +80,10 @@ use Translatable;
|
|||||||
*/
|
*/
|
||||||
class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionProvider
|
class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionProvider
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Unique ID for page icons CSS block
|
||||||
|
*/
|
||||||
|
const PAGE_ICONS_ID = 'PageIcons';
|
||||||
|
|
||||||
private static $url_segment = 'pages';
|
private static $url_segment = 'pages';
|
||||||
|
|
||||||
@ -167,7 +171,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
Requirements::javascript('silverstripe/cms: client/dist/js/bundle.js');
|
Requirements::javascript('silverstripe/cms: client/dist/js/bundle.js');
|
||||||
Requirements::javascript('silverstripe/cms: client/dist/js/SilverStripeNavigator.js');
|
Requirements::javascript('silverstripe/cms: client/dist/js/SilverStripeNavigator.js');
|
||||||
Requirements::css('silverstripe/cms: client/dist/styles/bundle.css');
|
Requirements::css('silverstripe/cms: client/dist/styles/bundle.css');
|
||||||
Requirements::customCSS($this->generatePageIconsCss());
|
Requirements::customCSS($this->generatePageIconsCss(), self::PAGE_ICONS_ID);
|
||||||
|
|
||||||
$module = ModuleLoader::getModule('silverstripe/cms');
|
$module = ModuleLoader::getModule('silverstripe/cms');
|
||||||
Requirements::add_i18n_javascript($module->getRelativeResourcePath('client/lang'), false, true);
|
Requirements::add_i18n_javascript($module->getRelativeResourcePath('client/lang'), false, true);
|
||||||
|
@ -17,7 +17,7 @@ class LeftAndMainPageIconsExtension extends Extension
|
|||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
Requirements::customCSS($this->generatePageIconsCss());
|
Requirements::customCSS($this->generatePageIconsCss(), CMSMain::PAGE_ICONS_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user