Initial commit

This commit is contained in:
2024-04-17 15:07:51 +01:00
commit f1b095ba83
280 changed files with 30850 additions and 0 deletions

35
static/js/store_home.js Normal file
View File

@@ -0,0 +1,35 @@
var _loading = true;
function hookupStorePageHome() {
_loading = false;
hookupStoreCardsProduct();
}
function hookupStoreCardsProduct() {
let d; // , lsShared;
// let selectorCardProduct = '.card.subcard';
$('div.card.subcard[' + attrIdProduct +']').each(function() {
var product = $(this);
initialiseEventHandler(product, flagInitialised, function() {
product = $(product);
console.log("initialising product: ", product);
product.on("click", function(event) {
// d = { keyIdProduct: product.attr(attrIdProduct) }
var elemClicked = event.target;
if (elemClicked.id != 'submit') { // disable for submit buttons
console.log("product click: " + product.attr(attrIdProduct));
console.log("permutation click: " + product.attr(attrIdPermutation));
var d = {}
d[keyIdProduct] = product.attr(attrIdProduct)
d[keyIdPermutation] = product.attr(attrIdPermutation)
// send quantity requested
goToPage(hashPageStoreProduct, d);
}
});
console.log("click method added for product ID: " + product.attr(attrIdProduct) + ', permutation ID: ', product.attr(attrIdPermutation));
});
});
}