Commit 3dc70221 authored by acrollet's avatar acrollet

Add fullcalendar print stylesheet

parent d8f6da34
......@@ -8,7 +8,8 @@ fullcalendar:
- core/jquery
css:
theme:
/libraries/fullcalendar/fullcalendar.min.css: { minified: true }
/libraries/fullcalendar/fullcalendar.min.css: { media: screen, minified: true }
/libraries/fullcalendar/fullcalendar.print.min.css: { media: print, minified: true }
fullcalendar-scheduler:
version: VERSION
......
......@@ -3,6 +3,7 @@
define('FULLCALENDAR_JS_CDN', 'https://cdn.jsdelivr.net/npm/fullcalendar@3.8.0/dist/fullcalendar.min.js');
define('FULLCALENDAR_LOCALE_JS_CDN', 'https://cdn.jsdelivr.net/npm/fullcalendar@3.8.0/dist/locale-all.js');
define('FULLCALENDAR_CSS_CDN', 'https://cdn.jsdelivr.net/npm/fullcalendar@3.8.0/dist/fullcalendar.min.css');
define('FULLCALENDAR_PRINT_CSS_CDN', 'https://cdn.jsdelivr.net/npm/fullcalendar@3.8.0/dist/fullcalendar.print.min.css');
define('FULLCALENDAR_SCHEDULER_JS_CDN', 'https://cdn.jsdelivr.net/npm/fullcalendar-scheduler@1.9.1/dist/scheduler.min.js');
define('FULLCALENDAR_SCHEDULER_CSS_CDN', 'https://cdn.jsdelivr.net/npm/fullcalendar-scheduler@1.9.1/dist/scheduler.min.css');
define('MOMENT_JS_CDN', 'https://cdn.jsdelivr.net/npm/moment@2.20.1/moment.min.js');
......@@ -32,6 +33,11 @@ function fullcalendar_library_library_info_alter(&$libraries, $extension) {
$libraries['fullcalendar']['css']['theme'][FULLCALENDAR_CSS_CDN] = ['type' => 'external', 'minified' => TRUE];
}
if (!file_exists(DRUPAL_ROOT . '/libraries/fullcalendar/fullcalendar.print.min.css')) {
unset($libraries['fullcalendar']['css']['theme']['/libraries/fullcalendar/fullcalendar.print.min.css']);
$libraries['fullcalendar']['css']['theme'][FULLCALENDAR_PRINT_CSS_CDN] = ['type' => 'external', 'minified' => TRUE];
}
if (!file_exists(DRUPAL_ROOT . '/libraries/fullcalendar-scheduler/scheduler.min.js')) {
unset($libraries['fullcalendar-scheduler']['js']['/libraries/fullcalendar-scheduler/scheduler.min.js']);
$libraries['fullcalendar-scheduler']['js'][FULLCALENDAR_SCHEDULER_JS_CDN] = ['type' => 'external', 'minified' => TRUE];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment