From b6c901e5615f8db81cbbebc4498daf680b5af070 Mon Sep 17 00:00:00 2001 From: tmont Date: Mon, 22 Feb 2021 20:26:41 -0800 Subject: [PATCH] fixed apply-runes checkbox persisting too long --- web/static/saga.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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() };