diff --git a/js/mage/adminhtml/variables.js b/js/mage/adminhtml/variables.js index 6360f950dfc..a4765204021 100644 --- a/js/mage/adminhtml/variables.js +++ b/js/mage/adminhtml/variables.js @@ -8,7 +8,7 @@ * @category Mage * @package Mage_Adminhtml * @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) 2022-2024 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -20,8 +20,9 @@ var Variables = { overlayShowEffectOptions: null, overlayHideEffectOptions: null, insertFunction: 'Variables.insertVariable', + init: function(textareaElementId, insertFunction) { - if ($(textareaElementId)) { + if (document.getElementById(textareaElementId)) { this.textareaElementId = textareaElementId; } if (insertFunction) { @@ -37,10 +38,10 @@ var Variables = { openVariableChooser: function(variables) { if (this.variablesContent == null && variables) { this.variablesContent = '