FIX : Hide all and check all links always available

This commit is contained in:
Gauthier PC portable 024 2021-04-19 14:46:28 +02:00
parent 894eb1e5a4
commit 2236d1b07f

View File

@ -545,8 +545,6 @@ if ($id > 0 || $ref)
});
$("#show_all").click(function() {
$(this).hide();
$("#hide_all").show();
$("[class^=batch_warehouse]").show();
$("[class^=collapse_batch]").html('(-) ');
return false;
@ -554,8 +552,6 @@ if ($id > 0 || $ref)
$("#hide_all").click(function() {
$("[class^=batch_warehouse]").hide();
$(this).hide();
$("#show_all").show();
$("[class^=collapse_batch]").html('(+) ');
return false;
});
@ -872,8 +868,8 @@ if (!$variants) {
if ((!empty($conf->productbatch->enabled)) && $object->hasbatch()) {
$colspan = 3;
print '<tr class="liste_titre"><td width="14%">';
print '<a style="display:'.(!empty($conf->global->STOCK_SHOW_ALL_BATCH_BY_DEFAULT) ? 'visible' : 'none').';" id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a>';
print '<a style="display:'.(!empty($conf->global->STOCK_SHOW_ALL_BATCH_BY_DEFAULT) ? 'none' : 'visible').';" id="show_all" href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a>';
print '<a id="show_all" href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a><br>';
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a>';
print '</td>';
print '<td class="right" width="10%">'.$langs->trans("batch_number").'</td>';
if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {