This repository was archived by the owner on Dec 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathboot.php
More file actions
31 lines (24 loc) · 1.3 KB
/
boot.php
File metadata and controls
31 lines (24 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
if (rex::isBackend() && rex::getUser()) {
if (rex::isDebugMode() && rex_request_method() == 'get') {
$compiler = new rex_scss_compiler();
$compiler->setRootDir($this->getPath());
$compiler->setScssFile($this->getPath('assets/redactor_dark.scss'));
$compiler->setCssFile($this->getPath('assets/redactor_dark.css'));
$compiler->compile();
rex_file::copy($this->getPath('assets/redactor_dark.css'), $this->getAssetsPath('redactor_dark.css'));
}
}
if (rex::isBackend() && !empty(rex::getUser())) {
rex_view::addCssFile($this->getAssetsUrl('vendor/redactor.css'));
rex_view::addJsFile($this->getAssetsUrl('vendor/redactor.js'));
rex_view::addCssFile($this->getAssetsUrl('redactor_custom.css'));
rex_view::addCssFile($this->getAssetsUrl('redactor_dark.css'));
rex_view::addJsFile($this->getAssetsUrl('redactor_plugins.js'));
rex_view::addJsFile($this->getAssetsUrl('redaxo.js'));
rex_view::addJsFile($this->getAssetsUrl('cache/profiles_'.redactor2::getCurrentLanguage().'.js'));
rex_view::addJsFile($this->getAssetsUrl('langs/'.redactor2::getCurrentLanguage().'.js'));
rex_view::setJsProperty('clang_id', rex_clang::getCurrentId());
}
// uncomment in case you want to edit the plugins
// \redactor2::createRedactorPlugInsFile();