diff --git a/web/static/saga.js b/web/static/saga.js index f8484d8..4a45443 100644 --- a/web/static/saga.js +++ b/web/static/saga.js @@ -318,9 +318,9 @@ const $enemyInfoModal = $('#enemy-info-modal'); if ($enemyInfoModal.length) { let rowData; - let shouldApplyRunes = false; + $enemyInfoModal.find('.apply-runes-form input[type="checkbox"]').on('change', (e) => { - shouldApplyRunes = e.target.checked; + const shouldApplyRunes = e.target.checked; if (rowData) { if (shouldApplyRunes) { @@ -551,6 +551,10 @@ $enemyInfoModal.find('.vacuum-rate').text(toPer(vacuumRate)); }; + $enemyInfoModal.on('hide.bs.modal', () => { + $enemyInfoModal.find('.apply-runes-form').hide().find('input').prop('checked', false); + }); + $table.find('tbody.data td').on('click', (e) => { rowData = rowData = { ...$(e.target).closest('tr').data() };