Kalender
Update: * Neues Feature Private Termine Implementierung
This commit is contained in:
@@ -102,18 +102,20 @@ endforeach;
|
||||
<div id="calendar-side-div" class="col-12 col-lg-2">
|
||||
<div class="calendar-side-borders-main">
|
||||
|
||||
<h3 class="no-movable" data-id="<?= $Calendar[0]->id ?>" id="calendar-id">Kalender
|
||||
<h3 class="no-movable" data-calendarid="<?= $Calendar[0]->go_calendar_id ?>" data-id="<?= $Calendar[0]->id ?>" id="calendar-id">Kalender
|
||||
<div class="add-cal-group-div"><i title="Kalendergruppe hinzufügen"
|
||||
class="fa-duotone fa-solid fa-rectangle-history-circle-plus"></i>
|
||||
</div>
|
||||
</h3>
|
||||
<?php
|
||||
if ($Calendar[0]->groups) : ?>
|
||||
if ($Calendar[0]->groups) :
|
||||
$Rights = $rights;
|
||||
|
||||
?>
|
||||
<div class="add-cal-group-div-sub">
|
||||
<?php
|
||||
$groups = json_decode($Calendar[0]->groups, true);
|
||||
foreach ($groups as $group) :
|
||||
|
||||
?>
|
||||
|
||||
<div class="calendar-side-borders-sub mb-2" data-origin="<?= $group['origin'] ?>">
|
||||
@@ -131,7 +133,10 @@ endforeach;
|
||||
</h5>
|
||||
<div class="calendar-side-borders-sub-inner <?= ($group['origin']) ? 'data-origin-' . $group['origin'] : '' ?>"
|
||||
style="<?= ($group['show']) ? '' : 'display:none;' ?>">
|
||||
<?php foreach ($group['calendars'] as $calendar) : ?>
|
||||
<?php foreach ($group['calendars'] as $calendar) :
|
||||
unset($Rights[$calendar['calendar_id']]);
|
||||
?>
|
||||
|
||||
<div class="form-check text-left ml-2"
|
||||
data-origin="<?= $calendar['origin'] ?>">
|
||||
<input data-calendar_id="<?= $calendar['calendar_id'] ?>"
|
||||
@@ -154,10 +159,52 @@ endforeach;
|
||||
<?= ($CalendarAll[$calendar['calendar_id']]->user->name) ?: $specialCalendars[$calendar['calendar_id']] ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach;
|
||||
// foreach ($Rights as $key => $calendar):
|
||||
?>
|
||||
<!---->
|
||||
<!-- <div class="form-check text-left ml-2"-->
|
||||
<!-- data-origin="-->
|
||||
<?php //= $calendar['origin']
|
||||
?><!--">-->
|
||||
<!-- <input data-calendar_id="-->
|
||||
<?php //= $calendar['calendar_id']
|
||||
?><!--"-->
|
||||
<!-- class="form-check-input calendar-check"-->
|
||||
<!-- name="form-check-input" type="checkbox"-->
|
||||
<!-- --><?php //= ($calendar['checked']) ? 'checked="checked"' : ''
|
||||
?>
|
||||
<!-- value="2">-->
|
||||
<!-- <input-->
|
||||
<!-- data-calendar_id="-->
|
||||
<?php //= $calendar['calendar_id']
|
||||
?><!--"-->
|
||||
<!-- type="color"-->
|
||||
<!-- class="form-control-color color-input"-->
|
||||
<!-- value="-->
|
||||
<?php //= $Calendar_colors[$key]['bgcolor']
|
||||
?><!--"-->
|
||||
<!-- title="Hintergrundfarbe">-->
|
||||
<!-- <input data-calendar_id="-->
|
||||
<?php //= $calendar['calendar_id']
|
||||
?><!--"-->
|
||||
<!-- type="color"-->
|
||||
<!-- class="form-control-color color-text-input"-->
|
||||
<!-- value="-->
|
||||
<?php //= ($Calendar_colors[$key]['txtcolor']) ? $Calendar_colors[$key]['txtcolor'] : '#000000'
|
||||
?><!--"-->
|
||||
<!-- title="Textfarbe">-->
|
||||
<!-- <label class="calendar-side-label" style="margin-top:2px;">-->
|
||||
<!-- --><?php //= ($CalendarAll[$key]->user->name) ?: $specialCalendars[$calendar['calendar_id']]
|
||||
?>
|
||||
<!-- </label>-->
|
||||
<!-- </div>-->
|
||||
<!-- --><?php //endforeach;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;
|
||||
var_dump($Rights);
|
||||
?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
@@ -248,24 +295,26 @@ endforeach;
|
||||
</div>
|
||||
</h5>
|
||||
<div class="calendar-side-borders-sub-inner data-origin-2">
|
||||
<!-- <div style="display:none">-->
|
||||
<!-- <div class="form-check text-left ml-2" data-origin="2">-->
|
||||
<!-- <input data-calendar_id="999" class="form-check-input calendar-check"-->
|
||||
<!-- name="form-check-input"-->
|
||||
<!-- type="checkbox" value="">-->
|
||||
<!-- <input data-calendar_id="999" type="color"-->
|
||||
<!-- class="form-control-color color-input"-->
|
||||
<!-- value="--><?php //= ($Calendar_colors[999]['bgcolor']) ?: $specialCalendarColors[999] ?><!--"-->
|
||||
<!-- title="Hintergrundfarbe">-->
|
||||
<!-- <input data-calendar_id="999" type="color"-->
|
||||
<!-- class="form-control-color color-text-input"-->
|
||||
<!-- value="--><?php //= ($Calendar_colors[999]['txtcolor']) ? $Calendar_colors[999]['txtcolor'] : '#ffffff' ?><!--"-->
|
||||
<!-- title="Textfarbe">-->
|
||||
<!-- <label class="calendar-side-label" for="" style="margin-top:2px;">-->
|
||||
<!-- Abwesenheiten-->
|
||||
<!-- </label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="display:none">-->
|
||||
<!-- <div class="form-check text-left ml-2" data-origin="2">-->
|
||||
<!-- <input data-calendar_id="999" class="form-check-input calendar-check"-->
|
||||
<!-- name="form-check-input"-->
|
||||
<!-- type="checkbox" value="">-->
|
||||
<!-- <input data-calendar_id="999" type="color"-->
|
||||
<!-- class="form-control-color color-input"-->
|
||||
<!-- value="-->
|
||||
<?php //= ($Calendar_colors[999]['bgcolor']) ?: $specialCalendarColors[999] ?><!--"-->
|
||||
<!-- title="Hintergrundfarbe">-->
|
||||
<!-- <input data-calendar_id="999" type="color"-->
|
||||
<!-- class="form-control-color color-text-input"-->
|
||||
<!-- value="-->
|
||||
<?php //= ($Calendar_colors[999]['txtcolor']) ? $Calendar_colors[999]['txtcolor'] : '#ffffff' ?><!--"-->
|
||||
<!-- title="Textfarbe">-->
|
||||
<!-- <label class="calendar-side-label" for="" style="margin-top:2px;">-->
|
||||
<!-- Abwesenheiten-->
|
||||
<!-- </label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="form-check text-left ml-2" data-origin="2">
|
||||
<input data-calendar_id="998" class="form-check-input calendar-check"
|
||||
name="form-check-input"
|
||||
@@ -339,17 +388,18 @@ endforeach;
|
||||
<input type="text" class="form-control is-require eventmodal-input" id="name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-right">
|
||||
<label for="location" class="col-form-label fw-medium ">Typ</label>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="mb-2">
|
||||
<div class="input-group mb-2">
|
||||
<span title="Erinnerung" class="input-group-text spanwidht">Typ</span>
|
||||
<select class="form-control form-select" aria-label="Default select" id="type">
|
||||
<option value="1">Termin</option>
|
||||
<option value="2">IBN</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<i title="Normal" class="fa-duotone privacy-click fa-regular fa-unlock mt-1"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
@@ -361,11 +411,10 @@ endforeach;
|
||||
<input type="text" class="form-control eventmodal-input" id="location">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-right">
|
||||
<label for="location" class="col-form-label fw-medium ">Anzeige</label>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="mb-2">
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<span title="Erinnerung" class="input-group-text spanwidht"><i
|
||||
class="fa-regular fa-eye"></i></span>
|
||||
<select class="form-control form-select" aria-label="Default select" id="busy">
|
||||
<option value="1">gebucht</option>
|
||||
<option value="0">frei</option>
|
||||
@@ -373,7 +422,6 @@ endforeach;
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
@@ -439,7 +487,6 @@ endforeach;
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center mt-2">
|
||||
|
||||
@@ -152,6 +152,7 @@ class CalendarApicontroller extends mfBaseApicontroller
|
||||
$now = floor(microtime(true) * 1000);
|
||||
$timenow = time();
|
||||
while (true) {
|
||||
|
||||
$colors = $redis->get('thetool_calendar_usercolors_' . $decstring);
|
||||
if ($colors) {
|
||||
$calendarColors = json_decode($colors, true);
|
||||
@@ -172,11 +173,15 @@ class CalendarApicontroller extends mfBaseApicontroller
|
||||
$message[0]['start_time'] = date('Y-m-d H:i', $json['start_time']);
|
||||
$message[0]['end_time'] = date('Y-m-d H:i', $json['end_time']);
|
||||
}
|
||||
$message[0]['name']= $Calendarevent['data'][0]['category']['category'];
|
||||
$message[0]['description'] = $Calendarevent['data'][0]['description']['description'];
|
||||
$message[0]['location'] = $Calendarevent['data'][0]['location']['location'];
|
||||
$message[0]['event_type'] = $Calendarevent['data'][0]['event_type']['event_type'];
|
||||
$message[0]['attachment'] = $Calendarevent['data'][0]['attachment']['attachment'];
|
||||
$message[0]['attachments'] = $Calendarevent['data'][0]['attachments']['attachments'];
|
||||
$message[0]['calendar_name'] = $Calendarevent['data'][0]['calendar_name']['calendar_name'];
|
||||
$message[0]['isorganizer'] = $Calendarevent['data'][0]['isorganizer']['isorganizer'];
|
||||
$message[0]['privateflag'] = $Calendarevent['data'][0]['privateflag']['privateflag'];
|
||||
$message[0]['rrule'] = $Calendarevent['data'][0]['rrule']['rrule'];
|
||||
$message[0]['duration'] = $Calendarevent['data'][0]['duration']['duration'];
|
||||
$message[0]['mtime'] = $Calendarevent['data'][0]['mtime']['mtime'];
|
||||
@@ -189,6 +194,7 @@ class CalendarApicontroller extends mfBaseApicontroller
|
||||
$message[0]['bgColor'] = $calendarColors[$json['calendar_id']]['bgcolor'];
|
||||
$message[0]['txtColor'] = $calendarColors[$json['calendar_id']]['txtcolor'];
|
||||
$message[0]['rights'] = $rights[$json['calendar_id']];
|
||||
$message[0]['me'] = $decstring;
|
||||
|
||||
$result = json_encode($message);
|
||||
if (in_array($message[0]['calendar_id'], $allowedCalendar)) {
|
||||
|
||||
@@ -237,9 +237,20 @@ class CalendarModel
|
||||
$txtcolor = "#000";
|
||||
$colorCounter++;
|
||||
}
|
||||
$location=$data['location'];
|
||||
$eventtype=$data['event_type'];
|
||||
$description=$data['description'];
|
||||
if ($calenderRights[$data['calendar_id']]) {
|
||||
$rights = $calenderRights[$data['calendar_id']];
|
||||
$CalendarUsers[$data['calendar_id']] = $data['calendar_name'];
|
||||
if ($data['private']==1 && $calendar[0]->go_calendar_id != $data['calendar_id']) {
|
||||
$name = "Privat";
|
||||
$attachment = 0;
|
||||
$attachmentLinks = "";
|
||||
$location="";
|
||||
$eventtype="1";
|
||||
$description="";
|
||||
}
|
||||
$rows[] = array(
|
||||
'id' => array('id' => $data['id']),
|
||||
'cstart' => array('cstart' => $starttime),
|
||||
@@ -250,14 +261,15 @@ class CalendarModel
|
||||
'bgColor' => array('bgColor' => $bgcolor),
|
||||
'txtColor' => array('txtColor' => $txtcolor),
|
||||
'rights' => array('rights' => $rights, 'order' => $rights),
|
||||
'location' => array('location' => $data['location']),
|
||||
'location' => array('location' => $location),
|
||||
'busy' => array('busy' => $data['busy']),
|
||||
'privateflag' => array('privateflag' => $data['private']),
|
||||
'allDay' => array('allDay' => $data['all_day_event']),
|
||||
'rrule' => array('rrule' => $rrule),
|
||||
'rrule_events' => array('rrule_events' => $rrule_events),
|
||||
'duration' => array('duration' => $duration),
|
||||
'event_type' => array('event_type' => $data['event_type']),
|
||||
'description' => array('description' => ($data['description'])),
|
||||
'event_type' => array('event_type' => $eventtype),
|
||||
'description' => array('description' => ($description)),
|
||||
'attachment' => array('attachment' => $attachment),
|
||||
'attachments' => array('attachments' => $attachmentLinks),
|
||||
'calendar_name' => array('calendar_name' => $data['calendar_name']),
|
||||
@@ -466,6 +478,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
||||
'customer_info' => array('customer_info' => $data['customer_info']),
|
||||
'customer_info_send' => array('customer_info_send' => $data['customer_info_send']),
|
||||
'customer_info_reminder' => array('customer_info_reminder' => $data['customer_info_reminder']),
|
||||
'privateflag' => array('privateflag' => $data['private'], 'order' => $data['private']),
|
||||
'isorganizer' => array('isorganizer' => $data['is_organizer']),
|
||||
'attendees' => array('attendees' => json_encode($AttendeeArray)),
|
||||
'organizer' => array('organizer' => $data['organizer']),
|
||||
@@ -539,6 +552,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
||||
$busy = ($r->busy);
|
||||
$users = ($r->users);
|
||||
$attendees = ($r->attendees);
|
||||
$privateflag=($r->privateflag);
|
||||
foreach ($users as $key => $value) {
|
||||
$user_id = $value;
|
||||
}
|
||||
@@ -573,6 +587,9 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
||||
if (isset($allday))
|
||||
$updateArray['all_day_event'] = $allday;
|
||||
|
||||
if (isset($privateflag))
|
||||
$updateArray['private'] = $privateflag;
|
||||
|
||||
if (isset($reminder)) {
|
||||
if ($reminder == 'NULL')
|
||||
$updateArray['reminder'] = NULL;
|
||||
@@ -733,6 +750,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
||||
$users = ($r->users);
|
||||
$customer_info_reminder_check = 0;
|
||||
$attendees = ($r->attendees);
|
||||
$privateflag=($r->privateflag);
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
header('Content-Type: application/json');
|
||||
foreach ($users as $key => $value) {
|
||||
@@ -771,7 +789,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
||||
$customer_info_send = NULL;
|
||||
}
|
||||
|
||||
$dataarray = array("start_time" => $start, 'end_time' => $end, 'name' => $title, 'description' => $description, 'location' => $location, 'calendar_id' => $user_id, 'uuid' => "a5eb79b3-fca7-5378-a09e-" . rand(100000000000, 999999999999), 'user_id' => 1, 'timezone' => 'Europe/Amsterdam', 'all_day_event' => 0, 'repeat_end_time' => 0, 'reminder' => $reminder, 'ctime' => time(), 'cname' => $me->name, 'mtime' => time(), 'mname' => $me->name, 'user_id' => 1, 'busy' => $busy, 'status' => 'CONFIRMED', 'resource_event_id' => 0, 'private' => 0, 'rrule' => '', 'background' => 'EBF1E2', 'files_folder_id' => 0, 'read_only' => 0, 'exception_for_event_id' => 0, 'recurrence_id' => 0, 'is_organizer' => 1, 'event_type' => $type, 'customer' => $customer, 'customer_info' => $customer_info, 'customer_info_send' => $customer_info_send, 'customer_info_reminder' => $customer_info_reminder_check);
|
||||
$dataarray = array("start_time" => $start, 'end_time' => $end, 'name' => $title, 'description' => $description, 'location' => $location, 'calendar_id' => $user_id, 'uuid' => "a5eb79b3-fca7-5378-a09e-" . rand(100000000000, 999999999999), 'user_id' => 1, 'timezone' => 'Europe/Amsterdam', 'all_day_event' => 0, 'repeat_end_time' => 0, 'reminder' => $reminder, 'ctime' => time(), 'cname' => $me->name, 'mtime' => time(), 'mname' => $me->name, 'user_id' => 1, 'busy' => $busy, 'status' => 'CONFIRMED', 'resource_event_id' => 0, 'private' => $privateflag, 'rrule' => '', 'background' => 'EBF1E2', 'files_folder_id' => 0, 'read_only' => 0, 'exception_for_event_id' => 0, 'recurrence_id' => 0, 'is_organizer' => 1, 'event_type' => $type, 'customer' => $customer, 'customer_info' => $customer_info, 'customer_info_send' => $customer_info_send, 'customer_info_reminder' => $customer_info_reminder_check);
|
||||
|
||||
$db->insert("cal_events", $dataarray);
|
||||
$event_id = $dataarray['uuid'];
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
padding: 1px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fc-timegrid-event-short .fc-event-main-frame {
|
||||
flex-direction: row;
|
||||
overflow: hidden;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.fc-toolbar {
|
||||
@media (max-width: 767px) {
|
||||
flex-direction: column;
|
||||
@@ -311,6 +313,12 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.fc-event-attachment-mr {
|
||||
position: absolute;
|
||||
right: 11px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.fc-event-type {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -322,6 +330,15 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
||||
bottom: -4px;
|
||||
left: -4px;
|
||||
}
|
||||
|
||||
.fc-event-private {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fc-timegrid-event-short .fc-event-time::after {
|
||||
content: "";
|
||||
}
|
||||
@@ -611,4 +628,23 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
||||
.fa-arrow-right-from-bracket {
|
||||
color: #0600ff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fa-unlock:after {
|
||||
color: #000;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.fa-unlock:before {
|
||||
color: #cd0909;
|
||||
|
||||
}
|
||||
|
||||
.fa-lock:after {
|
||||
color: #000;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.modal-body .fa-lock:before {
|
||||
color: #0ab900;
|
||||
}
|
||||
@@ -63,6 +63,7 @@ function getOffset(unixTimestamp) {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
let checkbox = $(".form-check-input");
|
||||
let visibleCalendars = [];
|
||||
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||
visibleCalendars.push(0);
|
||||
checkbox.each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
@@ -116,6 +117,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
} else {
|
||||
rights = false;
|
||||
}
|
||||
if (value.privateflag.privateflag == '1' && mycalendar_id!=value.calendar_id.calendar_id) {
|
||||
rights = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (value.isorganizer.isorganizer == '1' && rights) {
|
||||
movable = true;
|
||||
} else {
|
||||
@@ -150,6 +157,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
||||
textColor: value.txtColor.txtColor,
|
||||
backgroundColor: value.bgColor.bgColor,
|
||||
privateflag: value.privateflag.privateflag,
|
||||
editable: rights,
|
||||
rruleflag: rruleflag,
|
||||
dates: rrule,
|
||||
@@ -186,6 +194,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
||||
textColor: value.txtColor.txtColor,
|
||||
backgroundColor: value.bgColor.bgColor,
|
||||
privateflag: value.privateflag.privateflag,
|
||||
editable: rights,
|
||||
rruleflag: rruleflag,
|
||||
dates: rrule,
|
||||
@@ -370,6 +379,13 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
} else {
|
||||
$('#reminder').val('NULL');
|
||||
}
|
||||
if (data.data.privateflag.privateflag == 1) {
|
||||
$('.privacy-click').removeClass('fa-unlock');
|
||||
$('.privacy-click').removeClass('fa-lock');
|
||||
$('.privacy-click').addClass('fa-lock');
|
||||
}
|
||||
|
||||
|
||||
$('#type').val(data.data.type.type);
|
||||
$('#busy').val(data.data.busy.busy);
|
||||
isOrganizer = data.data.isorganizer.isorganizer;
|
||||
@@ -611,16 +627,24 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
title += '<div class="text-left font-13"><span class="font-weight-500">geändert von </span> ' + info.event.extendedProps['mname'] + '</div>';
|
||||
}
|
||||
if ($('.fc-button-active').hasClass('fc-timeGridWeek-button') || $('.fc-button-active').hasClass('fc-timeGridDay-button')) {
|
||||
if (info.event.extendedProps['attachment']) {
|
||||
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-attachment\"><i class=\"fa-light fa-paperclip-vertical\"></i></div>");
|
||||
}
|
||||
|
||||
if (info.event.extendedProps['event_type'] == '2') {
|
||||
|
||||
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-type\"><i class=\"fa-light fa-user-helmet-safety\"></i></div>");
|
||||
}
|
||||
if (info.event.extendedProps['privateflag'] == 1) {
|
||||
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-private\"><i class=\"fa-regular fa-event-lock fa-lock\"></i></div>");
|
||||
}
|
||||
if (info.event.extendedProps['attachment'] && info.event.extendedProps['privateflag'] == 1) {
|
||||
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-attachment-mr\"><i class=\"fa-light fa-paperclip-vertical\"></i></div>");
|
||||
} else if (info.event.extendedProps['attachment']) {
|
||||
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-attachment\"><i class=\"fa-light fa-paperclip-vertical\"></i></div>");
|
||||
}
|
||||
if (info.event.extendedProps['rruleflag']) {
|
||||
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-recurrence\"><i class=\"fa-regular fa-arrows-rotate\"></i></div>");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
var tooltip = new Tooltip(info.el, {
|
||||
@@ -784,6 +808,7 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
// document.getElementById('result').innerHTML += e.data + '<br>';
|
||||
let checkbox = $(".form-check-input");
|
||||
let visibleCalendars = [];
|
||||
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||
visibleCalendars.push(0);
|
||||
checkbox.each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
@@ -817,6 +842,11 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
} else {
|
||||
movable = false;
|
||||
}
|
||||
if (event.privateflag == '1' && mycalendar_id!=event.calendar_id_check) {
|
||||
rights = false;
|
||||
movable = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (event.change_type == '2' && cevent) {
|
||||
@@ -838,6 +868,7 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
attachment: event.attachment,
|
||||
attachments: event.attachments,
|
||||
editable: movable,
|
||||
privateflag: event.privateflag,
|
||||
rruleflag: rruleflag,
|
||||
rrule: rrule,
|
||||
duration: duration,
|
||||
@@ -868,6 +899,7 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
attachments: event.attachments,
|
||||
calendar_id: event.calendar_id_check,
|
||||
resourceId: event.calendar_id,
|
||||
privateflag: event.privateflag,
|
||||
calendar_name: event.calendar_name,
|
||||
clickable: rights,
|
||||
mtime: event.mtime,
|
||||
@@ -892,6 +924,7 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
textColor: event.txtColor,
|
||||
backgroundColor: event.bgColor,
|
||||
location: event.location,
|
||||
privateflag: event.privateflag,
|
||||
event_type: event.event_type,
|
||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
||||
attachment: event.attachment,
|
||||
@@ -918,6 +951,7 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
color: '#ab0000',
|
||||
editable: false,
|
||||
location: event.location,
|
||||
privateflag: event.privateflag,
|
||||
event_type: event.event_type,
|
||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
||||
attachment: event.attachment,
|
||||
@@ -986,6 +1020,9 @@ $(document).ready(function () {
|
||||
$('.attachment-div').empty();
|
||||
$('#reminder').val('NULL');
|
||||
$('#type').val('1');
|
||||
$('.privacy-click').removeClass('fa-lock');
|
||||
$('.privacy-click').removeClass('fa-unlock');
|
||||
$('.privacy-click').addClass('fa-unlock');
|
||||
$('#customer-info-check-info').empty();
|
||||
$('#customer-info-type').val('1');
|
||||
$('#customer').val('');
|
||||
@@ -1061,6 +1098,11 @@ $(document).ready(function () {
|
||||
var customer_info_type;
|
||||
var customer_info_type_text;
|
||||
var customer_info_reminder_check = 0;
|
||||
var private = $('.privacy-click');
|
||||
var privateflag = 0;
|
||||
if (private.hasClass('fa-lock')) {
|
||||
privateflag = 1;
|
||||
}
|
||||
var users = [];
|
||||
|
||||
if ($('#allday').is(':checked')) {
|
||||
@@ -1095,6 +1137,7 @@ $(document).ready(function () {
|
||||
description: description,
|
||||
attachments: attachments,
|
||||
users: users,
|
||||
privateflag: privateflag,
|
||||
attendees: $('#calendar-attendees').val(),
|
||||
customer: customer,
|
||||
customer_info_check: customer_info_check,
|
||||
@@ -1149,6 +1192,11 @@ $(document).ready(function () {
|
||||
var customer_info_type;
|
||||
var customer_info_type_text;
|
||||
var customer_info_reminder_check = 0;
|
||||
var private = $('.privacy-click');
|
||||
var privateflag = 0;
|
||||
if (private.hasClass('fa-lock')) {
|
||||
privateflag = 1;
|
||||
}
|
||||
var users = [];
|
||||
|
||||
if ($('#allday').is(':checked')) {
|
||||
@@ -1175,7 +1223,6 @@ $(document).ready(function () {
|
||||
users.push($(this).val());
|
||||
});
|
||||
|
||||
|
||||
$.post(requestUpdateUrl, {
|
||||
id: id,
|
||||
start: start,
|
||||
@@ -1189,6 +1236,7 @@ $(document).ready(function () {
|
||||
description: description,
|
||||
attachments: attachments,
|
||||
users: users,
|
||||
privateflag: privateflag,
|
||||
attendees: $('#calendar-attendees').val(),
|
||||
customer: customer,
|
||||
customer_info_check: customer_info_check,
|
||||
@@ -1650,6 +1698,18 @@ Xinon GMbH`;
|
||||
});
|
||||
|
||||
|
||||
$("body").on("click", ".privacy-click", function (e) {
|
||||
if ($(this).hasClass('fa-unlock')) {
|
||||
$(this).removeClass('fa-unlock');
|
||||
$(this).addClass('fa-lock');
|
||||
$(this).prop('title', 'Privat');
|
||||
} else {
|
||||
$(this).removeClass('fa-lock');
|
||||
$(this).addClass('fa-unlock');
|
||||
$(this).prop('title', 'Normal');
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("keyup", ".cal-group-name-input", function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let groupname = $.trim($(this).val());
|
||||
@@ -1794,6 +1854,7 @@ Xinon GMbH`;
|
||||
calendar.removeAllEvents();
|
||||
let checkbox = $(".calendar-check");
|
||||
let visibleCalendars = [];
|
||||
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||
visibleCalendars.push(0);
|
||||
checkbox.each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
@@ -1856,6 +1917,12 @@ Xinon GMbH`;
|
||||
} else {
|
||||
movable = false;
|
||||
}
|
||||
if (value.privateflag.privateflag == '1' && mycalendar_id!=value.calendar_id.calendar_id) {
|
||||
rights = false;
|
||||
movable = false;
|
||||
|
||||
}
|
||||
|
||||
if (value.allDay.allDay == "1") {
|
||||
allDAy = true;
|
||||
}
|
||||
@@ -1886,6 +1953,7 @@ Xinon GMbH`;
|
||||
textColor: value.txtColor.txtColor,
|
||||
backgroundColor: value.bgColor.bgColor,
|
||||
editable: rights,
|
||||
privateflag: value.privateflag.privateflag,
|
||||
rruleflag: rruleflag,
|
||||
dates: rrule,
|
||||
duration: duration,
|
||||
@@ -1922,6 +1990,7 @@ Xinon GMbH`;
|
||||
textColor: value.txtColor.txtColor,
|
||||
backgroundColor: value.bgColor.bgColor,
|
||||
editable: rights,
|
||||
privateflag: value.privateflag.privateflag,
|
||||
rruleflag: rruleflag,
|
||||
dates: rrule,
|
||||
duration: duration,
|
||||
|
||||
Reference in New Issue
Block a user