From c5e01667ee9ce252550f100935d29ea00855130e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Wed, 17 Feb 2010 18:27:20 +0000 Subject: [PATCH] Add class style "photo" to all photos. --- .../menus/barre_left/eldy_backoffice.php | 2 +- .../menus/barre_top/eldy_backoffice.php | 2 ++ htdocs/product.class.php | 9 ++++---- htdocs/product/document.php | 2 +- htdocs/product/fiche.php | 21 ++++++++++--------- htdocs/product/photos.php | 5 +++-- htdocs/product/stats/commande.php | 2 +- htdocs/product/stats/commande_fournisseur.php | 2 +- htdocs/product/stats/contrat.php | 2 +- htdocs/product/stats/facture.php | 2 +- htdocs/product/stats/facture_fournisseur.php | 2 +- htdocs/product/stats/fiche.php | 2 +- htdocs/product/stats/propal.php | 2 +- htdocs/product/stock/product.php | 6 +++--- htdocs/theme/auguria/auguria.css.php | 6 ++++++ htdocs/theme/bluelagoon/bluelagoon.css.php | 6 ++++++ htdocs/theme/eldy/eldy.css.php | 6 ++++++ htdocs/theme/freelug/freelug.css.php | 6 ++++++ htdocs/theme/rodolphe/rodolphe.css.php | 8 +++++++ htdocs/theme/yellow/yellow.css.php | 6 ++++++ 20 files changed, 71 insertions(+), 28 deletions(-) diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index 0c5eaddf012..7904d09bc8e 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -890,7 +890,7 @@ class MenuLeft { $newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,0,'eldy'); /* - * Menu AUTRES (Pour les menus du haut qui ne serait pas g�r�s) + * Menu AUTRES (Pour les menus du haut qui ne serait pas geres) */ if ($mainmenu && ! in_array($mainmenu,$this->overwritemenufor)) { $mainmenu=""; } diff --git a/htdocs/includes/menus/barre_top/eldy_backoffice.php b/htdocs/includes/menus/barre_top/eldy_backoffice.php index ff76ef24527..f2345d94cc3 100644 --- a/htdocs/includes/menus/barre_top/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_backoffice.php @@ -440,6 +440,7 @@ class MenuTop { else $class='class="tmenu"'; print '<td class="tmenu" id="td_'.$idsel.'">'; + print '<span id="mainmenu_'.$idsel.'">'; print '<a '.$class.' id="mainmenu_'.$idsel.'" href="'.$url.'"'.($tabMenu[$i]['atarget']?" target='".$tabMenu[$i]['atarget']."'":($this->atarget?" target=$this->atarget":"")).'>'; print $tabMenu[$i]['titre']; print '</a>'; @@ -458,6 +459,7 @@ class MenuTop { } print '</tr></table>'; + print "\n"; } } diff --git a/htdocs/product.class.php b/htdocs/product.class.php index a05c774c050..5d38a3c84f3 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -2459,10 +2459,10 @@ class Product extends CommonObject // Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine if ($photo_vignette && dol_is_file($dirthumb.$photo_vignette)) { - print '<img border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdirthumb.$photo_vignette).'">'; + print '<img class="photo" border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdirthumb.$photo_vignette).'">'; } else { - print '<img border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$photo).'">'; + print '<img class="photo" border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$photo).'">'; } print '</a>'; @@ -2472,8 +2472,9 @@ class Product extends CommonObject } - if ($size == 0) // Format origine - print '<img border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$photo).'">'; + if ($size == 0) { // Format origine + print '<img class="photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$photo).'">'; + } // On continue ou on arrete de boucler ? if ($nbmax && $nbphoto >= $nbmax) break; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 6283ec2a8c6..fe98fdb883c 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -148,7 +148,7 @@ if ($product->id) // Reference print '<tr>'; - print '<td width="28%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 3d5804ec740..46bb90f2efd 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -845,17 +845,18 @@ if ($_GET["id"] || $_GET["ref"]) print '<table class="border" width="100%"><tr>'; // Reference - print '<td width="15%">'.$langs->trans("Ref").'</td><td width="85%">'; + print '<td width="15%">'.$langs->trans("Ref").'</td><td>'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; - $nblignes=6; - if ($product->isproduct() && $conf->stock->enabled) $nblignes++; - if ($product->isservice()) $nblignes++; + $nblignes=4; + if (! empty($conf->global->PRODUIT_MULTIPRICES_LIMIT) && empty($socid)) $nblignes+=$conf->global->PRODUIT_MULTIPRICES_LIMIT; + else $nblignes+=3; + if ($product->is_photo_available($conf->produit->dir_output)) { // Photo - print '<td valign="middle" align="center" rowspan="'.$nblignes.'">'; + print '<td valign="middle" align="center" width="30%" rowspan="'.$nblignes.'">'; $nbphoto=$product->show_photos($conf->produit->dir_output,1,1,0); print '</td>'; } @@ -992,7 +993,7 @@ if ($_GET["id"] || $_GET["ref"]) // Nature if($product->type!=1) { - print '<tr><td>'.$langs->trans("Nature").'</td><td>'; + print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="2">'; print $product->getLibFinished(); print '</td></tr>'; } @@ -1000,7 +1001,7 @@ if ($_GET["id"] || $_GET["ref"]) if ($product->isservice()) { // Duration - print '<tr><td>'.$langs->trans("Duration").'</td><td>'.$product->duration_value.' '; + print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="2">'.$product->duration_value.' '; if ($product->duration_value > 1) { $dur=array("h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); @@ -1016,7 +1017,7 @@ if ($_GET["id"] || $_GET["ref"]) else { // Weight / Volume - print '<tr><td>'.$langs->trans("Weight").'</td><td>'; + print '<tr><td>'.$langs->trans("Weight").'</td><td colspan="2">'; if ($product->weight != '') { print $product->weight." ".measuring_units_string($product->weight_units,"weight"); @@ -1027,7 +1028,7 @@ if ($_GET["id"] || $_GET["ref"]) } print "</td></tr>\n"; - print '<tr><td>'.$langs->trans("Volume").'</td><td>'; + print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="2">'; if ($product->volume != '') { print $product->volume." ".measuring_units_string($product->volume_units,"volume"); @@ -1040,7 +1041,7 @@ if ($_GET["id"] || $_GET["ref"]) } // Note - print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>'.nl2br($product->note).'</td></tr>'; + print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="2">'.nl2br($product->note).'</td></tr>'; print "</table>\n"; print "</div>\n<!-- CUT HERE -->\n"; diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 8eb84622916..f2373082425 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -83,7 +83,7 @@ $html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { $product = new Product($db); - + if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); if ($_GET["id"]) $result = $product->fetch($_GET["id"]); @@ -201,6 +201,7 @@ if ($_GET["id"] || $_GET["ref"]) // if ($nbbyrow && $nbphoto == 1) print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">'; + // Do not use show_photo because there is more information to show if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print '<tr align=center valign=middle border=1>'; if ($nbbyrow) print '<td width="'.ceil(100/$nbbyrow).'%" class="photo">'; @@ -224,7 +225,7 @@ if ($_GET["id"] || $_GET["ref"]) $imgWidth = ($product->imgWidth < $maxWidth) ? $product->imgWidth : $maxWidth; $imgHeight = ($product->imgHeight < $maxHeight) ? $product->imgHeight : $maxHeight; - print '<img border="0" width="'.$imgWidth.'" height="'.$imgHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$filename).'">'; + print '<img class="photo" border="0" width="'.$imgWidth.'" height="'.$imgHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$filename).'">'; print '</a>'; print '<br>'.$viewfilename; diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index f06a43d221a..829303d24b6 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -89,7 +89,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<tr>'; - print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index a1c5b2b0a52..7727f936a8a 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -86,7 +86,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<tr>'; - print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td></tr>'; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index b11a4a0bb51..789f9d8d59d 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -89,7 +89,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<tr>'; - print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 38c7d4414e8..951c6824324 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -91,7 +91,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<tr>'; - print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index b46829f2882..13a7c854e83 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -92,7 +92,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<tr>'; - print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 9c45e28cb0c..e3da40bf327 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -75,7 +75,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<tr>'; - print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index d7507d366e1..5b490c6aa07 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -86,7 +86,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<tr>'; - print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index e796ab4e5b1..18117b0be3e 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -142,7 +142,7 @@ if ($_GET["id"] || $_GET["ref"]) // Ref print '<tr>'; - print '<td width="25%">'.$langs->trans("Ref").'</td><td>'; + print '<td width="30%">'.$langs->trans("Ref").'</td><td>'; print $html->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; @@ -314,7 +314,7 @@ if ($_GET["id"] || $_GET["ref"]) print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="transfert_stock">'; print '<table class="border" width="100%">'; - + print '<tr>'; print '<td width="20%">'.$langs->trans("WarehouseSource").'</td><td width="20%">'; $formproduct->selectWarehouses($_GET["dwid"],'id_entrepot_source','',1); @@ -324,7 +324,7 @@ if ($_GET["id"] || $_GET["ref"]) print '</td>'; print '<td width="20%">'.$langs->trans("NumberOfUnit").'</td><td width="20%"><input name="nbpiece" size="10" value=""></td>'; print '</tr>'; - + // Label print '<tr>'; print '<td width="20%">'.$langs->trans("Label").'</td>'; diff --git a/htdocs/theme/auguria/auguria.css.php b/htdocs/theme/auguria/auguria.css.php index d9862bf77e6..f79e2ae6646 100644 --- a/htdocs/theme/auguria/auguria.css.php +++ b/htdocs/theme/auguria/auguria.css.php @@ -919,6 +919,12 @@ a.impayee:hover { font-weight: bold; color: #550000; } <?php print !empty($conf->browser->phone)?'display: none;':''; ?> } +.photo { +border: 0px; +/* filter:alpha(opacity=55); */ +/* opacity:.55; */ +} + div.titre { font-weight: normal; color: #57A2CA; diff --git a/htdocs/theme/bluelagoon/bluelagoon.css.php b/htdocs/theme/bluelagoon/bluelagoon.css.php index 22344ed8674..13affd135a0 100644 --- a/htdocs/theme/bluelagoon/bluelagoon.css.php +++ b/htdocs/theme/bluelagoon/bluelagoon.css.php @@ -634,6 +634,12 @@ a.impayee:hover { font-weight: bold; color: #550000; } <?php print !empty($conf->browser->phone)?'display: none;':''; ?> } +.photo { +border: 0px; +/* filter:alpha(opacity=55); */ +/* opacity:.55; */ +} + div.titre { font-family: Helvetica, Verdana; font-weight: normal; diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php index 2835cb1b731..58ccc4a6f12 100644 --- a/htdocs/theme/eldy/eldy.css.php +++ b/htdocs/theme/eldy/eldy.css.php @@ -1017,6 +1017,12 @@ a.impayee:hover { font-weight: bold; color: #550000; } <?php print !empty($conf->browser->phone)?'display: none;':''; ?> } +.photo { +border: 0px; +/* filter:alpha(opacity=55); */ +/* opacity:.55; */ +} + div.titre { font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; diff --git a/htdocs/theme/freelug/freelug.css.php b/htdocs/theme/freelug/freelug.css.php index 40fa12f478d..b3d94f9b9b0 100644 --- a/htdocs/theme/freelug/freelug.css.php +++ b/htdocs/theme/freelug/freelug.css.php @@ -733,6 +733,12 @@ a.impayee:hover { font-weight: bold; color: #550000; } <?php print !empty($conf->browser->phone)?'display: none;':''; ?> } +.photo { +border: 0px; +/* filter:alpha(opacity=55); */ +/* opacity:.55; */ +} + div.titre { font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; diff --git a/htdocs/theme/rodolphe/rodolphe.css.php b/htdocs/theme/rodolphe/rodolphe.css.php index 194e9b8c141..a319ea21bdb 100644 --- a/htdocs/theme/rodolphe/rodolphe.css.php +++ b/htdocs/theme/rodolphe/rodolphe.css.php @@ -649,10 +649,18 @@ a.impayee:hover { font-weight: bold; color: #550000; } * Other */ +.fieldrequired { font-weight: bold; color: #000055; } + #pictotitle { <?php print !empty($conf->browser->phone)?'display: none;':''; ?> } +.photo { +border: 0px; +/* filter:alpha(opacity=55); */ +/* opacity:.55; */ +} + div.titre { font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; diff --git a/htdocs/theme/yellow/yellow.css.php b/htdocs/theme/yellow/yellow.css.php index e369f1de082..577a85b20c1 100644 --- a/htdocs/theme/yellow/yellow.css.php +++ b/htdocs/theme/yellow/yellow.css.php @@ -723,6 +723,12 @@ a.impayee:hover { font-weight: bold; color: #550000; } <?php print !empty($conf->browser->phone)?'display: none;':''; ?> } +.photo { +border: 0px; +/* filter:alpha(opacity=55); */ +/* opacity:.55; */ +} + div.titre { font-family: helvetica, verdana, arial, sans-serif; font-weight: normal; -- GitLab