Merge pull request #1987 from open-sausages/pulls/4.0/fix-icon-urls

Fix icon urls
This commit is contained in:
Loz Calver 2017-10-10 10:25:18 +01:00 committed by GitHub
commit 65db25e3f7

View File

@ -24,7 +24,7 @@ use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Environment;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleLoader;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Forms\DateField;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldGroup;
@ -173,8 +173,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
Requirements::css('silverstripe/cms: client/dist/styles/bundle.css');
Requirements::customCSS($this->generatePageIconsCss(), self::PAGE_ICONS_ID);
$module = ModuleLoader::getModule('silverstripe/cms');
Requirements::add_i18n_javascript($module->getRelativeResourcePath('client/lang'), false, true);
Requirements::add_i18n_javascript('silverstripe/cms: client/lang', false, true);
CMSBatchActionHandler::register('restore', CMSBatchAction_Restore::class);
CMSBatchActionHandler::register('archive', CMSBatchAction_Archive::class);
@ -1069,7 +1068,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'AddAction' => $singularName,
'Description' => $description,
// TODO Sprite support
'IconURL' => $instance->config()->get('icon'),
'IconURL' => ModuleResourceLoader::resourceURL($instance->config()->get('icon')),
'Title' => $singularName,
)));
}