diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 62ebd0589c0a2426b10eda7cdc7e65e3565031f3..e081d902b16b98bbfc0e5d2f9af174afaac9de20 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4509,20 +4509,21 @@ class Form * @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect * @param array $array Array with key+value * @param string|string[] $id Preselected key or preselected keys for multiselect - * @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' '), <0 to add an empty value with key that is this value. + * @param int $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (value is '' or ' ' if 1), <0 to add an empty value with key that is this value. * @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value" * @param int $value_as_key 1 to use value as key * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @param int $translate Translate and encode value * @param int $maxlen Length maximum for labels * @param int $disabled Html select box is disabled - * @param int $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort + * @param string $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort * @param string $morecss Add more class to css styles * @param int $addjscombo Add js combo + * @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set. * @return string HTML select string. * @see multiselectarray */ - static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0) + static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='') { global $conf, $langs; @@ -4558,7 +4559,8 @@ class Form { $textforempty=' '; if (! empty($conf->use_javascript_ajax)) $textforempty=' '; // If we use ajaxcombo, we need here to avoid to have an empty element that is too small. - $out.='<option value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id==-2?' selected':'').'>'.$textforempty.'</option>'."\n"; // id is -2 because -1 is already "do not contact" + if (! is_numeric($show_empty)) $textforempty=$show_empty; + $out.='<option class="optiongrey" '.($moreparamonempty?$moreparamonempty.' ':'').'value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id == $show_empty ?' selected':'').'>'.$textforempty.'</option>'."\n"; } if (is_array($array)) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 81ff60f885b463b48cd4f31418a9dbe4adad3964..ce49b8ccd177d2cb932b3d23b6191c14e0aea0a0 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1012,7 +1012,7 @@ class FormOther $selectboxlist.='<input type="hidden" name="userid" value="'.$user->id.'">'; $selectboxlist.='<input type="hidden" name="areacode" value="'.$areacode.'">'; $selectboxlist.='<input type="hidden" name="boxorder" value="'.$boxorder.'">'; - $selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel,'',1); + $selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel, '', $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', '', 0, ' disabled hidden selected'); if (empty($conf->use_javascript_ajax)) $selectboxlist.=' <input type="submit" class="button" value="'.$langs->trans("AddBox").'">'; $selectboxlist.='</form>'; } diff --git a/htdocs/index.php b/htdocs/index.php index 810bafe7ed429244446a0c589985018e9de4ada1..1161848e0efe644a17903149c287be1b06cbb7bf 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -322,7 +322,7 @@ print '<th class="liste_titre" colspan="2">'.$langs->trans("DolibarrWorkBoard"). print '<th class="liste_titre" align="right">'.$langs->trans("Number").'</th>'; print '<th class="liste_titre" align="right">'.$langs->trans("Late").'</th>'; print '<th class="liste_titre"> </th>'; -print '<th class="liste_titre" width="20"> </th>'; +//print '<th class="liste_titre" width="20"> </th>'; if ($showweather) print '<th class="liste_titre hideonsmartphone" width="80"> </th>'; print '</tr>'."\n"; @@ -469,7 +469,8 @@ foreach($valid_dashboardlines as $board) print '<td align="right">'; //if ($board->nbtodolate > 0) //{ - print '<a class="dashboardlineindicatorlate" href="'.$board->url.'"><span class="dashboardlineindicatorlate">'; + $textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days"); + print '<a title="'.dol_escape_htmltag($textlate).'" class="dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'" href="'.$board->url.'"><span class="dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'">'; print $board->nbtodolate; print '</span></a>'; //} @@ -478,9 +479,9 @@ foreach($valid_dashboardlines as $board) if ($board->nbtodolate > 0) print img_picto($langs->trans("NActionsLate",$board->nbtodolate).' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')',"warning"); else print ' '; print '</td>'; - print '<td class="nowrap" align="right">'; + /*print '<td class="nowrap" align="right">'; print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')'; - print '</td>'; + print '</td>';*/ if ($showweather) { print '<td class="nohover hideonsmartphone" rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">'; diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 634b058f6d40f39c5434322b8c1ee431c6efccfa..f635789dc1afabe9dfea302ae4d6bd2060c9136e 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -95,3 +95,4 @@ ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals LastXMonthRolling=The last %s month rolling +ChooseBoxToAdd=Choose a box to add \ No newline at end of file diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index eebec1e7f887b923241ced140aa492b6316703c6..7a23657123f28f4d739cac15b14f3b8c6867f707 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -230,6 +230,8 @@ Now=Now HourStart=Start hour Date=Date DateAndHour=Date and hour +DateToday=Today's date +DateReference=Reference date DateStart=Date start DateEnd=Date end DateCreation=Creation date diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 651f3b3027efff467c86e182f9f4fe48b2affde0..7a4a4b2a837d4509a4b3c09692da1fbdf1344cf1 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -293,6 +293,10 @@ input.smallpadd { select.flat, form.flat select { font-weight: normal; } +.optiongrey { + opacity: 0.5; +} +select:invalid { color: gray; } input:disabled { background:#ddd; } @@ -2540,10 +2544,17 @@ div.tabBar .noborder { } span.boxstatsindicator { font-size: 110%; - font-weight: bold; + font-weight: normal; } span.dashboardlineindicator, span.dashboardlineindicatorlate { font-size: 120%; + font-weight: normal; +} +span.dashboardlineok { + color: #008800; +} +span.dashboardlineko { + color: #880000; font-weight: bold; } .boxtable { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6dcc831ce7e7bf02c6161da352e37a19c716ac92..730b94db899b4d0cdba99654e05ba21a8a319da9 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2376,13 +2376,14 @@ div.tabBar .noborder { } span.boxstatsindicator { font-size: 110%; - font-weight: bold; + font-weight: normal; } span.dashboardlineindicator, span.dashboardlineindicatorlate { font-size: 120%; font-weight: bold; } + .boxtable { -moz-box-shadow: 3px 3px 4px #f4f4f4; -webkit-box-shadow: 3px 3px 4px #f4f4f4;