From 83245d321b5fba8809498a46713cae9786b9f941 Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Sun, 23 May 2021 09:55:01 +0200 Subject: [PATCH 1/2] FIX Search bug when hide product images --- htdocs/takepos/index.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 1f9e6c32b2b..26a62e36d6e 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -289,6 +289,8 @@ function LoadProducts(position, issubcat) { if (currentcat==val.fk_parent) { $("#prodivdesc"+ishow).show(); $("#prodesc"+ishow).text(val.label); + $("#probutton"+ishow).text(val.label); + $("#probutton"+ishow).show(); $("#proprice"+ishow).attr("class", "hidden"); $("#proprice"+ishow).html(""); $("#proimg"+ishow).attr("src","genimg/index.php?query=cat&id="+val.rowid); @@ -386,6 +388,8 @@ function MoreProducts(moreorless) { if (typeof (data[idata]) == "undefined") { $("#prodivdesc"+ishow).hide(); $("#prodesc"+ishow).text(""); + $("#probutton"+ishow).text(""); + $("#probutton"+ishow).hide(); $("#proprice"+ishow).attr("class", ""); $("#proprice"+ishow).html(""); $("#proimg"+ishow).attr("src","genimg/empty.png"); @@ -396,6 +400,8 @@ function MoreProducts(moreorless) { //Only show products with status=1 (for sell) $("#prodivdesc"+ishow).show(); $("#prodesc"+ishow).text(data[parseInt(idata)]['label']); + $("#probutton"+ishow).text(data[parseInt(idata)]['label']); + $("#probutton"+ishow).show(); if (data[parseInt(idata)]['price_formated']) { $("#proprice"+ishow).attr("class", "productprice"); $("#proprice"+ishow).html(data[parseInt(idata)]['price_formated']); @@ -544,6 +550,8 @@ function Search2(keyCodeForEnter) { for (i = 0; i < ; i++) { if (typeof (data[i]) == "undefined") { $("#prodesc" + i).text(""); + $("#probutton" + i).text(""); + $("#probutton" + i).hide(); $("#proprice" + i).attr("class", "hidden"); $("#proprice" + i).html(""); $("#proimg" + i).attr("src", "genimg/empty.png"); @@ -557,6 +565,8 @@ function Search2(keyCodeForEnter) { var titlestring = ; $("#prodesc" + i).text(data[i]['label']); $("#prodivdesc" + i).show(); + $("#probutton" + i).text(data[i]['label']); + $("#probutton" + i).show();; if (data[i]['price_formated']) { $("#proprice" + i).attr("class", "productprice"); $("#proprice" + i).html(data[i]['price_formated']); From daababb97f3ae56e255e82cf6dd6f83e47b69e21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 May 2021 19:39:06 +0200 Subject: [PATCH 2/2] Update index.php --- htdocs/takepos/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 26a62e36d6e..d51fd21279e 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -566,7 +566,7 @@ function Search2(keyCodeForEnter) { $("#prodesc" + i).text(data[i]['label']); $("#prodivdesc" + i).show(); $("#probutton" + i).text(data[i]['label']); - $("#probutton" + i).show();; + $("#probutton" + i).show(); if (data[i]['price_formated']) { $("#proprice" + i).attr("class", "productprice"); $("#proprice" + i).html(data[i]['price_formated']);