NEW : ShowAll/HideAll Options
This commit is contained in:
parent
093cec316d
commit
2343ff2ed4
@ -615,7 +615,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$(".collapse_bom").click(function() {
|
||||
|
||||
var id_bom_line = $(this).attr('id').replace('collapse-', '');
|
||||
console.log('tr [parentid="'+ id_bom_line +'"]')
|
||||
if($(this).text().indexOf('+') > 0) {
|
||||
$('[parentid="'+ id_bom_line +'"]').show();
|
||||
$(this).html('(-) ');
|
||||
@ -630,14 +629,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
//TODO : SHOW ALL / COLLAPSE ALL
|
||||
$("#show_all").click(function() {
|
||||
$("[class^=batch_warehouse]").show();
|
||||
$("[class^=collapse_batch]").html('(-) ');
|
||||
$("[class^=sub_bom_lines]").show();
|
||||
$("[class^=collapse_bom]").html('(-) ');
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#hide_all").click(function() {
|
||||
$("[class^=batch_warehouse]").hide();
|
||||
$("[class^=collapse_batch]").html('(+) ');
|
||||
$("[class^=sub_bom_lines]").hide();
|
||||
$("[class^=collapse_bom]").html('(+) ');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
@ -43,6 +43,8 @@ print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
|
||||
print "<thead>\n";
|
||||
|
||||
print '<tr class="liste_titre nodrag nodrop">';
|
||||
print '<a id="show_all" href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a> ';
|
||||
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> ';
|
||||
|
||||
// Adds a line numbering column
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
|
||||
@ -193,7 +193,7 @@ if ($resql){
|
||||
$sub_bom_line = new BOMLine($object->db);
|
||||
$sub_bom_line->fetch($obj->rowid);
|
||||
|
||||
print '<tr style="display:none" parentid="'.$line->id.'">';
|
||||
print '<tr style="display:none" class="sub_bom_lines" parentid="'.$line->id.'">';
|
||||
|
||||
print '<td id="sub_bom_product_'.$sub_bom_line->id.'"> '.$sub_bom_product->getNomUrl(1).'</td>';
|
||||
if ($sub_bom_line->fk_bom_child > 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user