Merge branch 'spidev' into 'master'
Kalender See merge request fronk/thetool!688
This commit is contained in:
@@ -312,7 +312,7 @@ endforeach;
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="EventModal" tabindex="-1" aria-labelledby="EventModalLabel" aria-hidden="true">
|
<div class="modal fade" id="EventModal" aria-labelledby="EventModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -435,28 +435,25 @@ endforeach;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php if (count($rights) > 1) : ?>
|
<div class="row justify-content-center mt-2">
|
||||||
<div class="row justify-content-center mt-2">
|
<div class="col-2">
|
||||||
<div class="col-2">
|
<label for="name" class="col-form-label fw-medium ">Kalender</label>
|
||||||
<label for="name" class="col-form-label fw-medium ">Kalender</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-8">
|
|
||||||
<select class="form-control form-select select2-multiple" id="calendar-users"
|
|
||||||
name="calendar-users"
|
|
||||||
>
|
|
||||||
<?php foreach ($CalArray as $key => $value) :
|
|
||||||
if ($rights[$value] != "all") continue;
|
|
||||||
if ($value != $Calendar[0]->go_calendar_id) : ?>
|
|
||||||
<option value="<?= $value ?>"><?= $key ?></option>
|
|
||||||
<?php else : ?>
|
|
||||||
<option data-mainuser="1" selected="selected"
|
|
||||||
value="<?= $value ?>"><?= $key ?></option>
|
|
||||||
<?php endif;
|
|
||||||
endforeach; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<div class="col-8">
|
||||||
|
<select class="form-control form-select select2-multiple" id="calendar-users"
|
||||||
|
name="calendar-users">
|
||||||
|
<?php foreach ($CalArray as $key => $value) :
|
||||||
|
if ($rights[$value] != "all") continue;
|
||||||
|
if ($value != $Calendar[0]->go_calendar_id) : ?>
|
||||||
|
<option value="<?= $value ?>"><?= $key ?></option>
|
||||||
|
<?php else : ?>
|
||||||
|
<option data-mainuser="1" selected="selected"
|
||||||
|
value="<?= $value ?>"><?= $key ?></option>
|
||||||
|
<?php endif;
|
||||||
|
endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row justify-content-center mt-2">
|
<div class="row justify-content-center mt-2">
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<label for="name" class="col-form-label fw-medium ">Teilnehmer</label>
|
<label for="name" class="col-form-label fw-medium ">Teilnehmer</label>
|
||||||
@@ -563,6 +560,13 @@ endforeach;
|
|||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-success" id="add-event">Hinzufügen</button>
|
<button type="button" class="btn btn-success" id="add-event">Hinzufügen</button>
|
||||||
|
<button style="display:none" type="button" class="btn btn-success show-attendee" id="add-event">
|
||||||
|
Zusagen
|
||||||
|
</button>
|
||||||
|
<button style="display:none" type="button" class="btn btn-danger show-attendee" id="add-event">
|
||||||
|
Absagen
|
||||||
|
</button>
|
||||||
|
|
||||||
<button style="display:none" type="button" class="btn btn-success show-update" id="update-event">
|
<button style="display:none" type="button" class="btn btn-success show-update" id="update-event">
|
||||||
Speichern
|
Speichern
|
||||||
</button>
|
</button>
|
||||||
@@ -575,6 +579,7 @@ endforeach;
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="output"></div>
|
<div id="output"></div>
|
||||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>plugins/select2/js/i18n/de.js"></script>
|
<script type="text/javascript" src="<?= self::getResourcePath() ?>plugins/select2/js/i18n/de.js"></script>
|
||||||
<script>
|
<script>
|
||||||
@@ -590,7 +595,7 @@ endforeach;
|
|||||||
let requestUpdateUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'updateCalendarEvent']) ?>";
|
let requestUpdateUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'updateCalendarEvent']) ?>";
|
||||||
let requestUpdateColorUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'updateCalendarColor']) ?>";
|
let requestUpdateColorUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'updateCalendarColor']) ?>";
|
||||||
let requestDeleteUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'deleteCalendarEvent']) ?>";
|
let requestDeleteUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'deleteCalendarEvent']) ?>";
|
||||||
let requestUpdateEventsUrl = "https://thetool-dev.xinon.at/api/v1/calendar/calendarStream?user=<?= $encryptedUser ?>";
|
let requestUpdateEventsUrl = "<?= self::getUrl("api/v1/calendar")?>/calendarStream?user=<?= $encryptedUser ?>";
|
||||||
let calendarRights = '<?php echo json_encode($rights); ?>';
|
let calendarRights = '<?php echo json_encode($rights); ?>';
|
||||||
|
|
||||||
var holiDays = [];
|
var holiDays = [];
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
$('#customer').select2({
|
$('#customer').select2({
|
||||||
placeholder: "Kunden Suche",
|
placeholder: "Kunden Suche",
|
||||||
minimumInputLength: 3,
|
minimumInputLength: 3,
|
||||||
dropdownParent: $('#EventModal'),
|
// dropdownParent: $('#EventModal'),
|
||||||
language: "de",
|
language: "de",
|
||||||
ajax: {
|
ajax: {
|
||||||
url: requestAddressUrl,
|
url: requestAddressUrl,
|
||||||
@@ -308,8 +308,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}
|
}
|
||||||
if (isOrganizer == "1") {
|
if (isOrganizer == "1") {
|
||||||
$('.show-update').show();
|
$('.show-update').show();
|
||||||
|
$('.show-attendee').hide();
|
||||||
} else {
|
} else {
|
||||||
$('.show-update').hide();
|
$('.show-update').hide();
|
||||||
|
$('.show-attendee').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -366,8 +368,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
$('#start-time').val(StarteformattedTime);
|
$('#start-time').val(StarteformattedTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#calendar-users').val(info.event.extendedProps.calendar_id.calendar_id).trigger('change');
|
|
||||||
$('#calendar-users').prop("disabled", true);
|
|
||||||
$('#name').val(info.event.title);
|
$('#name').val(info.event.title);
|
||||||
$('#location').val(info.event.extendedProps.location);
|
$('#location').val(info.event.extendedProps.location);
|
||||||
$('#description').val(info.event.extendedProps.description);
|
$('#description').val(info.event.extendedProps.description);
|
||||||
@@ -378,6 +379,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
$('#EventModalLabel .fa-calendar-symbol').removeClass('fa-calendar-circle-plus');
|
$('#EventModalLabel .fa-calendar-symbol').removeClass('fa-calendar-circle-plus');
|
||||||
$('#EventModalLabel .fa-calendar-symbol').addClass('fa-calendar-lines-pen');
|
$('#EventModalLabel .fa-calendar-symbol').addClass('fa-calendar-lines-pen');
|
||||||
$('#add-event').hide();
|
$('#add-event').hide();
|
||||||
|
// $('#calendar-users').select2('destroy');
|
||||||
|
// $('#calendar-users').select2();
|
||||||
|
$('#calendar-users').val(info.event.extendedProps.calendar_id.calendar_id).trigger('change');
|
||||||
|
$('#calendar-users').select2("enable", false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
eventDidMount: function (info) {
|
eventDidMount: function (info) {
|
||||||
@@ -726,7 +731,7 @@ if (typeof (EventSource) !== 'undefined') {
|
|||||||
console.error('Connection aborted');
|
console.error('Connection aborted');
|
||||||
}
|
}
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
let eventdialog = $('#EventModal').html();
|
||||||
$('body').on('click', '.fa-window-maximize', function () {
|
$('body').on('click', '.fa-window-maximize', function () {
|
||||||
$('.card').addClass('card-fullscreen');
|
$('.card').addClass('card-fullscreen');
|
||||||
$('#card-size').removeClass('fa-window-maximize').addClass('fa-window-restore');
|
$('#card-size').removeClass('fa-window-maximize').addClass('fa-window-restore');
|
||||||
@@ -756,7 +761,13 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#EventModal').on('hide.bs.modal', function (event) {
|
||||||
|
// $('.select2-multiple').select2('destroy');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#EventModal').on('show.bs.modal', function (event) {
|
$('#EventModal').on('show.bs.modal', function (event) {
|
||||||
|
|
||||||
$('.attachment-div').empty();
|
$('.attachment-div').empty();
|
||||||
$('#reminder').val('NULL');
|
$('#reminder').val('NULL');
|
||||||
$('#type').val('1');
|
$('#type').val('1');
|
||||||
@@ -774,6 +785,8 @@ $(document).ready(function () {
|
|||||||
$('#EventModal .is-require').each(function (index, value) {
|
$('#EventModal .is-require').each(function (index, value) {
|
||||||
$(this).removeClass('required');
|
$(this).removeClass('required');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// $('.select2-multiple').select2();
|
||||||
$('#calendar-users').prop("disabled", false);
|
$('#calendar-users').prop("disabled", false);
|
||||||
$("#calendar-users option").each(function () {
|
$("#calendar-users option").each(function () {
|
||||||
if ($(this).data('mainuser') == "1") {
|
if ($(this).data('mainuser') == "1") {
|
||||||
@@ -786,6 +799,7 @@ $(document).ready(function () {
|
|||||||
$('#start-time').addClass('is-require');
|
$('#start-time').addClass('is-require');
|
||||||
$('#end-time').addClass('is-require');
|
$('#end-time').addClass('is-require');
|
||||||
$('.show-update').hide();
|
$('.show-update').hide();
|
||||||
|
$('.show-attendee').hide();
|
||||||
$('#add-event').show();
|
$('#add-event').show();
|
||||||
$('#attachments').data('newkey', Math.floor(Math.random() * 10000));
|
$('#attachments').data('newkey', Math.floor(Math.random() * 10000));
|
||||||
});
|
});
|
||||||
@@ -1175,7 +1189,7 @@ $(document).ready(function () {
|
|||||||
$('#customer').select2({
|
$('#customer').select2({
|
||||||
placeholder: "Kunden Suche",
|
placeholder: "Kunden Suche",
|
||||||
minimumInputLength: 3,
|
minimumInputLength: 3,
|
||||||
dropdownParent: $('#EventModal'),
|
// dropdownParent: $('#EventModal'),
|
||||||
language: "de",
|
language: "de",
|
||||||
ajax: {
|
ajax: {
|
||||||
url: requestAddressUrl,
|
url: requestAddressUrl,
|
||||||
@@ -1459,7 +1473,7 @@ Xinon GMbH`;
|
|||||||
filter: '.no-movable',
|
filter: '.no-movable',
|
||||||
delay: 0,
|
delay: 0,
|
||||||
animation: 0,
|
animation: 0,
|
||||||
onSort: function (evt) {
|
onEnd: function (evt) {
|
||||||
$('.calendar-check').eq(0).trigger('change');
|
$('.calendar-check').eq(0).trigger('change');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -1467,16 +1481,19 @@ Xinon GMbH`;
|
|||||||
filter: '.no-movable',
|
filter: '.no-movable',
|
||||||
handle: '.handle',
|
handle: '.handle',
|
||||||
delay: 0,
|
delay: 0,
|
||||||
onSort: function (evt) {
|
onEnd: function (evt) {
|
||||||
$('.calendar-check').eq(0).trigger('change');
|
$('.calendar-check').eq(0).trigger('change');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (firstcall) {
|
if (firstcall) {
|
||||||
$('.color-input').trigger('change', 1);
|
$('.color-input').trigger('change', 1);
|
||||||
}
|
}
|
||||||
$('.select2-multiple').select2({
|
$('.select2-multiple').select2(
|
||||||
dropdownParent: $('#EventModal')
|
{
|
||||||
});
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
$('.select2-multiple-tag').select2(
|
$('.select2-multiple-tag').select2(
|
||||||
{
|
{
|
||||||
tags: true,
|
tags: true,
|
||||||
@@ -1484,6 +1501,14 @@ Xinon GMbH`;
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// $(document).on("select2:opening", (e) => {
|
||||||
|
// $('.modal-body').css('overflow', 'visible');
|
||||||
|
// });
|
||||||
|
// $(document).on("select2:open", (e) => {
|
||||||
|
// $('.modal-body').css('overflow', 'auto');
|
||||||
|
// });
|
||||||
|
// $.fn.select2.defaults.set("dropdownParent", $('#EventModal'));
|
||||||
checkGroupCheckboxes();
|
checkGroupCheckboxes();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user