Skip to content

Commit

Permalink
Rewrote js/varien/weee.js without prototypejs (#3670)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano authored Jan 24, 2024
1 parent d7b3722 commit c437f8d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions js/varien/weee.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@
* @category Varien
* @package js
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @copyright Copyright (c) 2023 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/

/**************************** WEEE STUFF ********************************/
function taxToggle(details, switcher, expandedClassName)
{
if ($(details).style.display == 'none') {
$(details).show();
$(switcher).addClassName(expandedClassName);
var detailsElement = document.getElementById(details);
var switcherElement = document.getElementById(switcher);

if (detailsElement.style.display == 'none') {
detailsElement.style.display = 'block';
switcherElement.classList.add(expandedClassName);
} else {
$(details).hide();
$(switcher).removeClassName(expandedClassName);
detailsElement.style.display = 'none';
switcherElement.classList.remove(expandedClassName);
}
}

0 comments on commit c437f8d

Please sign in to comment.