';
if (data.content[key].field.title !== undefined) {
if (data.content[key].field.title_img !== undefined) {
var title_img = '

';
data.content[key].field.title = '
'+data.content[key].field.title+''+title_img;
}
contents = contents+'
'+data.content[key].field.title+'';
}
if (data.content[key].field.images !== undefined) {
var image_class = "default";
images = data.content[key].field.images;
if (data.content[key].field.class !== undefined) {
image_class = data.content[key].field.class;
}
contents = contents+'
';
$.each(images, function(img_key, image) {
contents = contents+'
';
contents = contents+' ';
});
contents = contents+'
';
} else if (data.content[key].field.multiple_records !== undefined) {
var records_identifier = 'multiple_records';
var multi_records = data.content[key].field.multiple_records;
if (multi_records.identifier !== undefined) {
records_identifier = multi_records.identifier;
}
contents = contents+'
';
if (multi_records.dropdown !== undefined) {
contents = contents+'
';
contents = contents+'
';
contents = contents+'
';
}
contents = contents+'
';
contents = contents+'
';
contents = contents+'
';
contents = contents+'
';
contents = contents+'
';
contents = contents+'
';
contents = contents+'';
contents = contents+'';
contents = contents+'';
contents = contents+'
';
contents = contents+'
';
contents = contents+'';
contents = contents+'';
contents = contents+'';
contents = contents+'
';
contents = contents+'
';
contents = contents+'
';
contents = contents+''+language_string('load_more')+'
';
contents = contents+'
';
contents = contents+'
';
} else if (data.content[key].field.value !== undefined) {
if (data.content[key].field.link !== undefined) {
var field_link = data.content[key].field.link;
contents = contents+'
';
contents = contents+''+data.content[key].field.value+'';
contents = contents+'';
} else {
contents = contents+'
'+data.content[key].field.value+'';
}
}
contents = contents+'
';
}
});
}
$('.main .info_panel > .content > .fields').html(contents);
if ($('.main .info_panel .info_records > .record_selection > div > .dropdown_list > ul > li').length > 0) {
$('.main .info_panel .info_records > .record_selection > div > .dropdown_list > ul > li:first-child').trigger('click');
$('.main .info_panel .info_records > .record_selection > div > .dropdown_list').hide();
}
//$("[data-bs-toggle=tooltip]").tooltip();
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
$('.main .info_panel > .loader').hide();
}
}
} else {
console.log('ERROR : ' + data);
$(".main .info_panel > .info_box > .heading").replace_text(language_string('error'));
$('.main .info_panel > .loader').addClass('error');
}
}).fail(function(qXHR, textStatus, errorThrown) {
if (qXHR.statusText !== 'abort' && qXHR.statusText !== 'canceled') {
$('.main .info_panel > .loader').addClass('error');
$(".main .info_panel > .info_box > .heading").replace_text(language_string('error'));
}
});
}
$('.main').on('click', '.load_info_records', function(e) {
var load = $(this);
if (load.attr('records_block_class') !== undefined) {
var records_block = $('.main .info_panel > .content > .fields > .field > .info_records.'+load.attr('records_block_class'));
var offset = 0;
var load_records = '';
if (load.attr('load') !== undefined) {
load_records = load.attr('load');
}
records_block.find('.load_more').addClass('d-none');
if (load.attr('append') !== undefined) {
load_records = $.trim(records_block.find('.current_records > .loaded').text());
offset = $.trim(records_block.find('.current_records > .offset').text());
} else {
records_block.find('.no_results_found').addClass('d-none');
records_block.find('.current_records > .loaded').text(load_records);
records_block.find('.contents > div > ul').html('');
records_block.find('.record_selection > div > .text').replace_text(language_string('loading'));
var append_data = load.data();
$.each(append_data, function(index, data_item) {
if (records_block.find('.current_records > .data_attributes > span').length === 0) {
records_block.find('.current_records > .data_attributes').html('