IW4M-Admin/WebfrontCore/wwwroot/js/configuration.js
RaidMax b134cd4728 fix gravatars not showing
fix web config not saving Uri
fix issue with token login
2019-04-14 10:55:05 -05:00

23 lines
829 B
JavaScript

$(document).ready(function() {
$.each($('.has-related-content'), function (key, value) {
value = $(value);
if (value.attr('checked') !== undefined && value.attr('checked').length > 0) {
$(value.data('related-content')).slideDown();
}
});
$('input:checkbox').change(function () {
var isChecked = $(this).is(':checked');
isChecked ? $($(this).data('related-content')).slideDown() : $($(this).data('related-content')).slideUp();
});
$('.configuration-add-new').click(function (e) {
e.preventDefault();
let parentElement = $(this).parent();
$.get($(this).attr('href') + '&itemCount=' + $(this).siblings().length, function (response) {
$(response).insertBefore(parentElement.children().last());
});
});
});