You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless I'm doing something wrong, it appears that libraries defined by FullcalendarOption plugins will never be attached. Looking at the FullCalendar ViewStyle plugin, you have this method:
/**
* Load libraries.
*/
protected function prepareAttached() {
/* @var \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar $plugin */
$attached['attach']['library'][] = 'fullcalendar/drupal.fullcalendar';
foreach ($this->getPlugins() as $plugin_id => $plugin) {
$definition = $plugin->getPluginDefinition();
foreach (['css', 'js'] as $type) {
if ($definition[$type]) {
$attached['attach']['library'][] = 'fullcalendar/drupal.fullcalendar.' . $type;
}
}
}
if ($this->displayHandler->getOption('use_ajax')) {
$attached['attach']['library'][] = 'fullcalendar/drupal.fullcalendar.ajax';
}
$settings = $this->prepareSettings();
$attached['attach']['drupalSettings']['fullcalendar'] = [
'.js-view-dom-id-' . $this->view->dom_id => $settings,
];
if (!empty($settings['fullcalendar']['modalWindow'])) {
// FIXME all of these libraries are needed?
$attached['attach']['library'][] = 'core/drupal.ajax';
$attached['attach']['library'][] = 'core/drupal.dialog';
$attached['attach']['library'][] = 'core/drupal.dialog.ajax';
}
return $attached['attach'];
}
In the nested foreach...you'll see that the library is hard-coded to always be 'fullcalendar/drupal.fullcalendar.' . $type;. I installed the fork of this project that adds Scheduler support, but it doesnt work because the scheduler library isnt loaded from libraries/fullcalendar-scheduler. This fixes it:
foreach ($this->getPlugins() as $plugin_id => $plugin) {
$definition = $plugin->getPluginDefinition();
foreach (['css', 'js'] as $type) {
if ($definition[$type]) {
$attached['attach']['library'][] = $plugin_id.'/drupal.'.$plugin_id.'.' . $type;
}
}
}
The text was updated successfully, but these errors were encountered:
Unless I'm doing something wrong, it appears that libraries defined by FullcalendarOption plugins will never be attached. Looking at the FullCalendar ViewStyle plugin, you have this method:
In the nested foreach...you'll see that the library is hard-coded to always be
'fullcalendar/drupal.fullcalendar.' . $type;
. I installed the fork of this project that adds Scheduler support, but it doesnt work because the scheduler library isnt loaded from libraries/fullcalendar-scheduler. This fixes it:The text was updated successfully, but these errors were encountered: