1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

add configuration option to force local translations

fix silly bug with no being able to claim ownership
continue work on configuration via webfront
This commit is contained in:
RaidMax
2019-04-11 20:43:05 -05:00
parent f6de4e6027
commit 91552df798
14 changed files with 264 additions and 35 deletions

View File

@ -1,7 +1,7 @@
$(document).ready(function() {
$.each($('.has-related-content'), function (key, value) {
value = $(value);
if (value.attr('checked').length > 0) {
if (value.attr('checked') !== undefined && value.attr('checked').length > 0) {
$(value.data('related-content')).slideDown();
}
});
@ -10,4 +10,19 @@
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 totalItems = $(this).siblings().length;
//let inputHtml = $(this).siblings().last().get(0).outerHTML;
//inputHtml = inputHtml.replace('_' + totalItems - 1 + '_', '_' + totalItems + '_');
//inputHtml = inputHtml.replace('[' + totalItems - 1 + ']', '[' + totalItems + ']');
//$(this).parent().prepend(inputHtml);
let parentElement = $(this).parent();
$.get($(this).attr('href') + '&itemCount=' + $(this).siblings().length, function (response) {
parentElement.prepend(response);
});
});
});