new: make click in choices of search box load the page of the product

This commit is contained in:
Valentin Lab
2025-10-04 13:54:21 +02:00
parent 11edccad02
commit 9c081574c8
2 changed files with 21 additions and 4 deletions

View File

@@ -13,9 +13,10 @@
var id = item.value;
$('#' + field).val(id);
if (typeof(callback) != 'undefined') {
var c = callback + '(' + id + ')';
eval(c);
if (typeof callback === 'function') {
callback.call(this, item, evt);
} else if (typeof callback === 'string' && callback.length && typeof window[callback] === 'function') {
window[callback].call(this, item, evt);
}
});
}