From 0308ed1088e331f61fa68e0ef4e5edbe78b9234e Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 14 Nov 2011 18:37:04 +0100
Subject: [PATCH] Look: Uniformize css

---
 htdocs/compta/facture.php                    |  3 ++-
 htdocs/core/class/html.formactions.class.php |  2 +-
 htdocs/core/class/html.formfile.class.php    | 18 +++++++++---------
 htdocs/theme/eldy/style.css.php              | 16 +++++++++++-----
 htdocs/user/fiche.php                        |  8 ++++----
 5 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 9086d0992a9..2103c50dd99 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2913,7 +2913,8 @@ else
                 $delallowed=$user->rights->facture->supprimer;
 
                 print '<br>';
-                $somethingshown=$formfile->show_documents('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang,$hookmanager);
+                print $formfile->showdocuments('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang,$hookmanager);
+                $somethingshown=$formfile->numoffiles;
 
                 /*
                  * Linked object block
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 207de988a4f..062ad198f73 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -134,7 +134,7 @@ class FormActions
 
         	$total = 0;	$var=true;
         	print '<table class="border" width="100%">';
-        	print '<tr '.$bc[$var].'><td>'.$langs->trans('Ref').'</td><td>'.$langs->trans('Date').'</td><td>'.$langs->trans('Action').'</td><td>'.$langs->trans('By').'</td></tr>';
+        	print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans('Ref').'</th><th class="liste_titre">'.$langs->trans('Date').'</th><th class="liste_titre">'.$langs->trans('Action').'</th><th class="liste_titre">'.$langs->trans('By').'</th></tr>';
         	print "\n";
 
         	foreach($actioncomm->actions as $action)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index b76ed8c3724..52c68848b15 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -369,12 +369,12 @@ class FormFile
             $out.= '<div class="titre">'.$titletoshow.'</div>';
             $out.= '<table class="border formdoc" summary="listofdocumentstable" width="100%">';
 
-            $out.= '<tr '.$bc[$var].'>';
+            $out.= '<tr class="liste_titre">';
 
             // Model
             if (! empty($modellist))
             {
-                $out.= '<td align="center" class="formdoc">';
+                $out.= '<th align="center" class="formdoc liste_titre">';
                 $out.= $langs->trans('Model').' ';
                 if (is_array($modellist) && count($modellist) == 1)    // If there is only one element
                 {
@@ -382,17 +382,17 @@ class FormFile
                     $modelselected=$arraykeys[0];
                 }
                 $out.= $form->selectarray('model',$modellist,$modelselected,$showempty,0,0);
-                $out.= '</td>';
+                $out.= '</th>';
             }
             else
             {
-                $out.= '<td align="left" class="formdoc">';
+                $out.= '<th align="left" class="formdoc liste_titre">';
                 $out.= $langs->trans("Files");
-                $out.= '</td>';
+                $out.= '</th>';
             }
 
             // Language code (if multilang)
-            $out.= '<td align="center" class="formdoc">';
+            $out.= '<th align="center" class="formdoc liste_titre">';
             if (($allowgenifempty || (is_array($modellist) && count($modellist) > 0)) && $conf->global->MAIN_MULTILANGS && ! $forcenomultilang)
             {
                 include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php');
@@ -404,10 +404,10 @@ class FormFile
             {
                 $out.= '&nbsp;';
             }
-            $out.= '</td>';
+            $out.= '</th>';
 
             // Button
-            $out.= '<td align="center" colspan="'.($delallowed?'2':'1').'" class="formdocbutton">';
+            $out.= '<th align="center" colspan="'.($delallowed?'2':'1').'" class="formdocbutton liste_titre">';
             $out.= '<input class="button" id="'.$forname.'_generatebutton"';
             $out.= ' type="submit" value="'.$buttonlabel.'"';
             if (! $allowgenifempty && ! is_array($modellist) && empty($modellist)) $out.= ' disabled="disabled"';
@@ -417,7 +417,7 @@ class FormFile
                 $langs->load("errors");
                 $out.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
             }
-            $out.= '</td>';
+            $out.= '</th>';
 
             $out.= '</tr>';
 
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 1e288bd568f..4cb8fcb67ee 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -91,7 +91,6 @@ a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; fo
 input:focus, textarea:focus, button:focus, select:focus {
     box-shadow: 0 0 4px #8091BF;
 }
-
 input, input.flat, textarea, textarea.flat, form.flat select, select.flat {
     font-size: <?php print $fontsize ?>px;
 	font-family: <?php print $fontlist ?>;
@@ -133,6 +132,9 @@ textarea:disabled {
 .button:hover   {
 	background: #dee7ec;
 }
+.button:disabled {
+	background: #ddd;
+}
 .buttonajax {
     font-family: <?php print $fontlist ?>;
 	border: 0px;
@@ -155,6 +157,14 @@ div.float
 {
     float:<?php print $left; ?>;
 }
+th .button {
+    -moz-box-shadow: none !important;
+    -webkit-box-shadow: none !important;
+    box-shadow: none !important;
+	-moz-border-radius:0px !important;
+	-webkit-border-radius:0px !important;
+	border-radius:0px !important;	
+}
 
 /* ============================================================================== */
 /* Styles to hide objects                                                         */
@@ -954,10 +964,6 @@ a.tabTitle {
     margin: 0px 6px;
     text-decoration: none;
     white-space: nowrap;
-
-    border-<?php print $right; ?>: 1px solid #555555;
-    border-<?php print $left; ?>: 1px solid #D8D8D8;
-    border-top: 1px solid #D8D8D8;
 }
 
 a.tab:link {
diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index e18cd0020a5..7727f351915 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -1318,8 +1318,8 @@ else
                     print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
                     print '<input type="hidden" name="action" value="addgroup" />';
                     print '<table class="noborder" width="100%">'."\n";
-                    print '<tr class="liste_titre"><td class="liste_titre" width="25%">'.$langs->trans("GroupsToAdd").'</td>'."\n";
-                    print '<td>';
+                    print '<tr class="liste_titre"><th class="liste_titre" width="25%">'.$langs->trans("GroupsToAdd").'</th>'."\n";
+                    print '<th>';
                     print $form->select_dolgroups('','group',1,$exclude,0,'','',$fuser->entity);
                     print ' &nbsp; ';
                     // Multicompany
@@ -1341,7 +1341,7 @@ else
                     	print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
                     }
                     print '<input type="submit" class="button" value="'.$langs->trans("Add").'" />';
-                    print '</td></tr>'."\n";
+                    print '</th></tr>'."\n";
                     print '</table></form>'."\n";
 
                     print '<br>';
@@ -1516,7 +1516,7 @@ else
             print "</td></tr>\n";
 
             // Administrator
-            print "<tr>".'<td valign="top">'.$langs->trans("Administrator").'</td>';
+            print '<tr><td valign="top">'.$langs->trans("Administrator").'</td>';
             if ($fuser->societe_id > 0)
             {
                 print '<td>';
-- 
GitLab