From da1350dd7dbccae4f4e34bdbaa9c0f5e42880964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A0=20Gia=20K=C3=ADnh?= Date: Thu, 10 Mar 2022 22:14:23 +0700 Subject: [PATCH] fix some bug calendar user and send email and notify websocket done --- web/assets/js/calendar/event.js | 2 +- web/views/admin/dashboard/calendar.jsp | 63 +++++++++++++------------- web/views/calendar/calendar.jsp | 8 ++-- 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/web/assets/js/calendar/event.js b/web/assets/js/calendar/event.js index 07fa72c..5d1edba 100644 --- a/web/assets/js/calendar/event.js +++ b/web/assets/js/calendar/event.js @@ -1,5 +1,5 @@ // init calendar rerender -var calendarEl = document.getElementById('calendar'); +var calendarEl = document.getElementById("calendar"); var calendar = new FullCalendar.Calendar(calendarEl, calenderHandle(events)); calendar.render(); // change event calendar form diff --git a/web/views/admin/dashboard/calendar.jsp b/web/views/admin/dashboard/calendar.jsp index b0ad40b..f9c93f2 100644 --- a/web/views/admin/dashboard/calendar.jsp +++ b/web/views/admin/dashboard/calendar.jsp @@ -3,7 +3,6 @@ Created on : Feb 11, 2022, 1:01:26 PM Author : giaki --%> - <%@page import="model.calendar.EventCalendar"%> <%@page import="model.calendar.CategoryCalendar"%> <%@page import="model.calendar.Calendar"%> @@ -48,7 +47,7 @@ .fc-theme-standard td, .fc-theme-standard th{ border: 1px solid #ebebeb; } - + .fc-daygrid-event{ opacity: 0.7!important; } @@ -69,7 +68,7 @@ .fc-event-title{ font-size: 16px; } - + .fc .fc-bg-event{ opacity: 0.4!important; } @@ -81,10 +80,10 @@ display: none; } @media only screen and (max-width: 800px) { - #navBarCalendar { - display: none; + #navBarCalendar { + display: none; + } } - }
@@ -111,7 +110,7 @@ Add Event
- - + + -
+
+
@@ -182,26 +183,26 @@ var events = [] events.push({ - id: ${event.getId()}, - title: "${event.getTitle()}", - start: new Date("${event.getAdditional().getStartDate()}").toISOString(), - end: new Date("${event.getAdditional().getEndDate()}").toISOString(), - color: "${event.getAdditional().getCalendar().getColor()}", - description: "${event.getDescription()}", - location: "${event.getLocation()}", - overlap: ${event.getAdditional().isOverlap()}, - category: ${event.getAdditional().getCategory().getId()}, - categoryName: "${event.getAdditional().getCategory().getName()}", - status: "${event.getAdditional().getStatus().getId()}", - statusName: "${event.getAdditional().getStatus().getName()}", - allDay: ${event.getAdditional().isIsAllDay()}, - hasEnd: ${event.getAdditional().isIsHasEnd()}, - calendarName: "${event.getAdditional().getCalendar().getName()}", - calendar: ${event.getAdditional().getCalendar().getId()}, - additional: ${event.getAdditional().getId()}, - - display: "${event.getAdditional().getDisplay()}", - + id: ${event.getId()}, + title: `${event.getTitle()}`, + start: new Date("${event.getAdditional().getStartDate()}").toISOString(), + end: new Date("${event.getAdditional().getEndDate()}").toISOString(), + color: `${event.getAdditional().getCalendar().getColor()}`, + description: `${event.getDescription()}`, + location: `${event.getLocation()}`, + overlap: ${event.getAdditional().isOverlap()}, + category: ${event.getAdditional().getCategory().getId()}, + categoryName: "${event.getAdditional().getCategory().getName()}", + status: "${event.getAdditional().getStatus().getId()}", + statusName: "${event.getAdditional().getStatus().getName()}", + allDay: ${event.getAdditional().isIsAllDay()}, + hasEnd: ${event.getAdditional().isIsHasEnd()}, + calendarName: "${event.getAdditional().getCalendar().getName()}", + calendar: ${event.getAdditional().getCalendar().getId()}, + additional: ${event.getAdditional().getId()}, + + display: "${event.getAdditional().getDisplay()}", + }) diff --git a/web/views/calendar/calendar.jsp b/web/views/calendar/calendar.jsp index 688cf2f..f9c93f2 100644 --- a/web/views/calendar/calendar.jsp +++ b/web/views/calendar/calendar.jsp @@ -184,12 +184,12 @@ events.push({ id: ${event.getId()}, - title: "${event.getTitle()}", + title: `${event.getTitle()}`, start: new Date("${event.getAdditional().getStartDate()}").toISOString(), end: new Date("${event.getAdditional().getEndDate()}").toISOString(), - color: "${event.getAdditional().getCalendar().getColor()}", - description: "${event.getDescription()}", - location: "${event.getLocation()}", + color: `${event.getAdditional().getCalendar().getColor()}`, + description: `${event.getDescription()}`, + location: `${event.getLocation()}`, overlap: ${event.getAdditional().isOverlap()}, category: ${event.getAdditional().getCategory().getId()}, categoryName: "${event.getAdditional().getCategory().getName()}",