Commit 7112f17f authored by Cedric d'Ham's avatar Cedric d'Ham
Browse files

CSS et ergonomie du menu d'export PDF

parent 58b508db
......@@ -150,14 +150,20 @@ table.labdoc_content{ font-size: 11px; border-collapse: collapse; }
*************************************************************************************/
/*dialog div */
#lb_pdf_dialog { left: 504px; top:37px; width: 350px; }
#lb_pdf_dialog { position: fixed; left: 559px; top:44px; width: 300px; padding: 15px 5px 15px 15px; background-color: #eaeaea; border: 1px solid #ccc; z-index: 500; display: none; font-size: 13px; }
#lb_pdf_dialog h2 { text-align: center; font-size: 115%; color: #555; font-weight: bold; cursor: move; }
#lb_pdf_choose_ld {
max-height:200px;
overflow:auto;
margin: 2px 0 15px 0;
padding: 0 4px 0 15px;
margin: 2px 0 5px 0;
padding-left: 10px;
display: none;
overflow-x: hidden;
overflow-y: scroll;
white-space: nowrap; /* Don't forget this one */
text-overflow: ellipsis;
}
#lb_pdf_choose_ld b { display: inline-block; margin-top: 3px; }
#lb_pdf_choose_ld b { display: inline-block; margin: 3px 0; }
#lb_pdf_dialog .lb_btn { margin-top: 20px; }
/************************************************************************************
* WIDGETS *
......
......@@ -184,7 +184,7 @@
"Afficher les parties sans LabDoc": "Show parts without LabDoc",
"Afficher tous les LabDocs du rapport": "Show all LabDocs in the report",
"Afficher tous les LabDocs sauf ceux cachés": "Show all LabDocs except hidden ones",
"Choisir les LabDocs à afficher :": "Choose the LabDocs to display:",
"Choisir les LabDocs à afficher": "Choose the LabDocs to display",
"Valider": "Validate",
"NB: Pour un affichage optimal, sélectionnez l'option \"Plus de paramètres / Graphiques d'arrière-plan\" dans la fenêtre d'impression": "NB: For an optimal display, select the option \"More settings / Background graphics\" in the print window",
"Construction du menu...": "Building the menu...",
......
......@@ -184,7 +184,7 @@
"Afficher les parties sans LabDoc": "",
"Afficher tous les LabDocs du rapport": "",
"Afficher tous les LabDocs sauf ceux cachés": "",
"Choisir les LabDocs à afficher :": "",
"Choisir les LabDocs à afficher": "",
"Valider": "",
"NB: Pour un affichage optimal, sélectionnez l'option \"Plus de paramètres / Graphiques d'arrière-plan\" dans la fenêtre d'impression": "",
"Construction du menu...": "",
......
......@@ -26,20 +26,6 @@ function disconnectFromLB() {
return true;
}
function controlLDtoPrint(clicked){
if (clicked === "ld_array") { // on sélectionne un LD particulier
if (document.getElementById('all_radio')) {
document.getElementById('all_radio').checked = false;
}
document.getElementById('labdocs_radio').checked = true;
} else if (clicked === "on" && $('#all_radio').is(":checked")) {
$("#lb_pdf_choose_ld input").prop("checked", true);
} else if (clicked === "off" && $('#nodraft_radio').is(":checked")) {
$("#lb_pdf_choose_ld input").each(function() {
$(this).prop("checked", !$(this).hasClass("hidden-content"));
})
}
}
function openDialogPrintPage(role, id_report){ // open a dialog to print the report
if (global_edited_ld) {
......@@ -63,10 +49,10 @@ function openDialogPrintPage(role, id_report){ // open a dialog to print the rep
+ "<input type='checkbox' name='print_assignment' id='print_assignment' value='print' /> <label for='print_assignment'>" + __("Afficher les consignes") + "</label><br/>"
+ "<input type='checkbox' name='print_empty_rp' id='print_empty_rp' value='print' /> <label for='print_empty_rp'>" + __("Afficher les parties sans LabDoc") + "</label><br/><br/>";
if (role !== 'teacher' || global_scope !== "follow") {
content += "<input type='radio' name='choice_ld' id='all_radio' value='all_ld' onchange='controlLDtoPrint(\"on\")'> <label for='all_radio'>" + __("Afficher tous les LabDocs du rapport") + "</label><br/>";
content += "<input type='radio' name='choice_ld' id='all_radio' value='all_ld' onClick='$(\"#lb_pdf_choose_ld\").hide()'> <label for='all_radio'>" + __("Afficher tous les LabDocs du rapport") + "</label><br/>";
}
content += "<input type='radio' name='choice_ld' id='nodraft_radio' value='no_draft' checked='checked' onClick='controlLDtoPrint(\"off\");'> <label for='nodraft_radio'>" + __("Afficher tous les LabDocs sauf ceux cachés") + "</label><br/>"
+ "<input type='radio' name='choice_ld' id='labdocs_radio' value ='chose_labdoc'/> <label for='labdocs_radio'>" + __("Choisir les LabDocs à afficher :") + " </label><br/>"
content += "<input type='radio' name='choice_ld' id='nodraft_radio' value='no_draft' checked='checked' onClick='$(\"#lb_pdf_choose_ld\").hide()'> <label for='nodraft_radio'>" + __("Afficher tous les LabDocs sauf ceux cachés") + "</label><br/>"
+ "<input type='radio' name='choice_ld' id='labdocs_radio' value ='chose_labdoc' onClick='$(\"#lb_pdf_choose_ld\").show()'/> <label for='labdocs_radio'>" + __("Choisir les LabDocs à afficher") + " </label><br/>"
+ "<p id='lb_pdf_choose_ld'>" + html + "</p>"
+ "<p style='text-align:center' >"
+ "<input type='submit' value='" + __("Valider") + "' class='lb_btn' onclick='$(\"#lb_pdf_dialog\").hide(); lbModal(false) ;'/> <input type='button' class='lb_btn' value='" + __("Annuler") + "' onclick='$(\"#lb_pdf_dialog\").hide(); lbModal(false) ; ' style='margin-left:20px;' /></p>";
......
<?php
/** @var \App\Helper $helper */
/** @var \App\ReportView $rv */
$content = '';
$rp = "" ;
foreach($rv->labdocs() as $ld){
/** @var \App\Helper $helper */
/** @var \App\ReportView $rv */
$content = '';
$rp = "" ;
foreach($rv->labdocs() as $ld){
if (!($ld->draft && $rv->is_teacher && $rv->is_follow)){ // on n'affiche pas les ld s'ils sont au brouillon, ET si c'est un teacher qui souhaite imprimer un rapport étudiant
if ($ld->title != $rp) { // new rp
$rp = $ld->title ;
?>
?>
<b>{{$rp}}</b><br/>
<?php
<?php
}
?>
?>
<label>
<input type="checkbox" name="ld_chosen{{$ld->id_labdoc}}"
value="{{$ld->id_labdoc}}"
onclick="controlLDtoPrint('ld_array')"
{{$ld->draft ? ' class="hidden-content"' : ""}} >
{{$ld->name . ($ld->draft ? " (caché)" : "")}}
<?php
if ($ld->draft) {
echo " (caché)" ;
}
echo "</label><br/>";
<input type="checkbox"
name="ld_chosen{{$ld->id_labdoc}}"
value="{{$ld->id_labdoc}}"
{{$ld->draft ? ' class="hidden-content"' : ""}} >
{{$ld->name . ($ld->draft ? " (" . __('caché') . ")" : "")}}
</label><br/>
<?php
}
}
......@@ -131,7 +131,7 @@ $report_env = array(
{!! $helper->loadAsset("/libraries/epsilonwriter/ew_modal.js") !!}
<?php } ?>
<div>
<div id="lb_pdf_dialog" class="lb_dialog_box"></div>
<div id="lb_pdf_dialog"></div>
<div id="lb_modal_cover"></div>
<!-- menu bar -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment