From 2f6a91f506a519298d91a1049414ccba603398c4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jun 2021 15:25:49 +0200 Subject: [PATCH] Look and feel v14 --- htdocs/core/boxes/box_funnel_of_prospection.php | 3 +++ htdocs/core/boxes/box_graph_nb_tickets_type.php | 3 +++ htdocs/core/boxes/box_graph_new_vs_close_ticket.php | 3 +++ htdocs/core/boxes/box_graph_product_distribution.php | 9 +++++++++ htdocs/core/boxes/box_graph_ticket_by_severity.php | 1 - htdocs/core/boxes/box_last_modified_ticket.php | 4 ++-- htdocs/imports/import.php | 8 +++++--- htdocs/langs/en_US/exports.lang | 3 ++- htdocs/ticket/index.php | 10 ++++++++-- 9 files changed, 35 insertions(+), 9 deletions(-) diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php index 2736028d668..28c3b22788d 100644 --- a/htdocs/core/boxes/box_funnel_of_prospection.php +++ b/htdocs/core/boxes/box_funnel_of_prospection.php @@ -236,6 +236,9 @@ class box_funnel_of_prospection extends ModeleBoxes $dolgraph->SetDataColor(array_values($colorseriesstat)); $dolgraph->setBorderColor(array_values($bordercolorseries)); $dolgraph->setShowLegend(2); + if (!empty($conf->dol_optimize_smallscreen)) { + $px1->SetWidth(320); + } $dolgraph->setShowPercent(1); $dolgraph->setMirrorGraphValues(true); $dolgraph->setBorderWidth(2); diff --git a/htdocs/core/boxes/box_graph_nb_tickets_type.php b/htdocs/core/boxes/box_graph_nb_tickets_type.php index 712c28df851..86ea5e2a11c 100644 --- a/htdocs/core/boxes/box_graph_nb_tickets_type.php +++ b/htdocs/core/boxes/box_graph_nb_tickets_type.php @@ -165,6 +165,9 @@ class box_graph_nb_tickets_type extends ModeleBoxes } $px1->SetData($data); $px1->setShowLegend(2); + if (!empty($conf->dol_optimize_smallscreen)) { + $px1->SetWidth(320); + } $px1->SetType(array('pie')); $px1->SetLegend($legend); $px1->SetMaxValue($px1->GetCeilMaxValue()); diff --git a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php index f2e2170a1b8..a4bf2d6990f 100644 --- a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php +++ b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php @@ -137,6 +137,9 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes $px1->SetDataColor(array_values($colorseries)); $px1->SetData($data); $px1->setShowLegend(2); + if (!empty($conf->dol_optimize_smallscreen)) { + $px1->SetWidth(320); + } $px1->SetType(array('pie')); $px1->SetMaxValue($px1->GetCeilMaxValue()); $px1->SetShading(3); diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 2db8dd287b3..dd85c3e1fcd 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -192,6 +192,9 @@ class box_graph_product_distribution extends ModeleBoxes } $px2->SetLegend($legend); $px2->setShowLegend(2); + if (!empty($conf->dol_optimize_smallscreen)) { + $px1->SetWidth(320); + } $px2->setShowPointValue($showpointvalue); $px2->setShowPercent(0); $px2->SetMaxValue($px2->GetCeilMaxValue()); @@ -252,6 +255,9 @@ class box_graph_product_distribution extends ModeleBoxes } $px3->SetLegend($legend); $px3->setShowLegend(2); + if (!empty($conf->dol_optimize_smallscreen)) { + $px1->SetWidth(320); + } $px3->setShowPointValue($showpointvalue); $px3->setShowPercent(0); $px3->SetMaxValue($px3->GetCeilMaxValue()); @@ -313,6 +319,9 @@ class box_graph_product_distribution extends ModeleBoxes } $px1->SetLegend($legend); $px1->setShowLegend(2); + if (!empty($conf->dol_optimize_smallscreen)) { + $px1->SetWidth(320); + } $px1->setShowPointValue($showpointvalue); $px1->setShowPercent(0); $px1->SetMaxValue($px1->GetCeilMaxValue()); diff --git a/htdocs/core/boxes/box_graph_ticket_by_severity.php b/htdocs/core/boxes/box_graph_ticket_by_severity.php index 787e9cebb33..13cd0c40c86 100644 --- a/htdocs/core/boxes/box_graph_ticket_by_severity.php +++ b/htdocs/core/boxes/box_graph_ticket_by_severity.php @@ -176,7 +176,6 @@ class box_graph_ticket_by_severity extends ModeleBoxes } $px1->SetData($data); - //$px1->setShowLegend(2); $px1->setShowLegend(0); $px1->SetType(array('bars')); $px1->SetLegend($legend); diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index 4d5097e23ba..33d2bab0485 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -145,7 +145,7 @@ class box_last_modified_ticket extends ModeleBoxes // Subject $this->info_box_contents[$i][$r] = array( - 'td' => 'class="nowrap"', + 'td' => 'class="nowrap tdoverflowmax150"', 'text' => $objp->subject, // Some event have no ref 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id, ); @@ -153,7 +153,7 @@ class box_last_modified_ticket extends ModeleBoxes // Customer $this->info_box_contents[$i][$r] = array( - 'td' => 'class="tdoverflowmax150 maxwidth300onsmartphone"', + 'td' => 'class="tdoverflowmax150"', 'text' => $link, 'asis' => 1, ); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 4c5975ecb43..45927ca24e7 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -462,7 +462,7 @@ if ($step == 2 && $datatoimport) { print '
'; print '
'; - print ''; + print '
'; // Module print ''; @@ -475,7 +475,7 @@ if ($step == 2 && $datatoimport) { print $titleofmodule; print ''; - // Lot de donnees a importer + // Dataset to import print ''; print ''; print ''; // Action button print '
'.$langs->trans("Module").'
'.$langs->trans("DatasetToImport").''; $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[0]); @@ -519,7 +519,9 @@ if ($step == 2 && $datatoimport) { $text = $objmodelimport->getDriverDescForKey($key); print ''.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).''; - print img_picto('', 'download', 'class="paddingright opacitymedium"').''.$langs->trans("DownloadEmptyExample").''; + print img_picto('', 'download', 'class="paddingright opacitymedium"').''.$langs->trans("DownloadEmptyExample"); + print ''; + print ' ('.$langs->trans("StarAreMandatory").')'; print ''; diff --git a/htdocs/langs/en_US/exports.lang b/htdocs/langs/en_US/exports.lang index a0eb7161ef2..cb652229825 100644 --- a/htdocs/langs/en_US/exports.lang +++ b/htdocs/langs/en_US/exports.lang @@ -53,7 +53,8 @@ TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) FileWithDataToImport=File with data to import FileToImport=Source file to import FileMustHaveOneOfFollowingFormat=File to import must have one of following formats -DownloadEmptyExample=Download template file with field content information (* are mandatory fields) +DownloadEmptyExample=Download template file with field content information +StarAreMandatory=* are mandatory fields ChooseFormatOfFileToImport=Choose the file format to use as import file format by clicking on the %s icon to select it... ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... SourceFileFormat=Source file format diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index 9e085d468ef..c3027e5044b 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -112,8 +112,14 @@ if (empty($endyear)) { } $startyear = $endyear - 1; + +// Change default WIDHT and HEIGHT (we need a smaller than default for both desktop and smartphone) $WIDTH = (($shownb && $showtot) || !empty($conf->dol_optimize_smallscreen)) ? '100%' : '80%'; -$HEIGHT = '200'; +if (empty($conf->dol_optimize_smallscreen)) { + $HEIGHT = '200'; +} else { + $HEIGHT = '160'; +} print '
'; print '
'; @@ -298,7 +304,7 @@ print '
'."\n"; print '
'; /* - * Latest tickets + * Latest unread tickets */ $max = 10;