From 022b96e5fa9c28d7e271287de0da974088618cf6 Mon Sep 17 00:00:00 2001
From: Simon Leblanc <contact@leblanc-simon.eu>
Date: Mon, 27 Jun 2011 01:34:06 +0200
Subject: [PATCH] Modification de la feuille de style d'impression

---
 fonctions.php |  3 ++-
 print.css     | 41 +++++++++++++++++++++++++++++++++++++----
 studs.php     |  6 +++---
 style.css     |  6 +++++-
 4 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/fonctions.php b/fonctions.php
index 752b096e..adc128b6 100644
--- a/fonctions.php
+++ b/fonctions.php
@@ -129,7 +129,8 @@ function print_header($js = false, $nom_sondage = '')
     <title>'.NOMAPPLICATION.'</title>';
   }
   echo '
-    <link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">';
+    <link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">
+    <link rel="stylesheet" type="text/css" href="'.get_server_name().'print.css" media="print">';
   
   echo '</head>';
 }
diff --git a/print.css b/print.css
index 90393cd1..5070c496 100644
--- a/print.css
+++ b/print.css
@@ -1,10 +1,43 @@
+@import url(./style.css);
+
 .corps {
-    width: 100% !important;
-    overflow-x: none;
+  width: auto;
+  border:0;
+  border-radius:0;
+  box-shadow:none;
 }
 .sousbandeau {
-    display: none !important;
+  display:none;
 }
 body {
-    background-color: none !important;
+  background:none;
+}
+
+.imprimer {
+  display:none;
+}
+
+.casevide {
+  display:none;
+}
+
+div.cadre div.information {
+  display:none;
+}
+
+div.cadre td.ok, div.cadre td.non, div.cadre td.somme {
+  background:none;
+  border:1px solid black;
+}
+
+div.cadre tr:last-child td {
+  border:none;
+}
+
+div.cadre tr.ajout_reponse {
+  display:none;
+}
+
+div.addcomment {
+  display:none;
 }
\ No newline at end of file
diff --git a/studs.php b/studs.php
index 0a1ae98d..ed7649e1 100644
--- a/studs.php
+++ b/studs.php
@@ -261,9 +261,9 @@ echo '</div>'."\n";
 echo '<form name="formulaire" action="'.getUrlSondage($dsondage->id_sondage).'"'.'#bas" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
 echo '<input type="hidden" name="sondage" value="' . $numsondage . '"/>';
 // Todo : add CSRF protection
-echo '<div class="cadre"> '."\n";
+echo '<div class="cadre"><div class="information">'."\n";
 echo _("If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br>(without paying attention to the choices of the other voters) and validate with the plus button at the end of the line.") ."\n";
-echo '<br><br>'."\n";
+echo '</div>'."\n";
 
 // Debut de l'affichage des resultats du sondage
 echo '<table class="resultats">'."\n";
@@ -492,7 +492,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
 
 // affichage de la ligne pour un nouvel utilisateur
 if (!isset($_SERVER['REMOTE_USER']) || !$user_mod) {
-  echo '<tr>'."\n";
+  echo '<tr class="ajout_reponse">'."\n";
   echo '<td class="nom">'."\n";
   if (isset($_SESSION['nom'])) {
     $nom = stripslashes($_SESSION['nom']);
diff --git a/style.css b/style.css
index 52b6cfed..8c4f8f74 100644
--- a/style.css
+++ b/style.css
@@ -45,7 +45,7 @@ de Studs.
 */
 
 @import url('./buttons.css');
-@import url('print.css') print;
+
 body {
   margin:0;
   background: #F7FAFE;
@@ -327,6 +327,10 @@ div.cadre {
 	text-align:center;
 	margin:0 auto;
 }
+/*information au sujet de la participation au sondage*/
+div.cadre div.information {
+	margin-bottom:20px;
+}
 /*la table des résultats dans l'affichage de sondage*/
 div.cadre table.resultats {
 	background-color: white; 
-- 
GitLab