Merge pull request #19525 from altairis-melina/categorydescription
NEW : Add constant to show category description in TakePos
This commit is contained in:
commit
ff065e0302
@ -232,7 +232,12 @@ function PrintCategories(first) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$("#catdivdesc"+i).show();
|
$("#catdivdesc"+i).show();
|
||||||
$("#catdesc"+i).html(categories[parseInt(i)+parseInt(first)]['label']);
|
<?php
|
||||||
|
if (getDolGlobalString('TAKEPOS_SHOW_CATEGORY_DESCRIPTION') == 1) { ?>
|
||||||
|
$("#catdesc"+i).html(categories[parseInt(i)+parseInt(first)]['label'].bold() + ' - ' + categories[parseInt(i)+parseInt(first)]['description']);
|
||||||
|
<?php } else { ?>
|
||||||
|
$("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']);
|
||||||
|
<?php } ?>
|
||||||
$("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[parseInt(i)+parseInt(first)]['rowid']);
|
$("#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).data("rowid",categories[parseInt(i)+parseInt(first)]['rowid']);
|
||||||
$("#catdiv"+i).attr('class', 'wrapper');
|
$("#catdiv"+i).attr('class', 'wrapper');
|
||||||
@ -266,7 +271,12 @@ function MoreCategories(moreorless) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$("#catdivdesc"+i).show();
|
$("#catdivdesc"+i).show();
|
||||||
$("#catdesc"+i).html(categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['label']);
|
<?php
|
||||||
|
if (getDolGlobalString('TAKEPOS_SHOW_CATEGORY_DESCRIPTION') == 1) { ?>
|
||||||
|
$("#catdesc"+i).html(categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['label'].bold() + ' - ' + categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['description']);
|
||||||
|
<?php } else { ?>
|
||||||
|
$("#catdesc"+i).text(categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['label']);
|
||||||
|
<?php } ?>
|
||||||
$("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']);
|
$("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']);
|
||||||
$("#catdiv"+i).data("rowid",categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']);
|
$("#catdiv"+i).data("rowid",categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']);
|
||||||
$("#catwatermark"+i).show();
|
$("#catwatermark"+i).show();
|
||||||
@ -295,8 +305,13 @@ function LoadProducts(position, issubcat) {
|
|||||||
jQuery.each(subcategories, function(i, val) {
|
jQuery.each(subcategories, function(i, val) {
|
||||||
if (currentcat==val.fk_parent) {
|
if (currentcat==val.fk_parent) {
|
||||||
$("#prodivdesc"+ishow).show();
|
$("#prodivdesc"+ishow).show();
|
||||||
$("#prodesc"+ishow).html(val.label);
|
<?php if (getDolGlobalString('TAKEPOS_SHOW_CATEGORY_DESCRIPTION') == 1) { ?>
|
||||||
$("#probutton"+ishow).html(val.label);
|
$("#prodesc"+ishow).html(val.label.bold() + ' - ' + val.description);
|
||||||
|
$("#probutton"+ishow).html(val.label);
|
||||||
|
<?php } else { ?>
|
||||||
|
$("#prodesc"+ishow).text(val.label);
|
||||||
|
$("#probutton"+ishow).text(val.label);
|
||||||
|
<?php } ?>
|
||||||
$("#probutton"+ishow).show();
|
$("#probutton"+ishow).show();
|
||||||
$("#proprice"+ishow).attr("class", "hidden");
|
$("#proprice"+ishow).attr("class", "hidden");
|
||||||
$("#proprice"+ishow).html("");
|
$("#proprice"+ishow).html("");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user