changed elBySel to elBySelAll (#2471)
authorderpierre65 <admin@derpierre65.de>
Wed, 22 Nov 2017 14:46:50 +0000 (15:46 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 22 Nov 2017 14:46:50 +0000 (15:46 +0100)
* changed elBySel to elBySelAll

is easier for developer to add custom condition sections(?)

* Update trophyAdd.tpl

wcfsetup/install/files/acp/templates/trophyAdd.tpl

index 0caffb8d5890aac3a33815d3f4d9a161b550b846..af65a640f48e13242e72e59eb22157d340bd3752 100644 (file)
                });
                
                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();