bring into standalone plugin for distribution
This commit is contained in:
15
webroot/js/product_category_attribute_options.js
Normal file
15
webroot/js/product_category_attribute_options.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const addOptionButton = document.getElementById('add-option-button');
|
||||
const attributeOptionPrefixInput = document.getElementById('attribute_options_prefix');
|
||||
if (addOptionButton && attributeOptionPrefixInput) {
|
||||
addOptionButton.addEventListener('click', addOptionButtonClicked);
|
||||
}
|
||||
function addOptionButtonClicked(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
console.debug('attributeOptionPrefixInput.value');
|
||||
console.debug(attributeOptionPrefixInput.value);
|
||||
attributeOptionPrefixInput.value = parseInt(attributeOptionPrefixInput.value) + 1;
|
||||
attributeOptionPrefixInput.dispatchEvent(new Event('change'));
|
||||
console.debug('attributeOptionPrefixInput.value');
|
||||
console.debug(attributeOptionPrefixInput.value);
|
||||
}
|
||||
Reference in New Issue
Block a user