Page 1 of 1
always print children records
Posted: 2016-02-17 18:18
by tuxor
Hi, I have various parent/child tables, and I like to show the detail view when users print the parent child. How can enable all the children detail view for all the parent tables? And hide the button to show the cihldren records.
Thanks
Re: always print children records
Posted: 2016-02-17 21:58
by a.gneady
The button to show children records is viewable only on the screen but doesn't get printed. We'll add an option in the next release (due very soon) to enable all children by default without having to click each child's button.
Re: always print children records
Posted: 2016-02-17 22:13
by tuxor
ok, so there is not a code to insert to enable print in all children tables? When is going to release the next version?
Thanks.
Re: always print children records
Posted: 2016-02-18 22:15
by a.gneady
OK, try this code in hooks/footer-extras.php:
Code: Select all
<script>
$j(function(){
$j('#children-tabs.hidden-print .btn').click();
})
</script>
Re: always print children records
Posted: 2016-03-09 03:43
by tuxor
Hi, I've tested the code but doesn't works. Any idea?
Re: always print children records
Posted: 2022-10-24 11:11
by AhmedBR
a.gneady wrote: ↑2016-02-17 21:58
we'll add an option in the next release (due very soon) to enable all children by default without having to click each child's button.
Hi,
Was this option added? if yes, where?
(the above code does not work 22.14)
Thanks
Re: always print children records
Posted: 2022-10-24 11:43
by AhmedBR
For a quick solution, added this to the file: table_template.DVP.html
Code: Select all
<script>
setTimeout(function(){
// toggle back after 1 second
$j('#children-tabs button').click();
},500);
</script>
It is a custom print template page, it is not going to be overwritten.