more api tweaks

removed WebfrontSettings
IW4MAdminSettings are only generated when the file does not exist, placeholder values stored in DefaultSettings.json
This commit is contained in:
RaidMax
2018-04-19 00:48:14 -05:00
parent 23ec72e6b6
commit 438718507b
31 changed files with 310 additions and 77 deletions

View File

@ -25,6 +25,11 @@
}
$(document).ready(function () {
if ($('#console_command_button').length === 0) {
return false;
}
$('#console_command_button').click(function (e) {
executeCommand();
});

View File

@ -49,7 +49,7 @@ if ($('#penalty_table').length === 1) {
.off('scroll', ScrollHandler)
.on('scroll', ScrollHandler);
$('#load_penalties_button').hover(function () {
$('#load_penalties_button').click(function () {
loadMorePenalties();
});
});

View File

@ -168,7 +168,7 @@ function loadMeta(meta) {
// it's a penalty
if (meta.class.includes("Penalty")) {
if (meta.value.punisherId !== clientInfo.clientId) {
const timeRemaining = meta.value.type == 'TempBan' && meta.value.timeRemaining.length > 0 ?
const timeRemaining = meta.value.type === 'TempBan' && meta.value.timeRemaining.length > 0 ?
`(${meta.value.timeRemaining} remaining)` :
'';
eventString = `<div><span class="penalties-color-${meta.value.type.toLowerCase()}">${penaltyToName(meta.value.type)}</span> by <span class="text-highlight"> <a class="link-inverse" href="${meta.value.punisherId}">${meta.value.punisherName}</a></span > for <span style="color: white; ">${meta.value.offense}</span><span class="text-muted"> ${timeRemaining}</span></div>`;