add most recent players dropdown option to webfront

remove unneeded compiled bootstrap file
This commit is contained in:
RaidMax
2019-07-16 15:27:19 -05:00
parent d301915273
commit f42a66e756
13 changed files with 137 additions and 6474 deletions

View File

@ -39,6 +39,7 @@ $(document).ready(function () {
$('#actionModal .modal-message').fadeOut('fast');
$('#actionModal .modal-body-content').html(response);
$('#actionModal').modal();
$('#actionModal').trigger('action_form_received', actionType);
})
.fail(function (jqxhr, textStatus, error) {
$('#actionModal .modal-message').text('Error — ' + error);
@ -83,4 +84,20 @@ $(document).ready(function () {
$('#actionModal .modal-message').fadeIn('fast');
});
});
/*
* handle loading of recent clients
*/
$('#actionModal').off('action_form_received');
$('#actionModal').on('action_form_received', function (e, actionType) {
if (actionType == 'RecentClients') {
const ipAddresses = $('.client-location-flag');
$.each(ipAddresses, function (index, address) {
$.get('https://ip2c.org/' + $(address).data('ip'), function (result) {
const countryCode = result.split(';')[1].toLowerCase();
$(address).css('background-image', `url(https://www.countryflags.io/${countryCode}/flat/64.png)`);
});
});
}
});
});