From 3ca67434697e2a4e15a7a10de68dc3ffe448e514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina?= Date: Tue, 30 Nov 2021 16:19:36 +0100 Subject: [PATCH 1/5] Show category description --- htdocs/takepos/index.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 8bd1c4dbca9..e01a81ec94f 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -227,7 +227,12 @@ function PrintCategories(first) { continue; } $("#catdivdesc"+i).show(); - $("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']); + global->TAKEPOS_SHOW_CATEGORY_DESCRIPTION == 1) { ?> + $("#catdesc"+i).html(categories[parseInt(i)+parseInt(first)]['label'].bold() + ' - ' + ['description']); + + $("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']); + $("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[parseInt(i)+parseInt(first)]['rowid']); $("#catdiv"+i).data("rowid",categories[parseInt(i)+parseInt(first)]['rowid']); $("#catdiv"+i).attr('class', 'wrapper'); @@ -261,7 +266,12 @@ function MoreCategories(moreorless) { continue; } $("#catdivdesc"+i).show(); - $("#catdesc"+i).text(categories[i+( * pagecategories)]['label']); + global->TAKEPOS_SHOW_CATEGORY_DESCRIPTION == 1) { ?> + $("#catdesc"+i).html(categories[i+( * pagecategories)]['label'].bold() + ' - ' + categories[i+( * pagecategories)]['description']); + + $("#catdesc"+i).text(categories[i+( * pagecategories)]['label']); + $("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[i+( * pagecategories)]['rowid']); $("#catdiv"+i).data("rowid",categories[i+( * pagecategories)]['rowid']); $("#catwatermark"+i).show(); From 7dff30126dbe5a783b190125487abaf01e8a1258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina?= Date: Tue, 30 Nov 2021 18:22:59 +0100 Subject: [PATCH 2/5] Show subcategories description --- htdocs/takepos/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index e01a81ec94f..f86f710d169 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -300,7 +300,11 @@ function LoadProducts(position, issubcat) { jQuery.each(subcategories, function(i, val) { if (currentcat==val.fk_parent) { $("#prodivdesc"+ishow).show(); - $("#prodesc"+ishow).text(val.label); + global->TAKEPOS_SHOW_CATEGORY_DESCRIPTION == 1) { ?> + $("#prodesc"+ishow).html(val.label.bold() + ' - ' + val.description); + + $("#prodesc"+ishow).text(val.label); + $("#probutton"+ishow).text(val.label); $("#probutton"+ishow).show(); $("#proprice"+ishow).attr("class", "hidden"); From 5c1638227db597ad793d24dc30354e3fb6acdc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina?= Date: Wed, 1 Dec 2021 09:58:01 +0100 Subject: [PATCH 3/5] =?UTF-8?q?Correction=20description=20cat=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 f86f710d169..47e36ec63ad 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -229,7 +229,7 @@ function PrintCategories(first) { $("#catdivdesc"+i).show(); global->TAKEPOS_SHOW_CATEGORY_DESCRIPTION == 1) { ?> - $("#catdesc"+i).html(categories[parseInt(i)+parseInt(first)]['label'].bold() + ' - ' + ['description']); + $("#catdesc"+i).html(categories[parseInt(i)+parseInt(first)]['label'].bold() + ' - ' + categories[parseInt(i)+parseInt(first)]['description']); $("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']); From c718b86f9b644d2b7fccb644741103614a308073 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 May 2022 20:28:37 +0200 Subject: [PATCH 4/5] Update index.php --- htdocs/takepos/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index eb310372075..88c39792636 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -233,7 +233,7 @@ function PrintCategories(first) { } $("#catdivdesc"+i).show(); global->TAKEPOS_SHOW_CATEGORY_DESCRIPTION == 1) { ?> + if (getDolGlobalString('TAKEPOS_SHOW_CATEGORY_DESCRIPTION') == 1) { ?> $("#catdesc"+i).html(categories[parseInt(i)+parseInt(first)]['label'].bold() + ' - ' + categories[parseInt(i)+parseInt(first)]['description']); $("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']); @@ -272,7 +272,7 @@ function MoreCategories(moreorless) { } $("#catdivdesc"+i).show(); global->TAKEPOS_SHOW_CATEGORY_DESCRIPTION == 1) { ?> + if (getDolGlobalString('TAKEPOS_SHOW_CATEGORY_DESCRIPTION') == 1) { ?> $("#catdesc"+i).html(categories[i+( * pagecategories)]['label'].bold() + ' - ' + categories[i+( * pagecategories)]['description']); $("#catdesc"+i).text(categories[i+( * pagecategories)]['label']); @@ -305,7 +305,7 @@ function LoadProducts(position, issubcat) { jQuery.each(subcategories, function(i, val) { if (currentcat==val.fk_parent) { $("#prodivdesc"+ishow).show(); - global->TAKEPOS_SHOW_CATEGORY_DESCRIPTION == 1) { ?> + $("#prodesc"+ishow).html(val.label.bold() + ' - ' + val.description); $("#probutton"+ishow).html(val.label); From a12c0f6dbf79307b276028aea1e751e334ab4625 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 8 May 2022 18:33:23 +0000 Subject: [PATCH 5/5] Fixing style errors. --- htdocs/takepos/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 88c39792636..9df54d1d64b 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -307,10 +307,10 @@ function LoadProducts(position, issubcat) { $("#prodivdesc"+ishow).show(); $("#prodesc"+ishow).html(val.label.bold() + ' - ' + val.description); - $("#probutton"+ishow).html(val.label); + $("#probutton"+ishow).html(val.label); $("#prodesc"+ishow).text(val.label); - $("#probutton"+ishow).text(val.label); + $("#probutton"+ishow).text(val.label); $("#probutton"+ishow).show(); $("#proprice"+ishow).attr("class", "hidden");