Merge branch 'spidev' into 'master'
Kalender See merge request fronk/thetool!779
This commit is contained in:
@@ -102,18 +102,20 @@ endforeach;
|
|||||||
<div id="calendar-side-div" class="col-12 col-lg-2">
|
<div id="calendar-side-div" class="col-12 col-lg-2">
|
||||||
<div class="calendar-side-borders-main">
|
<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"
|
<div class="add-cal-group-div"><i title="Kalendergruppe hinzufügen"
|
||||||
class="fa-duotone fa-solid fa-rectangle-history-circle-plus"></i>
|
class="fa-duotone fa-solid fa-rectangle-history-circle-plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</h3>
|
</h3>
|
||||||
<?php
|
<?php
|
||||||
if ($Calendar[0]->groups) : ?>
|
if ($Calendar[0]->groups) :
|
||||||
|
$Rights = $rights;
|
||||||
|
|
||||||
|
?>
|
||||||
<div class="add-cal-group-div-sub">
|
<div class="add-cal-group-div-sub">
|
||||||
<?php
|
<?php
|
||||||
$groups = json_decode($Calendar[0]->groups, true);
|
$groups = json_decode($Calendar[0]->groups, true);
|
||||||
foreach ($groups as $group) :
|
foreach ($groups as $group) :
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="calendar-side-borders-sub mb-2" data-origin="<?= $group['origin'] ?>">
|
<div class="calendar-side-borders-sub mb-2" data-origin="<?= $group['origin'] ?>">
|
||||||
@@ -131,7 +133,10 @@ endforeach;
|
|||||||
</h5>
|
</h5>
|
||||||
<div class="calendar-side-borders-sub-inner <?= ($group['origin']) ? 'data-origin-' . $group['origin'] : '' ?>"
|
<div class="calendar-side-borders-sub-inner <?= ($group['origin']) ? 'data-origin-' . $group['origin'] : '' ?>"
|
||||||
style="<?= ($group['show']) ? '' : 'display:none;' ?>">
|
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"
|
<div class="form-check text-left ml-2"
|
||||||
data-origin="<?= $calendar['origin'] ?>">
|
data-origin="<?= $calendar['origin'] ?>">
|
||||||
<input data-calendar_id="<?= $calendar['calendar_id'] ?>"
|
<input data-calendar_id="<?= $calendar['calendar_id'] ?>"
|
||||||
@@ -154,10 +159,52 @@ endforeach;
|
|||||||
<?= ($CalendarAll[$calendar['calendar_id']]->user->name) ?: $specialCalendars[$calendar['calendar_id']] ?>
|
<?= ($CalendarAll[$calendar['calendar_id']]->user->name) ?: $specialCalendars[$calendar['calendar_id']] ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach;
|
<?php endforeach;
|
||||||
|
var_dump($Rights);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
@@ -255,11 +302,13 @@ endforeach;
|
|||||||
<!-- type="checkbox" value="">-->
|
<!-- type="checkbox" value="">-->
|
||||||
<!-- <input data-calendar_id="999" type="color"-->
|
<!-- <input data-calendar_id="999" type="color"-->
|
||||||
<!-- class="form-control-color color-input"-->
|
<!-- class="form-control-color color-input"-->
|
||||||
<!-- value="--><?php //= ($Calendar_colors[999]['bgcolor']) ?: $specialCalendarColors[999] ?><!--"-->
|
<!-- value="-->
|
||||||
|
<?php //= ($Calendar_colors[999]['bgcolor']) ?: $specialCalendarColors[999] ?><!--"-->
|
||||||
<!-- title="Hintergrundfarbe">-->
|
<!-- title="Hintergrundfarbe">-->
|
||||||
<!-- <input data-calendar_id="999" type="color"-->
|
<!-- <input data-calendar_id="999" type="color"-->
|
||||||
<!-- class="form-control-color color-text-input"-->
|
<!-- class="form-control-color color-text-input"-->
|
||||||
<!-- value="--><?php //= ($Calendar_colors[999]['txtcolor']) ? $Calendar_colors[999]['txtcolor'] : '#ffffff' ?><!--"-->
|
<!-- value="-->
|
||||||
|
<?php //= ($Calendar_colors[999]['txtcolor']) ? $Calendar_colors[999]['txtcolor'] : '#ffffff' ?><!--"-->
|
||||||
<!-- title="Textfarbe">-->
|
<!-- title="Textfarbe">-->
|
||||||
<!-- <label class="calendar-side-label" for="" style="margin-top:2px;">-->
|
<!-- <label class="calendar-side-label" for="" style="margin-top:2px;">-->
|
||||||
<!-- Abwesenheiten-->
|
<!-- Abwesenheiten-->
|
||||||
@@ -339,17 +388,18 @@ endforeach;
|
|||||||
<input type="text" class="form-control is-require eventmodal-input" id="name">
|
<input type="text" class="form-control is-require eventmodal-input" id="name">
|
||||||
</div>
|
</div>
|
||||||
</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="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">
|
<select class="form-control form-select" aria-label="Default select" id="type">
|
||||||
<option value="1">Termin</option>
|
<option value="1">Termin</option>
|
||||||
<option value="2">IBN</option>
|
<option value="2">IBN</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
@@ -361,11 +411,10 @@ endforeach;
|
|||||||
<input type="text" class="form-control eventmodal-input" id="location">
|
<input type="text" class="form-control eventmodal-input" id="location">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-1 text-right">
|
<div class="col-4">
|
||||||
<label for="location" class="col-form-label fw-medium ">Anzeige</label>
|
<div class="input-group mb-2">
|
||||||
</div>
|
<span title="Erinnerung" class="input-group-text spanwidht"><i
|
||||||
<div class="col-3">
|
class="fa-regular fa-eye"></i></span>
|
||||||
<div class="mb-2">
|
|
||||||
<select class="form-control form-select" aria-label="Default select" id="busy">
|
<select class="form-control form-select" aria-label="Default select" id="busy">
|
||||||
<option value="1">gebucht</option>
|
<option value="1">gebucht</option>
|
||||||
<option value="0">frei</option>
|
<option value="0">frei</option>
|
||||||
@@ -373,7 +422,6 @@ endforeach;
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
@@ -439,7 +487,6 @@ endforeach;
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row justify-content-center mt-2">
|
<div class="row justify-content-center mt-2">
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ class CalendarApicontroller extends mfBaseApicontroller
|
|||||||
$now = floor(microtime(true) * 1000);
|
$now = floor(microtime(true) * 1000);
|
||||||
$timenow = time();
|
$timenow = time();
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
$colors = $redis->get('thetool_calendar_usercolors_' . $decstring);
|
$colors = $redis->get('thetool_calendar_usercolors_' . $decstring);
|
||||||
if ($colors) {
|
if ($colors) {
|
||||||
$calendarColors = json_decode($colors, true);
|
$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]['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]['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]['event_type'] = $Calendarevent['data'][0]['event_type']['event_type'];
|
||||||
$message[0]['attachment'] = $Calendarevent['data'][0]['attachment']['attachment'];
|
$message[0]['attachment'] = $Calendarevent['data'][0]['attachment']['attachment'];
|
||||||
$message[0]['attachments'] = $Calendarevent['data'][0]['attachments']['attachments'];
|
$message[0]['attachments'] = $Calendarevent['data'][0]['attachments']['attachments'];
|
||||||
$message[0]['calendar_name'] = $Calendarevent['data'][0]['calendar_name']['calendar_name'];
|
$message[0]['calendar_name'] = $Calendarevent['data'][0]['calendar_name']['calendar_name'];
|
||||||
$message[0]['isorganizer'] = $Calendarevent['data'][0]['isorganizer']['isorganizer'];
|
$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]['rrule'] = $Calendarevent['data'][0]['rrule']['rrule'];
|
||||||
$message[0]['duration'] = $Calendarevent['data'][0]['duration']['duration'];
|
$message[0]['duration'] = $Calendarevent['data'][0]['duration']['duration'];
|
||||||
$message[0]['mtime'] = $Calendarevent['data'][0]['mtime']['mtime'];
|
$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]['bgColor'] = $calendarColors[$json['calendar_id']]['bgcolor'];
|
||||||
$message[0]['txtColor'] = $calendarColors[$json['calendar_id']]['txtcolor'];
|
$message[0]['txtColor'] = $calendarColors[$json['calendar_id']]['txtcolor'];
|
||||||
$message[0]['rights'] = $rights[$json['calendar_id']];
|
$message[0]['rights'] = $rights[$json['calendar_id']];
|
||||||
|
$message[0]['me'] = $decstring;
|
||||||
|
|
||||||
$result = json_encode($message);
|
$result = json_encode($message);
|
||||||
if (in_array($message[0]['calendar_id'], $allowedCalendar)) {
|
if (in_array($message[0]['calendar_id'], $allowedCalendar)) {
|
||||||
|
|||||||
@@ -237,9 +237,20 @@ class CalendarModel
|
|||||||
$txtcolor = "#000";
|
$txtcolor = "#000";
|
||||||
$colorCounter++;
|
$colorCounter++;
|
||||||
}
|
}
|
||||||
|
$location=$data['location'];
|
||||||
|
$eventtype=$data['event_type'];
|
||||||
|
$description=$data['description'];
|
||||||
if ($calenderRights[$data['calendar_id']]) {
|
if ($calenderRights[$data['calendar_id']]) {
|
||||||
$rights = $calenderRights[$data['calendar_id']];
|
$rights = $calenderRights[$data['calendar_id']];
|
||||||
$CalendarUsers[$data['calendar_id']] = $data['calendar_name'];
|
$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(
|
$rows[] = array(
|
||||||
'id' => array('id' => $data['id']),
|
'id' => array('id' => $data['id']),
|
||||||
'cstart' => array('cstart' => $starttime),
|
'cstart' => array('cstart' => $starttime),
|
||||||
@@ -250,14 +261,15 @@ class CalendarModel
|
|||||||
'bgColor' => array('bgColor' => $bgcolor),
|
'bgColor' => array('bgColor' => $bgcolor),
|
||||||
'txtColor' => array('txtColor' => $txtcolor),
|
'txtColor' => array('txtColor' => $txtcolor),
|
||||||
'rights' => array('rights' => $rights, 'order' => $rights),
|
'rights' => array('rights' => $rights, 'order' => $rights),
|
||||||
'location' => array('location' => $data['location']),
|
'location' => array('location' => $location),
|
||||||
'busy' => array('busy' => $data['busy']),
|
'busy' => array('busy' => $data['busy']),
|
||||||
|
'privateflag' => array('privateflag' => $data['private']),
|
||||||
'allDay' => array('allDay' => $data['all_day_event']),
|
'allDay' => array('allDay' => $data['all_day_event']),
|
||||||
'rrule' => array('rrule' => $rrule),
|
'rrule' => array('rrule' => $rrule),
|
||||||
'rrule_events' => array('rrule_events' => $rrule_events),
|
'rrule_events' => array('rrule_events' => $rrule_events),
|
||||||
'duration' => array('duration' => $duration),
|
'duration' => array('duration' => $duration),
|
||||||
'event_type' => array('event_type' => $data['event_type']),
|
'event_type' => array('event_type' => $eventtype),
|
||||||
'description' => array('description' => ($data['description'])),
|
'description' => array('description' => ($description)),
|
||||||
'attachment' => array('attachment' => $attachment),
|
'attachment' => array('attachment' => $attachment),
|
||||||
'attachments' => array('attachments' => $attachmentLinks),
|
'attachments' => array('attachments' => $attachmentLinks),
|
||||||
'calendar_name' => array('calendar_name' => $data['calendar_name']),
|
'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' => array('customer_info' => $data['customer_info']),
|
||||||
'customer_info_send' => array('customer_info_send' => $data['customer_info_send']),
|
'customer_info_send' => array('customer_info_send' => $data['customer_info_send']),
|
||||||
'customer_info_reminder' => array('customer_info_reminder' => $data['customer_info_reminder']),
|
'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']),
|
'isorganizer' => array('isorganizer' => $data['is_organizer']),
|
||||||
'attendees' => array('attendees' => json_encode($AttendeeArray)),
|
'attendees' => array('attendees' => json_encode($AttendeeArray)),
|
||||||
'organizer' => array('organizer' => $data['organizer']),
|
'organizer' => array('organizer' => $data['organizer']),
|
||||||
@@ -539,6 +552,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
$busy = ($r->busy);
|
$busy = ($r->busy);
|
||||||
$users = ($r->users);
|
$users = ($r->users);
|
||||||
$attendees = ($r->attendees);
|
$attendees = ($r->attendees);
|
||||||
|
$privateflag=($r->privateflag);
|
||||||
foreach ($users as $key => $value) {
|
foreach ($users as $key => $value) {
|
||||||
$user_id = $value;
|
$user_id = $value;
|
||||||
}
|
}
|
||||||
@@ -573,6 +587,9 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
if (isset($allday))
|
if (isset($allday))
|
||||||
$updateArray['all_day_event'] = $allday;
|
$updateArray['all_day_event'] = $allday;
|
||||||
|
|
||||||
|
if (isset($privateflag))
|
||||||
|
$updateArray['private'] = $privateflag;
|
||||||
|
|
||||||
if (isset($reminder)) {
|
if (isset($reminder)) {
|
||||||
if ($reminder == 'NULL')
|
if ($reminder == 'NULL')
|
||||||
$updateArray['reminder'] = NULL;
|
$updateArray['reminder'] = NULL;
|
||||||
@@ -733,6 +750,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
$users = ($r->users);
|
$users = ($r->users);
|
||||||
$customer_info_reminder_check = 0;
|
$customer_info_reminder_check = 0;
|
||||||
$attendees = ($r->attendees);
|
$attendees = ($r->attendees);
|
||||||
|
$privateflag=($r->privateflag);
|
||||||
date_default_timezone_set('Europe/Berlin');
|
date_default_timezone_set('Europe/Berlin');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
foreach ($users as $key => $value) {
|
foreach ($users as $key => $value) {
|
||||||
@@ -771,7 +789,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
$customer_info_send = NULL;
|
$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);
|
$db->insert("cal_events", $dataarray);
|
||||||
$event_id = $dataarray['uuid'];
|
$event_id = $dataarray['uuid'];
|
||||||
|
|||||||
@@ -7,11 +7,13 @@
|
|||||||
padding: 1px 5px;
|
padding: 1px 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fc-timegrid-event-short .fc-event-main-frame {
|
.fc-timegrid-event-short .fc-event-main-frame {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fc-toolbar {
|
.fc-toolbar {
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -311,6 +313,12 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
|||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fc-event-attachment-mr {
|
||||||
|
position: absolute;
|
||||||
|
right: 11px;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.fc-event-type {
|
.fc-event-type {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -322,6 +330,15 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
|||||||
bottom: -4px;
|
bottom: -4px;
|
||||||
left: -4px;
|
left: -4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fc-event-private {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
right: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.fc-timegrid-event-short .fc-event-time::after {
|
.fc-timegrid-event-short .fc-event-time::after {
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
@@ -612,3 +629,22 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
|||||||
color: #0600ff;
|
color: #0600ff;
|
||||||
cursor: pointer;
|
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 () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
let checkbox = $(".form-check-input");
|
let checkbox = $(".form-check-input");
|
||||||
let visibleCalendars = [];
|
let visibleCalendars = [];
|
||||||
|
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||||
visibleCalendars.push(0);
|
visibleCalendars.push(0);
|
||||||
checkbox.each(function () {
|
checkbox.each(function () {
|
||||||
if ($(this).prop('checked')) {
|
if ($(this).prop('checked')) {
|
||||||
@@ -116,6 +117,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
} else {
|
} else {
|
||||||
rights = false;
|
rights = false;
|
||||||
}
|
}
|
||||||
|
if (value.privateflag.privateflag == '1' && mycalendar_id!=value.calendar_id.calendar_id) {
|
||||||
|
rights = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (value.isorganizer.isorganizer == '1' && rights) {
|
if (value.isorganizer.isorganizer == '1' && rights) {
|
||||||
movable = true;
|
movable = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -150,6 +157,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
|
privateflag: value.privateflag.privateflag,
|
||||||
editable: rights,
|
editable: rights,
|
||||||
rruleflag: rruleflag,
|
rruleflag: rruleflag,
|
||||||
dates: rrule,
|
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],
|
classNames: ['cal-class-group-' + value.calendar_id.calendar_id, 'cal-class-id-' + value.id.id],
|
||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
|
privateflag: value.privateflag.privateflag,
|
||||||
editable: rights,
|
editable: rights,
|
||||||
rruleflag: rruleflag,
|
rruleflag: rruleflag,
|
||||||
dates: rrule,
|
dates: rrule,
|
||||||
@@ -370,6 +379,13 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
} else {
|
} else {
|
||||||
$('#reminder').val('NULL');
|
$('#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);
|
$('#type').val(data.data.type.type);
|
||||||
$('#busy').val(data.data.busy.busy);
|
$('#busy').val(data.data.busy.busy);
|
||||||
isOrganizer = data.data.isorganizer.isorganizer;
|
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>';
|
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 ($('.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') {
|
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>");
|
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']) {
|
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>");
|
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, {
|
var tooltip = new Tooltip(info.el, {
|
||||||
@@ -784,6 +808,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
// document.getElementById('result').innerHTML += e.data + '<br>';
|
// document.getElementById('result').innerHTML += e.data + '<br>';
|
||||||
let checkbox = $(".form-check-input");
|
let checkbox = $(".form-check-input");
|
||||||
let visibleCalendars = [];
|
let visibleCalendars = [];
|
||||||
|
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||||
visibleCalendars.push(0);
|
visibleCalendars.push(0);
|
||||||
checkbox.each(function () {
|
checkbox.each(function () {
|
||||||
if ($(this).prop('checked')) {
|
if ($(this).prop('checked')) {
|
||||||
@@ -817,6 +842,11 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
} else {
|
} else {
|
||||||
movable = false;
|
movable = false;
|
||||||
}
|
}
|
||||||
|
if (event.privateflag == '1' && mycalendar_id!=event.calendar_id_check) {
|
||||||
|
rights = false;
|
||||||
|
movable = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (event.change_type == '2' && cevent) {
|
if (event.change_type == '2' && cevent) {
|
||||||
@@ -838,6 +868,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
attachment: event.attachment,
|
attachment: event.attachment,
|
||||||
attachments: event.attachments,
|
attachments: event.attachments,
|
||||||
editable: movable,
|
editable: movable,
|
||||||
|
privateflag: event.privateflag,
|
||||||
rruleflag: rruleflag,
|
rruleflag: rruleflag,
|
||||||
rrule: rrule,
|
rrule: rrule,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
@@ -868,6 +899,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
attachments: event.attachments,
|
attachments: event.attachments,
|
||||||
calendar_id: event.calendar_id_check,
|
calendar_id: event.calendar_id_check,
|
||||||
resourceId: event.calendar_id,
|
resourceId: event.calendar_id,
|
||||||
|
privateflag: event.privateflag,
|
||||||
calendar_name: event.calendar_name,
|
calendar_name: event.calendar_name,
|
||||||
clickable: rights,
|
clickable: rights,
|
||||||
mtime: event.mtime,
|
mtime: event.mtime,
|
||||||
@@ -892,6 +924,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
textColor: event.txtColor,
|
textColor: event.txtColor,
|
||||||
backgroundColor: event.bgColor,
|
backgroundColor: event.bgColor,
|
||||||
location: event.location,
|
location: event.location,
|
||||||
|
privateflag: event.privateflag,
|
||||||
event_type: event.event_type,
|
event_type: event.event_type,
|
||||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
||||||
attachment: event.attachment,
|
attachment: event.attachment,
|
||||||
@@ -918,6 +951,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
color: '#ab0000',
|
color: '#ab0000',
|
||||||
editable: false,
|
editable: false,
|
||||||
location: event.location,
|
location: event.location,
|
||||||
|
privateflag: event.privateflag,
|
||||||
event_type: event.event_type,
|
event_type: event.event_type,
|
||||||
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
classNames: ['cal-class-group-' + event.calendar_id, 'cal-class-id-' + event.cal_events_id],
|
||||||
attachment: event.attachment,
|
attachment: event.attachment,
|
||||||
@@ -986,6 +1020,9 @@ $(document).ready(function () {
|
|||||||
$('.attachment-div').empty();
|
$('.attachment-div').empty();
|
||||||
$('#reminder').val('NULL');
|
$('#reminder').val('NULL');
|
||||||
$('#type').val('1');
|
$('#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-check-info').empty();
|
||||||
$('#customer-info-type').val('1');
|
$('#customer-info-type').val('1');
|
||||||
$('#customer').val('');
|
$('#customer').val('');
|
||||||
@@ -1061,6 +1098,11 @@ $(document).ready(function () {
|
|||||||
var customer_info_type;
|
var customer_info_type;
|
||||||
var customer_info_type_text;
|
var customer_info_type_text;
|
||||||
var customer_info_reminder_check = 0;
|
var customer_info_reminder_check = 0;
|
||||||
|
var private = $('.privacy-click');
|
||||||
|
var privateflag = 0;
|
||||||
|
if (private.hasClass('fa-lock')) {
|
||||||
|
privateflag = 1;
|
||||||
|
}
|
||||||
var users = [];
|
var users = [];
|
||||||
|
|
||||||
if ($('#allday').is(':checked')) {
|
if ($('#allday').is(':checked')) {
|
||||||
@@ -1095,6 +1137,7 @@ $(document).ready(function () {
|
|||||||
description: description,
|
description: description,
|
||||||
attachments: attachments,
|
attachments: attachments,
|
||||||
users: users,
|
users: users,
|
||||||
|
privateflag: privateflag,
|
||||||
attendees: $('#calendar-attendees').val(),
|
attendees: $('#calendar-attendees').val(),
|
||||||
customer: customer,
|
customer: customer,
|
||||||
customer_info_check: customer_info_check,
|
customer_info_check: customer_info_check,
|
||||||
@@ -1149,6 +1192,11 @@ $(document).ready(function () {
|
|||||||
var customer_info_type;
|
var customer_info_type;
|
||||||
var customer_info_type_text;
|
var customer_info_type_text;
|
||||||
var customer_info_reminder_check = 0;
|
var customer_info_reminder_check = 0;
|
||||||
|
var private = $('.privacy-click');
|
||||||
|
var privateflag = 0;
|
||||||
|
if (private.hasClass('fa-lock')) {
|
||||||
|
privateflag = 1;
|
||||||
|
}
|
||||||
var users = [];
|
var users = [];
|
||||||
|
|
||||||
if ($('#allday').is(':checked')) {
|
if ($('#allday').is(':checked')) {
|
||||||
@@ -1175,7 +1223,6 @@ $(document).ready(function () {
|
|||||||
users.push($(this).val());
|
users.push($(this).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$.post(requestUpdateUrl, {
|
$.post(requestUpdateUrl, {
|
||||||
id: id,
|
id: id,
|
||||||
start: start,
|
start: start,
|
||||||
@@ -1189,6 +1236,7 @@ $(document).ready(function () {
|
|||||||
description: description,
|
description: description,
|
||||||
attachments: attachments,
|
attachments: attachments,
|
||||||
users: users,
|
users: users,
|
||||||
|
privateflag: privateflag,
|
||||||
attendees: $('#calendar-attendees').val(),
|
attendees: $('#calendar-attendees').val(),
|
||||||
customer: customer,
|
customer: customer,
|
||||||
customer_info_check: customer_info_check,
|
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) {
|
$("body").on("keyup", ".cal-group-name-input", function (e) {
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
let groupname = $.trim($(this).val());
|
let groupname = $.trim($(this).val());
|
||||||
@@ -1794,6 +1854,7 @@ Xinon GMbH`;
|
|||||||
calendar.removeAllEvents();
|
calendar.removeAllEvents();
|
||||||
let checkbox = $(".calendar-check");
|
let checkbox = $(".calendar-check");
|
||||||
let visibleCalendars = [];
|
let visibleCalendars = [];
|
||||||
|
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||||
visibleCalendars.push(0);
|
visibleCalendars.push(0);
|
||||||
checkbox.each(function () {
|
checkbox.each(function () {
|
||||||
if ($(this).prop('checked')) {
|
if ($(this).prop('checked')) {
|
||||||
@@ -1856,6 +1917,12 @@ Xinon GMbH`;
|
|||||||
} else {
|
} else {
|
||||||
movable = false;
|
movable = false;
|
||||||
}
|
}
|
||||||
|
if (value.privateflag.privateflag == '1' && mycalendar_id!=value.calendar_id.calendar_id) {
|
||||||
|
rights = false;
|
||||||
|
movable = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (value.allDay.allDay == "1") {
|
if (value.allDay.allDay == "1") {
|
||||||
allDAy = true;
|
allDAy = true;
|
||||||
}
|
}
|
||||||
@@ -1886,6 +1953,7 @@ Xinon GMbH`;
|
|||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
editable: rights,
|
editable: rights,
|
||||||
|
privateflag: value.privateflag.privateflag,
|
||||||
rruleflag: rruleflag,
|
rruleflag: rruleflag,
|
||||||
dates: rrule,
|
dates: rrule,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
@@ -1922,6 +1990,7 @@ Xinon GMbH`;
|
|||||||
textColor: value.txtColor.txtColor,
|
textColor: value.txtColor.txtColor,
|
||||||
backgroundColor: value.bgColor.bgColor,
|
backgroundColor: value.bgColor.bgColor,
|
||||||
editable: rights,
|
editable: rights,
|
||||||
|
privateflag: value.privateflag.privateflag,
|
||||||
rruleflag: rruleflag,
|
rruleflag: rruleflag,
|
||||||
dates: rrule,
|
dates: rrule,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
|
|||||||
Reference in New Issue
Block a user