add/assign catalogs to an api when adding it
This commit is contained in:
16
webroot/js/product_catalogs.js
Normal file
16
webroot/js/product_catalogs.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const addProductCatalogButton = document.getElementById('add-product-catalog-button');
|
||||
const productCatalogsPrefixInput = document.getElementById('catalog_prefix');
|
||||
if (addProductCatalogButton && productCatalogsPrefixInput) {
|
||||
addProductCatalogButton.addEventListener('click', addProductCatalogButtonClicked);
|
||||
}
|
||||
function addProductCatalogButtonClicked(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
console.debug('productCatalogsPrefixInput.value');
|
||||
console.debug(productCatalogsPrefixInput.value);
|
||||
productCatalogsPrefixInput.value = parseInt(productCatalogsPrefixInput.value) + 1;
|
||||
productCatalogsPrefixInput.dispatchEvent(new Event('change'));
|
||||
console.debug('productCatalogsPrefixInput.value');
|
||||
console.debug(productCatalogsPrefixInput.value);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user