Skip to content

Commit

Permalink
Upgrade to Fullcalendar 4.1.0, improve removeEvents and addEvents per…
Browse files Browse the repository at this point in the history
…formance
  • Loading branch information
fansaien committed May 2, 2019
1 parent 44cc7a4 commit e7cd308
Show file tree
Hide file tree
Showing 168 changed files with 19,275 additions and 16,940 deletions.
24 changes: 18 additions & 6 deletions widgets/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,22 @@ public function getRecordUrl($record)
*/
protected function loadAssets()
{
$this->addCss(['css/fullcalendar.css', 'less/calendar.less'], 'captive.calendar');
$this->addJs('js/fullcalendar.js', '4.0.0-alpha.4');

$this->addCss(['packages/core/main.min.css', 'packages/list/main.min.css','packages/daygrid/main.min.css','packages/timegrid/main.min.css'], '4.1.0');
$this->addCss(['less/calendar.less'], 'captive.calendar');
// $this->addJs('js/fullcalendar.js', '4.0.0-alpha.4');

$this->addJs('packages/core/main.min.js', '4.1.0');
$this->addJs('packages/list/main.min.js', '4.1.0');
$this->addJs('packages/daygrid/main.min.js', '4.1.0');
$this->addJs('packages/timegrid/main.min.js', '4.1.0');
$this->addJs('packages/interaction/main.min.js', '4.1.0');

// @see https://fullcalendar.io/docs/v4/timeZone
$this->addJs('js/plugins/moment-timezone.min.js', '4.0.0-alpha.4');
$this->addJs('packages/moment-timezone/main.min.js', '4.1.0');



$this->addJs('js/october.calendar.cache.js', 'captive.calendar');
$this->addJs('js/october.calendar.js', 'captive.calendar');
}
Expand All @@ -203,9 +215,9 @@ protected function getDisplayModes()
}

$fullCalendarModes = [
'month' => 'month',
'week' => 'agendaWeek',
'day' => 'agendaDay',
'month' => 'dayGridMonth',
'week' => 'timeGridWeek',
'day' => 'timeGridDay',
'list' => 'listMonth'
];

Expand Down
Loading

0 comments on commit e7cd308

Please sign in to comment.