mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
NEW: Remove use of MODULE_DIR constants
This relies on https://github.com/silverstripe/silverstripe-framework/pull/7065
This commit is contained in:
parent
29bb49105f
commit
ce730319ec
@ -26,6 +26,7 @@ use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\Control\HTTPResponse_Exception;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use SilverStripe\Forms\DateField;
|
||||
use SilverStripe\Forms\DropdownField;
|
||||
@ -164,11 +165,13 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
parent::init();
|
||||
|
||||
Requirements::javascript(CMS_DIR . '/client/dist/js/bundle.js');
|
||||
Requirements::javascript(CMS_DIR . '/client/dist/js/SilverStripeNavigator.js');
|
||||
Requirements::css(CMS_DIR . '/client/dist/styles/bundle.css');
|
||||
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::add_i18n_javascript(CMS_DIR . '/client/lang', false, true);
|
||||
|
||||
$module = ModuleLoader::getModule('silverstripe/cms');
|
||||
Requirements::add_i18n_javascript($module->getRelativeResourcePath('client/lang'), false, true);
|
||||
|
||||
CMSBatchActionHandler::register('restore', CMSBatchAction_Restore::class);
|
||||
CMSBatchActionHandler::register('archive', CMSBatchAction_Archive::class);
|
||||
|
@ -328,9 +328,9 @@ class ContentController extends Controller
|
||||
|
||||
if (Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
||||
if ($this->dataRecord) {
|
||||
Requirements::css(CMS_DIR . '/client/dist/styles/SilverStripeNavigator.css');
|
||||
Requirements::javascript(ADMIN_THIRDPARTY_DIR . '/jquery/jquery.js');
|
||||
Requirements::javascript(CMS_DIR . '/client/dist/js/SilverStripeNavigator.js');
|
||||
Requirements::css('silverstripe/cms: client/dist/styles/SilverStripeNavigator.css');
|
||||
Requirements::javascript('silverstripe/admin: thirdparty/jquery/jquery.js');
|
||||
Requirements::javascript('silverstripe/cms: client/dist/js/SilverStripeNavigator.js');
|
||||
|
||||
$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
|
||||
$items = $return['items'];
|
||||
@ -370,7 +370,7 @@ HTML;
|
||||
// On live sites we should still see the archived message
|
||||
} else {
|
||||
if ($date = Versioned::current_archived_date()) {
|
||||
Requirements::css(CMS_DIR . '/client/dist/styles/SilverStripeNavigator.css');
|
||||
Requirements::css('silverstripe/cms: client/dist/styles/SilverStripeNavigator.css');
|
||||
/** @var DBDatetime $dateObj */
|
||||
$dateObj = DBField::create_field('Datetime', $date);
|
||||
// $dateObj->setVal($date);
|
||||
|
Loading…
x
Reference in New Issue
Block a user