From 27e59866b0d56457b269e9b1dac48879151b064e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Oct 2013 01:08:37 +0200 Subject: [PATCH] Fix: responsive desing of page --- htdocs/product/stats/fiche.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 4b706a0c6ee..dc38631e99a 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -29,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; +$WIDTH=DolGraph::getDefaultGraphSizeForStats('width',380); +$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height',160); + $langs->load("companies"); $langs->load("products"); $langs->load("bills"); @@ -97,23 +100,28 @@ if (! empty($id) || ! empty($ref)) // Choice of stats + if (! empty($conf->dol_use_jmobile)) print "\n".'
'."\n"; + if ($mode == 'bynumber') print ''; else print img_picto('','tick').' '; print $langs->trans("StatsByNumberOfUnits"); if ($mode == 'bynumber') print ''; - print '       '; + + if (! empty($conf->dol_use_jmobile)) print '
'."\n".'
'."\n"; + else print '   /   '; + if ($mode == 'byunit') print ''; else print img_picto('','tick').' '; print $langs->trans("StatsByNumberOfEntities"); if ($mode == 'byunit') print ''; - print '

'; + if (! empty($conf->dol_use_jmobile)) print '
'; + else print '
'; + print '
'; //print ''; // Generation des graphs - $WIDTH=380; - $HEIGHT=160; $dir = (! empty($conf->product->multidir_temp[$object->entity])?$conf->product->multidir_temp[$object->entity]:$conf->service->multidir_temp[$object->entity]); if (! file_exists($dir.'/'.$object->id)) { @@ -245,7 +253,13 @@ if (! empty($id) || ! empty($ref)) $i++; } - + // div not closed + if ($i % 2 == 1) + { + print "\n".'
'."\n"; + print "\n".'
'; + print '

'."\n"; + } print '
'; print '
';