Merge pull request #19527 from altairis-melina/nocategory

NEW : Add constant to hide categories in TakePos
This commit is contained in:
Laurent Destailleur 2022-01-19 02:30:52 +01:00 committed by GitHub
commit eb3bce9759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1203,11 +1203,15 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
} ?>"> } ?>">
<!-- Show categories --> <!-- Show categories -->
<div class="div4"> <?php
<?php if ($conf->global->TAKEPOS_HIDE_CATEGORIES == 1) {
$count = 0; print '<div class="div4" style= "display: none;">';
while ($count < $MAXCATEG) { } else {
?> print '<div class="div4">';
}
$count = 0;
while ($count < $MAXCATEG) {
?>
<div class="wrapper" <?php if ($count == ($MAXCATEG - 2)) { <div class="wrapper" <?php if ($count == ($MAXCATEG - 2)) {
echo 'onclick="MoreCategories(\'less\');"'; echo 'onclick="MoreCategories(\'less\');"';
} elseif ($count == ($MAXCATEG - 1)) { } elseif ($count == ($MAXCATEG - 1)) {
@ -1235,25 +1239,28 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
<?php } ?> <?php } ?>
<div class="catwatermark" id='catwatermark<?php echo $count; ?>'>...</div> <div class="catwatermark" id='catwatermark<?php echo $count; ?>'>...</div>
</div> </div>
<?php <?php
$count++; $count++;
} }
?> ?>
</div> </div>
<!-- Show product --> <!-- Show product -->
<div class="div5"> <div class="div5"<?php if ($conf->global->TAKEPOS_HIDE_CATEGORIES == 1) {
print ' style="width:100%;"';
} ?>>
<?php <?php
$count = 0; $count = 0;
while ($count < $MAXPRODUCT) { while ($count < $MAXPRODUCT) {
print '<div class="wrapper2" id="prodiv'.$count.'" ';
?> ?>
<div class="wrapper2" id='prodiv<?php echo $count; ?>' <?php if ($count == ($MAXPRODUCT - 2)) { <?php if ($count == ($MAXPRODUCT - 2)) {
?> onclick="MoreProducts('less');" <?php ?> onclick="MoreProducts('less');" <?php
} if ($count == ($MAXPRODUCT - 1)) { } if ($count == ($MAXPRODUCT - 1)) {
?> onclick="MoreProducts('more');" <?php ?> onclick="MoreProducts('more');" <?php
} else { } else {
echo 'onclick="ClickProduct('.$count.');"'; echo 'onclick="ClickProduct('.$count.');"';
} ?>> } ?>>
<?php <?php
if ($count == ($MAXPRODUCT - 2)) { if ($count == ($MAXPRODUCT - 2)) {
//echo '<img class="imgwrapper" src="img/arrow-prev-top.png" height="100%" id="proimg'.$count.'" />'; //echo '<img class="imgwrapper" src="img/arrow-prev-top.png" height="100%" id="proimg'.$count.'" />';