';
if (data.loaded !== undefined) {
if (data.multiple_select !== undefined && data.multiple_select.title !== undefined) {
list = list + '
';
}
}
list = list + '
';
if (content[key].alphaicon != undefined) {
list = list + '
';
if (content[key].title != undefined && content[key].title != null) {
list = list + '' + content[key].title.slice(0, 1) + '';
}
list = list + '';
} else {
list = list + '

';
if (content[key].online_status !== undefined) {
list = list + '
';
}
}
list = list + '
';
list = list + '
';
list = list + '';
list = list + '' + content[key].title + '';
list = list + '';
if (content[key].unread !== 0) {
list = list + '' + content[key].unread + ' ' + language_string('new') + '';
}
list = list + '';
list = list + '';
list = list + '';
list = list + content[key].subtitle;
if (content[key].icon !== 0) {
list = list + '';
}
list = list + '';
list = list + '
';
list = list + '
';
list = list + '
';
if (alloptions != undefined && alloptions[key] !== undefined && alloptions[key].length != 0) {
list = list + '';
if (content[key].attributes !== undefined && content[key].attributes.stopPropagation !== undefined) {
list = list + '';
} else {
list = list + '';
}
var options = alloptions[key];
$.each(options, function(optkey, optval) {
var attributes = options[optkey].attributes;
list = list + '- ' + options[optkey].option + '
';
});
list = list + '
';
}
list = list + '
';
list = list + '
';
});
if (append === 1) {
$('.main .aside > .site_records > .records > .list').append(list).show();
} else {
if (!preloader_disabled) {
$('.main .aside > .site_records > .records > .list').css('opacity', 0);
}
$('.main .aside > .site_records > .records > .list').html(list).show();
}
if (!$('.main .aside .selector.select_all').hasClass('d-none')) {
$('.main .aside .selector').removeClass('d-none');
}
} else {
if (append == 1) {
$('.main .aside > .site_records > .current_record').addClass('EndResults');
} else {
$('.main .aside > .site_records > .current_record > .selector').addClass('d-none');
$('.main .aside > .site_records > .records > .zero_results').removeClass('d-none');
$('.main .aside > .site_records > .records > .list').hide();
}
}
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
$('.main .aside > .site_records > .current_record').removeClass('loading');
$('.main .aside > .site_records > .records > .loader').removeClass('error').hide();
if (!preloader_disabled) {
$('.main .aside > .site_records > .records > .list').animate({
opacity: 1
}, 0);
}
} else {
console.log('ERROR : ' + data);
if (!preloader_disabled && append !== 1) {
$('.main .aside > .site_records > .records > .list').html('');
$('.main .aside > .site_records > .current_record').removeClass('loading');
$('.main .aside > .site_records > .current_record > .title > div > .text').replace_text(language_string('error'));
$('.main .aside > .site_records > .records > .on_error').removeClass('d-none');
$('.main .aside > .site_records > .records > .loader').addClass('error').show();
}
}
}).fail(function(qXHR, textStatus, errorThrown) {
if (qXHR.statusText !== 'abort' && qXHR.statusText !== 'canceled') {
if (!preloader_disabled && append !== 1) {
$('.main .aside > .site_records > .records > .list').html('');
$('.main .aside > .site_records > .current_record').removeClass('loading');
$('.main .aside > .site_records > .records > .on_error').removeClass('d-none');
$('.main .aside > .site_records > .current_record > .title > div > .text').replace_text(language_string('error'));
$('.main .aside > .site_records > .records > .loader').addClass('error').show();
}
}
});
}
}
$('body').on('click', '.main .aside > .site_records > .current_record > .selector.select_all > input', function(e) {
$('.main .aside > .site_records > .records > .list > li > div > .selector.select_item > input').prop('checked', this.checked).change();
});
$('body').on('change', '.main .aside > .site_records > .records > .list > li > div > .selector.select_item > input', function(e) {
if ($(".main .aside > .site_records > .records > .list > li > div > .selector.select_item > input:checked").length > 0) {
if ($('.main .aside > .site_records > .tools').hasClass('d-none')) {
if ($('.main .page_column[column="first"] .confirm_box').hasClass('d-none')) {
$('.main .aside > .site_records > .tools').removeClass('d-none');
}
}
$('.main .aside > .site_records > .tools > .multiple_selection').removeClass('d-none');
} else {
$('.main .aside > .site_records > .tools > .multiple_selection').addClass('d-none');
}
});
$('body').on('click', ".main .aside > .site_records > .records > .list > li", function(event) {
if (!$(event.target).hasClass('prevent_default') && !$(event.target).parent().hasClass('prevent_default')) {
if (!$(this).find(".options > span").is(":visible")) {
$(".main .aside > .site_records > .records > .list > li > div > .right > .options > span").hide();
}
if ($(this).attr('stopPropagation') === undefined) {
$(this).find(".options").trigger('click');
}
}
});
$('body').on('click', ".main .aside > .site_records > .current_record .toggle_checkbox", function(e) {
if ($('.main .aside > .site_records > .records > .list > li > div > .selector').length > 0) {
$('.main .aside > .site_records .selector').toggleClass('d-none');
}
if ($('.main .aside .selector.select_all').hasClass('d-none')) {
$('.main .aside .selector > input[type="checkbox"]').prop('checked', false);
$('.main .aside > .site_records > .tools > .multiple_selection').addClass('d-none');
}
});
$('body').on('click', ".main .aside > .site_records > .records > .list > li > div > .right > .options", function(e) {
if ($(this).find("span").is(":visible")) {
$(".main .aside > .site_records > .records > .list > li > div > .right > .options > span").hide();
} else {
$(".main .aside > .site_records > .records > .list > li > div > .right > .options > span").hide();
$(this).find("span").css('display', 'block');
}
});
$("body").on('click', '.main .aside > .site_records > .current_record > .title', function(e) {
if (!$('.main .aside > .site_records > .current_record').hasClass('loading') && !$(this).find('div').hasClass('dropdown_button') || $(this).attr('disable_preloader') !== undefined) {
$('.main .aside > .site_records .record_info > .refresh_current_record').html('