diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index f8b50fb588a..25d410e7bdb 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -1353,7 +1353,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print '
'; // always 1 li per ul, 1 ul per event
print '- ';
print '
';
@@ -1413,7 +1413,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{
$savlabel=$event->libelle;
$event->libelle=$daterange;
+ //print '';
print $event->getNomUrl(0);
+ //print '';
$event->libelle=$savlabel;
}
else
@@ -1421,7 +1423,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print $daterange;
}
//print ' ';
- print "
\n";
+ print " ";
}
else
{
@@ -1535,14 +1537,22 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
* Change color with a delta
*
* @param string $color Color
- * @param int $minus Delta
+ * @param int $minus Delta (1 = 16 unit)
+ * @param int $minusunit Minus unit
* @return string New color
*/
-function dol_color_minus($color, $minus)
+function dol_color_minus($color, $minus, $minusunit = 16)
{
$newcolor=$color;
- $newcolor[0]=((hexdec($newcolor[0])-$minus)<0)?0:dechex((hexdec($newcolor[0])-$minus));
- $newcolor[2]=((hexdec($newcolor[2])-$minus)<0)?0:dechex((hexdec($newcolor[2])-$minus));
- $newcolor[4]=((hexdec($newcolor[4])-$minus)<0)?0:dechex((hexdec($newcolor[4])-$minus));
+ if ($minusunit == 16)
+ {
+ $newcolor[0]=dechex(max(min(hexdec($newcolor[0])-$minus, 15), 0));
+ $newcolor[2]=dechex(max(min(hexdec($newcolor[2])-$minus, 15), 0));
+ $newcolor[4]=dechex(max(min(hexdec($newcolor[4])-$minus, 15), 0));
+ }
+ else
+ {
+ // Not yet implemented
+ }
return $newcolor;
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 6a0ffad4149..0c19d216164 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1047,9 +1047,15 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
}
}
}
+
if ($showbarcode) $morehtmlleft.=''.$form->showbarcode($object).'
';
- if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
- $morehtmlstatus.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
+
+ if ($object->element == 'societe')
+ {
+ if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE))
+ {
+ $morehtmlstatus.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
+ }
}
elseif ($object->element == 'product')
{
@@ -1099,9 +1105,9 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
if ($object->element == 'product' || $object->element == 'bank_account')
{
- if(! empty($object->label)) $morehtmlref.=''.$object->label.'
';
+ if (! empty($object->label)) $morehtmlref.=''.$object->label.'
';
}
-
+
if ($object->element != 'product' && $object->element != 'bookmark')
{
$morehtmlref.='';