[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] hotfix: remove dependency of packagist-based fullcalendar-scheduler v5...
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6936c49116a07_2a3ead0033d@gitlab-sidekiq-low-urgency-cpu-bound-v2-5c9c944fd8-rw7vq.mail> |
Victor Emanouilov pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
2eb8e81c by Victor Emanouilov at 2025-12-08T14:28:56+02:00
[FIX] hotfix: remove dependency of packagist-based fullcalendar-scheduler v5 and rely on the already imported v6 from node packages
- - - - -
2 changed files:
- lib/wiki-plugins/wikiplugin_trackercalendar.php
- src/js/jquery-tiki/wikiplugin-trackercalendar.js
Changes:
=====================================
lib/wiki-plugins/wikiplugin_trackercalendar.php
=====================================
@@ -14,13 +14,6 @@ function wikiplugin_trackercalendar_info()
'name' => tr('Tracker Calendar'),
'description' => tr('Create and display a calendar using tracker data'),
'prefs' => ['wikiplugin_trackercalendar'],
- 'packages_required' => [
- 'npm-asset/fullcalendar-scheduler' =>
- VendorHelper::getAvailableVendorPath(
- 'fullcalendarscheduler',
- 'npm-asset/fullcalendar-scheduler/main.min.js'
- )
- ],
'format' => 'html',
'iconname' => 'calendar',
'introduced' => 10,
@@ -406,23 +399,9 @@ function wikiplugin_trackercalendar($data, $params)
static $id = 0;
$headerlib = TikiLib::lib('header');
- $vendorPath = VendorHelper::getAvailableVendorPath('fullcalendarscheduler', 'npm-asset/fullcalendar-scheduler/main.min.js', false);
-
- if (! $vendorPath) {
- $errorMessage = tr('To view Tracker Calendar Tiki needs the latest npm-asset/fullcalendar-scheduler package.');
- if (Perms::get()->admin) {
- $errorMessage .= '<br>' . tr('Use the Package Manager to install it %0here%1.', '<a href="tiki-admin.php?page=packages" class="alert-link">', '</a>');
- } else {
- $errorMessage .= '<br>' . tr('Contact the site administrator.');
- }
-
- return WikiParser_PluginOutput::internalError($errorMessage);
- }
-
// Disable fullcalendar's force events to be one-line tall
$headerlib->add_css('.fc-day-grid-event > .fc-content, .fc-timeline-event > .fc-content { white-space: normal; }');
- $headerlib->add_cssfile($vendorPath . '/npm-asset/fullcalendar-scheduler/main.css');
// Disable fullcalendar's force events to be one-line tall
$headerlib->add_css('.fc-day-grid-event > .fc-content { white-space: normal; }');
$headerlib->add_js_module('import "@jquery-tiki/wikiplugin-trackercalendar";');
@@ -455,10 +434,10 @@ function wikiplugin_trackercalendar($data, $params)
$views[] = 'dayGridMonth';
}
if ($params['aweek'] === 'y') {
- $views[] = 'resourceTimeGridWeek';
+ $views[] = 'resourceTimelineWeek';
}
if ($params['aday'] === 'y') {
- $views[] = 'resourceTimeGridDay';
+ $views[] = 'resourceTimelineDay';
}
if ($params['lyear'] === 'y') {
$views[] = 'listYear';
@@ -494,8 +473,8 @@ function wikiplugin_trackercalendar($data, $params)
$dViewMap = [
'month' => 'dayGridMonth',
- 'agendaWeek' => 'resourceTimeGridWeek',
- 'agendaDay' => 'resourceTimeGridDay',
+ 'agendaWeek' => 'resourceTimelineWeek',
+ 'agendaDay' => 'resourceTimelineDay',
'list' => 'list',
'listMonth' => 'listMonth',
'listWeek' => 'listWeek',
=====================================
src/js/jquery-tiki/wikiplugin-trackercalendar.js
=====================================
@@ -4,8 +4,12 @@
import { Calendar } from "@fullcalendar/core";
import listPlugin from "@fullcalendar/list";
+import dayGridPlugin from "@fullcalendar/daygrid";
+import timeGridPlugin from "@fullcalendar/timegrid";
+import interactionPlugin from "@fullcalendar/interaction";
+import scrollGridPlugin from "@fullcalendar/scrollgrid";
+import resourcePlugin from "@fullcalendar/resource";
import resourceTimelinePlugin from "@fullcalendar/resource-timeline";
-import resourceTimeGridPlugin from "@fullcalendar/resource-timegrid";
import moment from "moment";
$.fn.setupFullCalendar = function (tcPluginParams) {
@@ -46,7 +50,7 @@ $.fn.setupFullCalendar = function (tcPluginParams) {
hour12: tcPluginParams.timeFormat,
};
var calendar = new Calendar(cal, {
- plugins: [listPlugin, resourceTimelinePlugin, resourceTimeGridPlugin],
+ plugins: [listPlugin, dayGridPlugin, timeGridPlugin, scrollGridPlugin, resourcePlugin, resourceTimelinePlugin, interactionPlugin],
themeSystem: "bootstrap",
schedulerLicenseKey: tcPluginParams.premiumLicense,
initialDate: tcPluginParams.initialDate,
@@ -117,8 +121,6 @@ $.fn.setupFullCalendar = function (tcPluginParams) {
listMonth: tcPluginParams.llabelListMonth,
listYear: tcPluginParams.labelListYear,
today: tcPluginParams.labelToday,
- resourceTimeGridWeek: tcPluginParams.labelAgendaWeek,
- resourceTimeGridDay: tcPluginParams.labelAgendaDay,
},
resources: tcPluginParams.resourceList,
allDayText: tcPluginParams.labelAllDay,
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/2eb8e81cbda3b2e182255e83d531864cbb670d2d
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/2eb8e81cbda3b2e182255e83d531864cbb670d2d
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs