fix(print): no a4 and css for indications
This commit is contained in:
parent
02d4515fe0
commit
7290d7272b
4 changed files with 10 additions and 25 deletions
|
@ -7,16 +7,6 @@
|
||||||
height: 295mm;
|
height: 295mm;
|
||||||
border: 1px dotted #aaa;
|
border: 1px dotted #aaa;
|
||||||
}
|
}
|
||||||
.indications,
|
|
||||||
.indications2 {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.yw-main-content.alone .indications,
|
|
||||||
.yw-main-content.alone .indications2,
|
|
||||||
.include:last-child .indications,
|
|
||||||
.include:last-child .indications2 {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.indications img,
|
.indications img,
|
||||||
.indications2 img {
|
.indications2 img {
|
||||||
width: 185mm;
|
width: 185mm;
|
||||||
|
@ -218,7 +208,9 @@
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
--padding-x: 0;
|
--padding-x: 0;
|
||||||
}
|
}
|
||||||
.full-portrait-a4 {
|
.full-portrait-a4,
|
||||||
|
.indications,
|
||||||
|
.indications2 {
|
||||||
page-break-after: always;
|
page-break-after: always;
|
||||||
max-width: 210mm;
|
max-width: 210mm;
|
||||||
max-height: 297mm;
|
max-height: 297mm;
|
||||||
|
|
|
@ -35,10 +35,10 @@ $structure = !empty($fiche['bf_structure']) ? $fiche['bf_structure'] : $fiche['b
|
||||||
|
|
||||||
$indications = '';
|
$indications = '';
|
||||||
if ($_GET['wiki'] == $fiche['id_fiche']) {
|
if ($_GET['wiki'] == $fiche['id_fiche']) {
|
||||||
$indications = '<div class="full-portrait-a4 indications">
|
$indications = '<div class="indications">
|
||||||
<img src="custom/templates/bazar/assets/Instructions_pliage_recto.webp" alt="instructions recto" />
|
<img src="custom/templates/bazar/assets/Instructions_pliage_recto.webp" alt="instructions recto" />
|
||||||
</div>
|
</div>
|
||||||
<div class="full-portrait-a4 indications2">
|
<div class="indications2">
|
||||||
<img src="custom/templates/bazar/assets/Instructions_pliage_verso.webp" alt="instructions verso" />
|
<img src="custom/templates/bazar/assets/Instructions_pliage_verso.webp" alt="instructions verso" />
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
@ -85,13 +85,6 @@ echo <<<TEMPLATE
|
||||||
</div>
|
</div>
|
||||||
{$indications}
|
{$indications}
|
||||||
<button style="margin-top:1em;" class="btn btn-primary no-print new-window" onclick="window.print()"><i class="fa fa-print" aria-hidden="true"></i> Imprimer cette fiche</button>
|
<button style="margin-top:1em;" class="btn btn-primary no-print new-window" onclick="window.print()"><i class="fa fa-print" aria-hidden="true"></i> Imprimer cette fiche</button>
|
||||||
<script>
|
|
||||||
// un hack tres aléatoire des css print de bootstrap
|
|
||||||
//document.addEventListener('DOMContentLoaded', function(event) {
|
|
||||||
// document.styleSheets[0].cssRules[40].cssRules[0].style= []
|
|
||||||
//})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
TEMPLATE;
|
TEMPLATE;
|
||||||
if (!empty($_GET['returnTo'])) {
|
if (!empty($_GET['returnTo'])) {
|
||||||
echo <<<JS
|
echo <<<JS
|
||||||
|
|
|
@ -12,13 +12,13 @@ $renderedEntry; echo '<a
|
||||||
>'; } else { $activites = explode(',', $fiche['bf_activite']); foreach
|
>'; } else { $activites = explode(',', $fiche['bf_activite']); foreach
|
||||||
($activites as $activite) { echo $GLOBALS['wiki']->Format('{{include
|
($activites as $activite) { echo $GLOBALS['wiki']->Format('{{include
|
||||||
page="'.$activite.'"}}'); } echo '
|
page="'.$activite.'"}}'); } echo '
|
||||||
<div class="full-portrait-a4 indications">
|
<div class="indications">
|
||||||
<img
|
<img
|
||||||
src="custom/templates/bazar/assets/Instructions_pliage_recto.webp"
|
src="custom/templates/bazar/assets/Instructions_pliage_recto.webp"
|
||||||
alt="instructions recto"
|
alt="instructions recto"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="full-portrait-a4 indications2">
|
<div class="indications2">
|
||||||
<img
|
<img
|
||||||
src="custom/templates/bazar/assets/Instructions_pliage_verso.webp"
|
src="custom/templates/bazar/assets/Instructions_pliage_verso.webp"
|
||||||
alt="instructions verso"
|
alt="instructions verso"
|
||||||
|
|
|
@ -132,12 +132,12 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
$.each( $('.selected'), function( key, value ) {
|
$.each( $('.selected'), function( key, value ) {
|
||||||
content = content + "\n" +'{{include page="'+value.getAttribute('data-tag')+'"}}'
|
content = content + "\n" +'{{include page="'+value.getAttribute('data-tag')+'"}}'
|
||||||
});
|
});
|
||||||
content = content + '<div class="full-portrait-a4 indications">'
|
content = content + '""<div class="indications">'
|
||||||
+ '<img src="custom/templates/bazar/assets/Instructions_pliage_recto.webp" alt="instructions recto" />'
|
+ '<img src="custom/templates/bazar/assets/Instructions_pliage_recto.webp" alt="instructions recto" />'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '<div class="full-portrait-a4 indications2">'
|
+ '<div class="indications2">'
|
||||||
+ '<img src="custom/templates/bazar/assets/Instructions_pliage_verso.webp" alt="instructions verso" />'
|
+ '<img src="custom/templates/bazar/assets/Instructions_pliage_verso.webp" alt="instructions verso" />'
|
||||||
+ '</div>'
|
+ '</div>""'
|
||||||
window.location.href = '/?wiki/render&print=1&content='+content+'&returnTo=<?php echo $GLOBALS['wiki']->href('', 'Merci'); ?>';
|
window.location.href = '/?wiki/render&print=1&content='+content+'&returnTo=<?php echo $GLOBALS['wiki']->href('', 'Merci'); ?>';
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue