mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
rdv: fullcalendar: manage event clicking
This commit is contained in:
@@ -62,12 +62,15 @@ export default {
|
||||
selectable: true,
|
||||
select: this.onDateSelect,
|
||||
eventChange: this.onEventChange,
|
||||
eventClick: this.onEventClick,
|
||||
eventMouseEnter: this.onEventMouseEnter,
|
||||
eventMouseLeave: this.onEventMouseLeave,
|
||||
selectMirror: true,
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'dayGridMonth,timeGridWeek,timeGridDay'
|
||||
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth,listWeek,listDay'
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -92,6 +95,17 @@ export default {
|
||||
},
|
||||
onEventChange(payload) {
|
||||
this.$store.dispatch('updateEvent', payload);
|
||||
},
|
||||
onEventClick(payload) {
|
||||
payload.event.setProp('backgroundColor','#3788d8');
|
||||
payload.event.setProp('textColor','#ffffff');
|
||||
this.$store.dispatch('updateEvent', payload);
|
||||
},
|
||||
onEventMouseEnter(payload) {
|
||||
payload.event.setProp('borderColor','#444444');
|
||||
},
|
||||
onEventMouseLeave(payload) {
|
||||
payload.event.setProp('borderColor','#ffffff');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -99,3 +113,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user