Kalender Update
* Tinymce für Beschreibungsfeld eingebaut
This commit is contained in:
@@ -34,7 +34,6 @@ endforeach;
|
||||
type="text/css"/>
|
||||
<link href="<?= self::getResourcePath() ?>css/pages/Calendar/View.css?<?= $git_merge_ts ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<link href="<?= self::getResourcePath() ?>plugins/summernote/summernote-bs4.min.css" rel="stylesheet">
|
||||
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/calendar/rrule/rrule.min.js?<?= $git_merge_ts ?>"></script>
|
||||
@@ -649,7 +648,7 @@ endforeach;
|
||||
<div id="output"></div>
|
||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>plugins/select2/js/i18n/de.js?<?= $git_merge_ts ?>"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>plugins/summernote/summernote-bs4.min.js?<?= $git_merge_ts ?>"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>plugins/summernote/lang/summernote-de-DE.min.js?<?= $git_merge_ts ?>"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>plugins/tinymce/tinymce.min.js<?= $git_merge_ts ?>"></script>
|
||||
|
||||
<script>
|
||||
let requestUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getCalendarEvents']) ?>";
|
||||
|
||||
@@ -348,6 +348,7 @@ class CalendarController extends mfBaseController
|
||||
'text' => $value->customer_number . " " . $text . " - " . $value->street . ", " . $value->zip . " " . $value->city,
|
||||
'mail' => $value->email,
|
||||
'mobilenumber' => $mobilenumber,
|
||||
'spin' => $value->spin,
|
||||
'location' => $value->street . ", " . $value->zip . " " . $value->city,
|
||||
'name' => $value->customer_number . " " . $text
|
||||
);
|
||||
|
||||
@@ -714,4 +714,26 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
|
||||
}
|
||||
.fc-event-time {
|
||||
z-index: 100;
|
||||
}
|
||||
.note-editor .dropdown-item {
|
||||
padding: .15rem 1.2rem;
|
||||
}
|
||||
.note-editable p {
|
||||
line-height: 1.2;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.tooltip-description p {
|
||||
margin-bottom: 0;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.note-dropdown-menu {
|
||||
max-height: 250px !important;
|
||||
overflow-y: auto !important;
|
||||
z-index: 99999 !important;
|
||||
}
|
||||
.tox-dialog {
|
||||
z-index: 1060 !important; /* oder ein höherer Wert, je nach Bedarf */
|
||||
}
|
||||
.tox .tox-tbtn--select {
|
||||
max-width: 95px;
|
||||
}
|
||||
@@ -375,6 +375,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
id: info.event.id
|
||||
}, function (data) {
|
||||
}).done(function (data) {
|
||||
if (data.data.description.description) {
|
||||
tinymce.activeEditor.setContent(data.data.description.description);
|
||||
}
|
||||
if (data.data.attachment.attachment) {
|
||||
let docs = "";
|
||||
$.each(data.data.attachments.attachments, function (index, value) {
|
||||
@@ -620,7 +623,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
$('#name').val(info.event.title);
|
||||
$('#location').val(info.event.extendedProps.location);
|
||||
$('#description').val(info.event.extendedProps.description);
|
||||
// $('#description').val(info.event.extendedProps.description);
|
||||
$('#delete-event').data('id', info.event.id);
|
||||
$('#update-event').data('id', info.event.id);
|
||||
$('#EventModalLabel').data('id', info.event.id);
|
||||
@@ -1149,14 +1152,18 @@ $(document).ready(function () {
|
||||
|
||||
}
|
||||
});
|
||||
$('#myModal').on('shown.bs.modal', function () {
|
||||
$(document).off('focusin.modal');
|
||||
});
|
||||
|
||||
$('#EventModal').on('hide.bs.modal', function (event) {
|
||||
// $('.select2-multiple').select2('destroy');
|
||||
// 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('');
|
||||
});
|
||||
|
||||
|
||||
$('#EventModal').on('show.bs.modal', function (event) {
|
||||
|
||||
$(document).off('focusin.modal');
|
||||
$('.attachment-div').empty();
|
||||
$('#reminder').val('NULL');
|
||||
$('#type').val('1');
|
||||
@@ -1201,7 +1208,32 @@ $(document).ready(function () {
|
||||
$('#add-event').show();
|
||||
$('#attachments').data('newkey', Math.floor(Math.random() * 10000));
|
||||
});
|
||||
tinymce.init({
|
||||
//font_formats: "Arial=arial,sans-serif;",
|
||||
selector: '#description',
|
||||
dialog_container: '#EventModal',
|
||||
language: 'de',
|
||||
branding: false,
|
||||
height: 250,
|
||||
menubar: false,
|
||||
forced_root_block_attrs: {
|
||||
style: 'margin:0;'
|
||||
},
|
||||
skin: "tinymce-5",
|
||||
plugins: ' code link autolink lists table',
|
||||
paste_block_drop: true,
|
||||
paste_as_text: true,
|
||||
paste_data_images: false,
|
||||
promotion: false,
|
||||
toolbar1: 'undo redo | styles | bold italic underline strikethrough | fontfamily fontsize forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | table | link unlink',
|
||||
content_css: "/assets/css/tinymce.css",
|
||||
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) {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
$('body').on('click', '#add-event', function () {
|
||||
let valid = true;
|
||||
|
||||
@@ -1228,7 +1260,7 @@ $(document).ready(function () {
|
||||
let end = $('#end-date').val() + ' ' + $('#end-time').val();
|
||||
let title = $('#name').val();
|
||||
let location = $('#location').val();
|
||||
let description = $('#description').val();
|
||||
let description = tinymce.activeEditor.getContent();
|
||||
let newkey = $('#attachments').data('newkey');
|
||||
let allday = 0;
|
||||
let reminder = $('#reminder').val();
|
||||
@@ -1322,7 +1354,7 @@ $(document).ready(function () {
|
||||
let end = $('#end-date').val() + ' ' + $('#end-time').val();
|
||||
let title = $('#name').val();
|
||||
let location = $('#location').val();
|
||||
let description = $('#description').val();
|
||||
let description = tinymce.activeEditor.getContent();
|
||||
let newkey = $('#attachments').data('newkey');
|
||||
let allday = 0;
|
||||
let reminder = $('#reminder').val();
|
||||
@@ -1832,6 +1864,9 @@ $(document).ready(function () {
|
||||
$('#customer-info-type-text').val(data.mobilenumber);
|
||||
}
|
||||
}
|
||||
if ($("#customer").select2('data')[0].spin) {
|
||||
$('#description').val('Service Pin: ' + $("#customer").select2('data')[0].spin + '\n');
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
@@ -2351,4 +2386,9 @@ $(document).ready(function () {
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('focusin', function (e) {
|
||||
if ($(e.target).closest(".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root").length) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user