mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Improve display
This commit is contained in:
parent
03073cb6a4
commit
3d8307cd87
@ -22,6 +22,8 @@ class GroupPresencePage {
|
|||||||
|
|
||||||
let lastClick = null;
|
let lastClick = null;
|
||||||
|
|
||||||
|
const colors = ["#f012be", "#f39c12", "#0073b7", "#00a65a", "#dd4b39", "#605ca8"];
|
||||||
|
|
||||||
const calendarTarget = el.querySelector(".calendar");
|
const calendarTarget = el.querySelector(".calendar");
|
||||||
const calendar = new FullCalendar.Calendar(calendarTarget, {
|
const calendar = new FullCalendar.Calendar(calendarTarget, {
|
||||||
headerToolbar: {
|
headerToolbar: {
|
||||||
@ -30,6 +32,8 @@ class GroupPresencePage {
|
|||||||
right: 'dayGridMonth,dayGridWeek,listMonth'
|
right: 'dayGridMonth,dayGridWeek,listMonth'
|
||||||
},
|
},
|
||||||
initialView: 'dayGridMonth',
|
initialView: 'dayGridMonth',
|
||||||
|
locale: "fr",
|
||||||
|
//dayMaxEvents: true,
|
||||||
|
|
||||||
// Data source
|
// Data source
|
||||||
events: async function(info, success, failure) {
|
events: async function(info, success, failure) {
|
||||||
@ -72,11 +76,12 @@ class GroupPresencePage {
|
|||||||
title: users.get(e.userID).fullName,
|
title: users.get(e.userID).fullName,
|
||||||
start: e.date,
|
start: e.date,
|
||||||
end: e.end,
|
end: e.end,
|
||||||
backgroundColor: "#0073b7", //Blue
|
backgroundColor: colors[e.userID % colors.length], //Blue
|
||||||
borderColor: "#0073b7", //Blue
|
borderColor: colors[e.userID % colors.length], //Blue
|
||||||
editable: e.userID == userID(),
|
editable: e.userID == userID(),
|
||||||
allDay: true,
|
allDay: true,
|
||||||
description: users.get(e.userID).fullName
|
description: users.get(e.userID).fullName,
|
||||||
|
userID: e.userID,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -132,6 +137,10 @@ class GroupPresencePage {
|
|||||||
|
|
||||||
// Delete event
|
// Delete event
|
||||||
eventClick: async function(info) {
|
eventClick: async function(info) {
|
||||||
|
console.log(info)
|
||||||
|
if (info.event.userID != userID())
|
||||||
|
return;
|
||||||
|
|
||||||
if (lastClick == null || new Date().getTime() - lastClick.getTime() > 500)
|
if (lastClick == null || new Date().getTime() - lastClick.getTime() > 500)
|
||||||
{
|
{
|
||||||
lastClick = new Date()
|
lastClick = new Date()
|
||||||
|
@ -182,6 +182,7 @@ class Dev {
|
|||||||
|
|
||||||
// Calendar
|
// Calendar
|
||||||
"3rdparty/fullcalendar/lib/main.js",
|
"3rdparty/fullcalendar/lib/main.js",
|
||||||
|
"3rdparty/fullcalendar/lib/locales/fr.js",
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user