Followup : show attached document if click on the title 'Files'

This commit is contained in:
sparkyx 2025-03-15 11:38:05 +01:00
parent e60591a0a8
commit 0dfa2f1246

View file

@ -587,14 +587,24 @@ catch(exception) { alert('<?php echo j(_('Je ne peux pas ajouter de fichier'))?>
<?php if (($p_view != 'READ' && $str_select_doc != '' )|| ! empty ($aAttachedFile)) : ?>
<div id="div_action_attached_doc">
<h2 class="h-section">
<h2 class="h-section" style="cursor:pointer" id="h2_action_attached<?=$uniq?>">
<?php
$a= _('Pièces attachées');
// variable: color if files
$class=( count($aAttachedFile)>0)?"cell highlight":"";
printf('%s <span class="%s"> (%s)</span>',$a,$class,count($aAttachedFile));
?>
</h2>
<script>
(function() {
$("h2_action_attached<?=$uniq?>").addEventListener('click',function() {
$('all_attached_files_div<?=$uniq?>').show();
})
} )();
</script>
<div class="noprint">
<?php
/**********************************************************************************************************************