Merge branch 'spidev' into 'master'
Kalender See merge request fronk/thetool!713
This commit is contained in:
@@ -43,6 +43,26 @@ class CalendarModel
|
||||
|
||||
public static $specialCalendarColors = array(997 => '#bd0000', 998 => '#8000A3', 999 => '#08769b');
|
||||
|
||||
|
||||
public static function replace_unicode_sequences($string)
|
||||
{
|
||||
$unicode_map = [
|
||||
'\u00f6' => 'ö',
|
||||
'\u00fc' => 'ü',
|
||||
'\u00e4' => 'ä',
|
||||
'\u00df' => 'ß',
|
||||
'\u00e9' => 'é',
|
||||
'\u00e0' => 'à',
|
||||
'\u00f3' => 'ó',
|
||||
// Weitere Unicode-Zuordnungen können hier hinzugefügt werden
|
||||
];
|
||||
|
||||
foreach ($unicode_map as $unicode => $char) {
|
||||
$string = str_replace($unicode, $char, $string);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
public static function dbKalender()
|
||||
{
|
||||
if (!TT_CALENDAR_ENABLE) {
|
||||
@@ -310,9 +330,10 @@ class CalendarModel
|
||||
$attendees = json_decode($data['attendees'], true);
|
||||
$organizer = json_decode($data['organizer'], true);
|
||||
foreach ($attendees as $key => $value) {
|
||||
if ($key == "required" || $key == "optional") {
|
||||
|
||||
foreach ($value as $attendeekey => $attendee) {
|
||||
// echo $attendee['name'];
|
||||
$attendee['name'] = self::replace_unicode_sequences($attendee['name']);
|
||||
if ($attendee['email'] == $organizer['email']) {
|
||||
|
||||
} elseif ($Allcalendar[$attendee['name']] && $Allcalendar[$attendee['name']] == $data['calendar_id']) {
|
||||
@@ -324,6 +345,11 @@ class CalendarModel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$data['accepted'] && $data['busy'] == 1) {
|
||||
$data['accepted']['ok']=1;
|
||||
$data['accepted']=json_encode($data['accepted']);
|
||||
}
|
||||
|
||||
$rows = array(
|
||||
'id' => array('id' => $data['id'], 'order' => $data['id']),
|
||||
|
||||
@@ -372,10 +372,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
let accepted = data.data.accepted.accepted;
|
||||
if (accepted) {
|
||||
const accept = JSON.parse(accepted);
|
||||
if (accept.time) {
|
||||
const datetime = new Date(accept.time * 1000);
|
||||
const germanDateTime = datetime.toLocaleString('de-DE');
|
||||
$('.accepted-status').addClass('fa-circle-check');
|
||||
$('.accepted-status').prop('title', accept.user + ' (' + germanDateTime + ')');
|
||||
}
|
||||
$('.accepted-status').addClass('fa-circle-check');
|
||||
$('.event-accepted').text('Akzeptiert');
|
||||
} else {
|
||||
$('.accepted-status').addClass('fa-circle-info');
|
||||
|
||||
Reference in New Issue
Block a user