Merge branch 'spidev' into 'master'
Spidev See merge request fronk/thetool!1759
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
var hidesearch = [2, 3, 4, 8];
|
||||
var columnfilter = [7];
|
||||
var columnoptions = '<option value=""></option><option value="Offen">Offen</option><option value="Genehmigt">Genehmigt</option><option value="Abgelehnt">Abgelehnt</option>';
|
||||
var localsorageEvent=null;
|
||||
var localsorageEvent = null;
|
||||
const fileTypeClasses = {
|
||||
'image/png': 'fa-file-png',
|
||||
'image/jpeg': 'fa-file-jpg',
|
||||
@@ -1227,12 +1227,6 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
console.error('Connection aborted');
|
||||
}
|
||||
$(document).ready(function () {
|
||||
let create_event = localStorage.getItem('Calendar_create');
|
||||
if (create_event) {
|
||||
localsorageEvent = JSON.parse(create_event);
|
||||
$('#EventModal').modal('show');
|
||||
}
|
||||
|
||||
|
||||
|
||||
let eventdialog = $('#EventModal').html();
|
||||
@@ -1289,6 +1283,7 @@ $(document).ready(function () {
|
||||
// Sobald der Link-Dialog geschlossen wird, fügen wir die "modal-open"-Klasse wieder hinzu, falls noch ein Modal offen ist.
|
||||
$('#EventModal').on('hidden.bs.modal', function (event) {
|
||||
tinymce.activeEditor.setContent('');
|
||||
localStorage.removeItem('Calendar_create');
|
||||
});
|
||||
|
||||
|
||||
@@ -1353,11 +1348,25 @@ $(document).ready(function () {
|
||||
$('.show-attendee').hide();
|
||||
$('#add-event').show();
|
||||
$('#attachments').data('newkey', Math.floor(Math.random() * 10000));
|
||||
if (localsorageEvent)
|
||||
{
|
||||
console.log('cool');
|
||||
console.log(localsorageEvent.location);
|
||||
if (localsorageEvent) {
|
||||
$('#type').val(localsorageEvent.type).trigger('change');
|
||||
$('#location').val(localsorageEvent.location);
|
||||
$('#name').val(localsorageEvent.subject);
|
||||
const datetime = localsorageEvent.cstart.split(' ');
|
||||
$('#start-date').val(datetime[0]);
|
||||
$('#start-time').val(datetime[1]);
|
||||
const datetimeend = localsorageEvent.cend.split(' ');
|
||||
$('#end-date').val(datetimeend[0]);
|
||||
$('#end-time').val(datetimeend[1]);
|
||||
if (localsorageEvent.customer_phone)
|
||||
{
|
||||
$('#customer-info-type').val('2').trigger('change');
|
||||
$('#customer-info-type-text').val(localsorageEvent.customer_phone);
|
||||
} else if (localsorageEvent.customer_email)
|
||||
{
|
||||
$('#customer-info-type').val('1').trigger('change');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
tinymce.init({
|
||||
@@ -1382,7 +1391,11 @@ $(document).ready(function () {
|
||||
content_style: "body { font-family: 'Calibri', sans-serif; }",
|
||||
font_family_formats: "Calibri=Calibri, sans-serif;Arial=arial,sans-serif; Courier New=courier new,courier,monospace; Georgia=georgia,palatino,serif; Helvetica=helvetica,sans-serif; Lucida Sans=lucida sans unicode,sans-serif; Tahoma=tahoma,arial,helvetica,sans-serif; Times New Roman=times new roman,times,serif",
|
||||
setup: function (editor) {
|
||||
|
||||
editor.on('init', function () {
|
||||
if (localsorageEvent) {
|
||||
this.setContent(localsorageEvent.description || '');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$('body').on('click', '#add-event', function () {
|
||||
@@ -1487,7 +1500,6 @@ $(document).ready(function () {
|
||||
rruleData.rrule_until = $('#rrule-until').val();
|
||||
}
|
||||
|
||||
|
||||
$.post(requestInsertUrl, {
|
||||
start: start,
|
||||
end: end,
|
||||
@@ -1514,6 +1526,7 @@ $(document).ready(function () {
|
||||
}, function (data) {
|
||||
|
||||
}).done(function (data) {
|
||||
localStorage.removeItem('Calendar_create');
|
||||
});
|
||||
$('#EventModal').modal('hide');
|
||||
});
|
||||
@@ -2884,6 +2897,10 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
let create_event = localStorage.getItem('Calendar_create');
|
||||
if (create_event) {
|
||||
localsorageEvent = JSON.parse(create_event);
|
||||
$('#EventModal').modal('show');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user