mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1956 from open-sausages/pulls/4.0/unique-icons-css
BUG Prevent icons CSS being included twice
This commit is contained in:
commit
06dcc42fc0
@ -80,6 +80,10 @@ use Translatable;
|
||||
*/
|
||||
class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionProvider
|
||||
{
|
||||
/**
|
||||
* Unique ID for page icons CSS block
|
||||
*/
|
||||
const PAGE_ICONS_ID = 'PageIcons';
|
||||
|
||||
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/SilverStripeNavigator.js');
|
||||
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');
|
||||
Requirements::add_i18n_javascript($module->getRelativeResourcePath('client/lang'), false, true);
|
||||
|
@ -17,7 +17,7 @@ class LeftAndMainPageIconsExtension extends Extension
|
||||
|
||||
public function init()
|
||||
{
|
||||
Requirements::customCSS($this->generatePageIconsCss());
|
||||
Requirements::customCSS($this->generatePageIconsCss(), CMSMain::PAGE_ICONS_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user