2
0
forked from Wavyzz/dolibarr

Clean page

This commit is contained in:
Laurent Destailleur
2016-10-28 18:05:46 +02:00
parent d866ef66c3
commit 22d2557a48
5 changed files with 21 additions and 21 deletions

View File

@@ -2283,7 +2283,7 @@ function img_picto($titlealt, $picto, $options = '', $pictoisfullpath = false, $
else else
{ {
$tmparray=array(0=>$titlealt); $tmparray=array(0=>$titlealt);
if (preg_match('/:[^\s]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB if (preg_match('/:[^\s0-9]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB
$title=$tmparray[0]; $title=$tmparray[0];
$alt=empty($tmparray[1])?'':$tmparray[1]; $alt=empty($tmparray[1])?'':$tmparray[1];
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($options?' '.$options:'').'>'; // Alt is used for accessibility, title for popup return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($options?' '.$options:'').'>'; // Alt is used for accessibility, title for popup

View File

@@ -434,7 +434,7 @@ else
if (! empty($arrayfields['pfp.ref_fourn']['checked'])) print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"],"pfp.ref_fourn","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['pfp.ref_fourn']['checked'])) print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"],"pfp.ref_fourn","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"],"p.label","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"],"p.label","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['p.barcode']['checked'])) print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"],"p.barcode","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.barcode']['checked'])) print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"],"p.barcode","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"],"p.duration","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"],"p.duration","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"],"p.seuil_stock_alerte","",$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.seuil_stock_alerte']['checked'])) print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"],"p.seuil_stock_alerte","",$param,'align="right"',$sortfield,$sortorder);

View File

@@ -340,30 +340,30 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
print "\n".'<div class="fichehalfright"><div class="ficheaddleft">'."\n"; print "\n".'<div class="fichehalfright"><div class="ficheaddleft">'."\n";
} }
// Show graph // Date generation
if ($graphfiles[$key]['output'] && ! $px->isGraphKo())
{
if (file_exists($dir."/".$graphfiles[$key]['file']) && filemtime($dir."/".$graphfiles[$key]['file'])) $dategenerated=$langs->trans("GeneratedOn",dol_print_date(filemtime($dir."/".$graphfiles[$key]['file']),"dayhour"));
else $dategenerated=$langs->trans("GeneratedOn",dol_print_date(dol_now(),"dayhour"));
}
else
{
print $dategenerated=($mesg?'<font class="error">'.$mesg.'</font>':$langs->trans("ChartNotGenerated"));
}
$linktoregenerate='<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).((string) $type != ''?'&amp;type='.$type:'').'&amp;action=recalcul&amp;mode='.$mode.'">'.img_picto($langs->trans("ReCalculate").' ('.$dategenerated.')','refresh').'</a>';
// Show graph
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
// Label // Label
print '<tr class="liste_titre"><td colspan="2">'; print '<tr class="liste_titre"><td>';
print $graphfiles[$key]['label']; print $graphfiles[$key]['label'];
print '</td></tr>'; print '</td>';
print '<td align="right">'.$linktoregenerate.'</td>';
print '</tr>';
// Image // Image
print '<tr class="impair"><td colspan="2" class="nohover" align="center">'; print '<tr class="impair"><td colspan="2" class="nohover" align="center">';
print $graphfiles[$key]['output']; print $graphfiles[$key]['output'];
print '</td></tr>'; print '</td></tr>';
// Date generation
print '<tr>';
if ($graphfiles[$key]['output'] && ! $px->isGraphKo())
{
if (file_exists($dir."/".$graphfiles[$key]['file']) && filemtime($dir."/".$graphfiles[$key]['file'])) print '<td>'.$langs->trans("GeneratedOn",dol_print_date(filemtime($dir."/".$graphfiles[$key]['file']),"dayhour")).'</td>';
else print '<td>'.$langs->trans("GeneratedOn",dol_print_date(dol_now(),"dayhour")).'</td>';
}
else
{
print '<td>'.($mesg?'<font class="error">'.$mesg.'</font>':$langs->trans("ChartNotGenerated")).'</td>';
}
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).((string) $type != ''?'&amp;type='.$type:'').'&amp;action=recalcul&amp;mode='.$mode.'">'.img_picto($langs->trans("ReCalculate"),'refresh').'</a></td>';
print '</tr>';
print '</table>'; print '</table>';
if ($i % 2 == 0) if ($i % 2 == 0)

View File

@@ -641,7 +641,7 @@ div.myavailability {
.minwidth500imp { min-width: 300px !important; } .minwidth500imp { min-width: 300px !important; }
} }
@media only screen and (max-width: 960px) @media only screen and (max-width: 1000px)
{ {
.maxwidthonsmartphone { max-width: 100px; } .maxwidthonsmartphone { max-width: 100px; }
.minwidth50imp { min-width: 50px !important; } .minwidth50imp { min-width: 50px !important; }
@@ -822,7 +822,7 @@ div.ficheaddleft {
else print "margin-top: 10px;\n"; ?> else print "margin-top: 10px;\n"; ?>
} }
/* Force values on one colum for small screen */ /* Force values on one colum for small screen */
@media only screen and (max-width: 960px) @media only screen and (max-width: 1000px)
{ {
div.fiche { div.fiche {
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:($dol_hide_leftmenu?'6':'20')); ?>px; margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:($dol_hide_leftmenu?'6':'20')); ?>px;

View File

@@ -635,7 +635,7 @@ div.myavailability {
.minwidth500imp { min-width: 300px !important; } .minwidth500imp { min-width: 300px !important; }
} }
@media only screen and (max-width: 960px) @media only screen and (max-width: 1000px)
{ {
.maxwidthonsmartphone { max-width: 100px; } .maxwidthonsmartphone { max-width: 100px; }
.minwidth50imp { min-width: 50px !important; } .minwidth50imp { min-width: 50px !important; }