From: derpierre65 Date: Wed, 22 Nov 2017 14:46:50 +0000 (+0100) Subject: changed elBySel to elBySelAll (#2471) X-Git-Tag: 3.1.0_Beta_4~75 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e9a07e69ae179a8480e6c9d99e31063a24c0595;p=GitHub%2FWoltLab%2FWCF.git changed elBySel to elBySelAll (#2471) * changed elBySel to elBySelAll is easier for developer to add custom condition sections(?) * Update trophyAdd.tpl --- diff --git a/wcfsetup/install/files/acp/templates/trophyAdd.tpl b/wcfsetup/install/files/acp/templates/trophyAdd.tpl index 0caffb8d58..af65a640f4 100644 --- a/wcfsetup/install/files/acp/templates/trophyAdd.tpl +++ b/wcfsetup/install/files/acp/templates/trophyAdd.tpl @@ -29,12 +29,8 @@ }); elBySel('input[name=awardAutomatically]').addEventListener('change', function () { - if (elBySel('input[name=awardAutomatically]').checked) { - elBySel('.conditionSection').style.display = 'block'; - } - else { - elBySel('.conditionSection').style.display = 'none'; - } + var awardAutomatically = elBySel('input[name=awardAutomatically]').checked; + elBySelAll('.conditionSection', null, (awardAutomatically ? 'elShow' : 'elHide')) }); BadgeHandler.init();