forked from FriendsOfREDAXO/markitup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.php
executable file
·28 lines (25 loc) · 1003 Bytes
/
boot.php
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
<?php
if (rex::isBackend()) {
// Ressourcen einbinden
rex_view::addJsFile($this->getAssetsUrl('jquery.markitup.js'));
rex_view::addJsFile($this->getAssetsUrl('autosize.min.js'));
rex_view::addJsFile($this->getAssetsUrl('scripts.js'));
rex_view::addCssFile($this->getAssetsUrl('style.css'));
if (file_exists($this->getAssetsPath('skin.css'))) {
rex_view::addCssFile($this->getAssetsUrl('skin.css'));
}
$language = array_unique(
array_map(
function($l) { return substr($l,0,2); },
array_merge( [rex_i18n::getLocale()], rex::getProperty('lang_fallback', []), ['--'] )
)
);
foreach( $language as $lang ) {
$langPath = $this->getAssetsUrl( "cache/$lang" );
if( is_dir($langPath) ) {
rex_view::addCssFile("$langPath/markitup_profiles.css");
rex_view::addJsFile("$langPath/markitup_profiles.js");
break;
}
}
}