FIX Search bug when hide product images
This commit is contained in:
parent
a0418fc17d
commit
83245d321b
@ -289,6 +289,8 @@ function LoadProducts(position, issubcat) {
|
|||||||
if (currentcat==val.fk_parent) {
|
if (currentcat==val.fk_parent) {
|
||||||
$("#prodivdesc"+ishow).show();
|
$("#prodivdesc"+ishow).show();
|
||||||
$("#prodesc"+ishow).text(val.label);
|
$("#prodesc"+ishow).text(val.label);
|
||||||
|
$("#probutton"+ishow).text(val.label);
|
||||||
|
$("#probutton"+ishow).show();
|
||||||
$("#proprice"+ishow).attr("class", "hidden");
|
$("#proprice"+ishow).attr("class", "hidden");
|
||||||
$("#proprice"+ishow).html("");
|
$("#proprice"+ishow).html("");
|
||||||
$("#proimg"+ishow).attr("src","genimg/index.php?query=cat&id="+val.rowid);
|
$("#proimg"+ishow).attr("src","genimg/index.php?query=cat&id="+val.rowid);
|
||||||
@ -386,6 +388,8 @@ function MoreProducts(moreorless) {
|
|||||||
if (typeof (data[idata]) == "undefined") {
|
if (typeof (data[idata]) == "undefined") {
|
||||||
$("#prodivdesc"+ishow).hide();
|
$("#prodivdesc"+ishow).hide();
|
||||||
$("#prodesc"+ishow).text("");
|
$("#prodesc"+ishow).text("");
|
||||||
|
$("#probutton"+ishow).text("");
|
||||||
|
$("#probutton"+ishow).hide();
|
||||||
$("#proprice"+ishow).attr("class", "");
|
$("#proprice"+ishow).attr("class", "");
|
||||||
$("#proprice"+ishow).html("");
|
$("#proprice"+ishow).html("");
|
||||||
$("#proimg"+ishow).attr("src","genimg/empty.png");
|
$("#proimg"+ishow).attr("src","genimg/empty.png");
|
||||||
@ -396,6 +400,8 @@ function MoreProducts(moreorless) {
|
|||||||
//Only show products with status=1 (for sell)
|
//Only show products with status=1 (for sell)
|
||||||
$("#prodivdesc"+ishow).show();
|
$("#prodivdesc"+ishow).show();
|
||||||
$("#prodesc"+ishow).text(data[parseInt(idata)]['label']);
|
$("#prodesc"+ishow).text(data[parseInt(idata)]['label']);
|
||||||
|
$("#probutton"+ishow).text(data[parseInt(idata)]['label']);
|
||||||
|
$("#probutton"+ishow).show();
|
||||||
if (data[parseInt(idata)]['price_formated']) {
|
if (data[parseInt(idata)]['price_formated']) {
|
||||||
$("#proprice"+ishow).attr("class", "productprice");
|
$("#proprice"+ishow).attr("class", "productprice");
|
||||||
$("#proprice"+ishow).html(data[parseInt(idata)]['price_formated']);
|
$("#proprice"+ishow).html(data[parseInt(idata)]['price_formated']);
|
||||||
@ -544,6 +550,8 @@ function Search2(keyCodeForEnter) {
|
|||||||
for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) {
|
for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) {
|
||||||
if (typeof (data[i]) == "undefined") {
|
if (typeof (data[i]) == "undefined") {
|
||||||
$("#prodesc" + i).text("");
|
$("#prodesc" + i).text("");
|
||||||
|
$("#probutton" + i).text("");
|
||||||
|
$("#probutton" + i).hide();
|
||||||
$("#proprice" + i).attr("class", "hidden");
|
$("#proprice" + i).attr("class", "hidden");
|
||||||
$("#proprice" + i).html("");
|
$("#proprice" + i).html("");
|
||||||
$("#proimg" + i).attr("src", "genimg/empty.png");
|
$("#proimg" + i).attr("src", "genimg/empty.png");
|
||||||
@ -557,6 +565,8 @@ function Search2(keyCodeForEnter) {
|
|||||||
var titlestring = <?php echo $titlestring; ?>;
|
var titlestring = <?php echo $titlestring; ?>;
|
||||||
$("#prodesc" + i).text(data[i]['label']);
|
$("#prodesc" + i).text(data[i]['label']);
|
||||||
$("#prodivdesc" + i).show();
|
$("#prodivdesc" + i).show();
|
||||||
|
$("#probutton" + i).text(data[i]['label']);
|
||||||
|
$("#probutton" + i).show();;
|
||||||
if (data[i]['price_formated']) {
|
if (data[i]['price_formated']) {
|
||||||
$("#proprice" + i).attr("class", "productprice");
|
$("#proprice" + i).attr("class", "productprice");
|
||||||
$("#proprice" + i).html(data[i]['price_formated']);
|
$("#proprice" + i).html(data[i]['price_formated']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user