Mails previews, Lead Passolution, Lead Country Files, LeadParticipant

This commit is contained in:
Kevin Adametz 2021-09-17 14:32:51 +02:00
parent 5e3bd3a1ba
commit ae70577289
28 changed files with 596 additions and 97 deletions

View file

@ -143,8 +143,42 @@ $(function() {
});
});
function loadModalPreviewInner(self, data){
var url = data.route;
$.ajax({
url: url,
data: data,
type: "POST",
dataType: "json",
cache: false,
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
encode: true,
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
success: function(data) {
console.log(data);
$(data.response.target).find('.modal-title').html(data.response.subject);
$(data.response.target).find('.modal-body').html(data.html);
},
error: function(xhr, status, errorThrown) {
console.log(xhr);
console.log(xhr.responseText);
console.log(errorThrown);
console.log("Sorry, there was a problem!");
}
});
return false;
}
$(function () {
$('.modal').on("hidden.bs.modal", function (e) {
if ($('.modal:visible').length) {
$('body').addClass('modal-open');
}
});
$('#modals-load-content').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
if (!button.data('id')) {