Move calendar/event stylesheets/scripts registration to modules
- Add media parameter to Page->registerStylesheet - Fixes CSS precedence with custom theme stylesheet
This commit is contained in:
parent
4b15b9fe56
commit
2e286d6a57
7 changed files with 20 additions and 21 deletions
|
@ -105,6 +105,11 @@ function cal_content(App $a)
|
|||
// get the translation strings for the callendar
|
||||
$i18n = Event::getStrings();
|
||||
|
||||
DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.min.css');
|
||||
DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.print.min.css', 'print');
|
||||
DI::page()->registerFooterScript('view/asset/moment/min/moment-with-locales.min.js');
|
||||
DI::page()->registerFooterScript('view/asset/fullcalendar/dist/fullcalendar.min.js');
|
||||
|
||||
$htpl = Renderer::getMarkupTemplate('event_head.tpl');
|
||||
DI::page()['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
||||
'$module_url' => '/cal/' . $a->data['user']['nickname'],
|
||||
|
|
|
@ -256,6 +256,11 @@ function events_content(App $a)
|
|||
// get the translation strings for the callendar
|
||||
$i18n = Event::getStrings();
|
||||
|
||||
DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.min.css');
|
||||
DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.print.min.css', 'print');
|
||||
DI::page()->registerFooterScript('view/asset/moment/min/moment-with-locales.min.js');
|
||||
DI::page()->registerFooterScript('view/asset/fullcalendar/dist/fullcalendar.min.js');
|
||||
|
||||
$htpl = Renderer::getMarkupTemplate('event_head.tpl');
|
||||
DI::page()['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
||||
'$module_url' => '/events',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue