FIX Update Requirements references to new build paths

This commit is contained in:
Raissa North 2018-01-29 11:50:39 +13:00
parent 7ef456a1e6
commit bf13d522a3
6 changed files with 12 additions and 12 deletions

View File

@ -21,7 +21,10 @@
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"expose": [
"client/dist"
]
},
"autoload": {
"psr-4": {

View File

@ -159,7 +159,7 @@ class GridFieldAddByDBField implements GridField_ActionProvider, GridField_HTMLP
*/
public function getHTMLFragments($gridField)
{
Requirements::javascript(ModuleLoader::getModule('silverstripe/blog')->getRelativeResourcePath('js/gridfieldaddbydbfield.js'));
Requirements::javascript('silverstripe/blog:client/dist/js/main.bundle.js');
/**
* @var DataList $dataList

View File

@ -21,7 +21,7 @@ class GridFieldBlogPostState extends GridFieldSiteTreeState
public function getColumnContent($gridField, $record, $columnName)
{
if ($columnName == 'State') {
Requirements::css('silverstripe/blog:css/cms.css');
Requirements::css('silverstripe/blog:client/dist/styles/main.css');
if ($record instanceof BlogPost) {
$modifiedLabel = '';

View File

@ -189,9 +189,8 @@ class Blog extends Page implements PermissionProvider
*/
protected function addCMSRequirements()
{
$module = ModuleLoader::getModule('silverstripe/blog');
Requirements::css($module->getRelativeResourcePath('css/cms.css'));
Requirements::javascript($module->getRelativeResourcePath('js/cms.js'));
Requirements::css('silverstripe/blog:client/dist/styles/main.css');
Requirements::javascript('silverstripe/blog:client/dist/js/main.bundle.js');
}
/**
* {@inheritdoc}

View File

@ -113,9 +113,8 @@ class BlogMemberExtension extends DataExtension
$fields->removeFieldFromTab('Root', 'BlogPosts');
// Construct a better posts tab.
$module = ModuleLoader::getModule('silverstripe/blog');
Requirements::css($module->getRelativeResourcePath('css/cms.css'));
Requirements::javascript($module->getRelativeResourcePath('js/cms.js'));
Requirements::css('silverstripe/blog:client/dist/styles/main.css');
Requirements::javascript('silverstripe/blog:client/dist/js/main.bundle.js');
$tab = Tab::create('BlogPosts', _t(__CLASS__ . '.TABBLOGPOSTS', 'Blog Posts'));

View File

@ -211,9 +211,8 @@ class BlogPost extends Page
*/
public function getCMSFields()
{
$module = ModuleLoader::getModule('silverstripe/blog');
Requirements::css($module->getRelativeResourcePath('css/cms.css'));
Requirements::javascript($module->getRelativeResourcePath('js/cms.js'));
Requirements::css('silverstripe/blog:client/dist/styles/main.css');
Requirements::javascript('silverstripe/blog:client/dist/js/main.bundle.js');
$this->beforeUpdateCMSFields(function ($fields) {
$uploadField = UploadField::create('FeaturedImage', _t(__CLASS__ . '.FeaturedImage', 'Featured Image'));