2
0
forked from Wavyzz/dolibarr

Merge branch 'theme_top_menu' of github.com:atm-john/dolibarr into theme_badge_status

This commit is contained in:
John BOTELLA
2019-03-07 15:53:41 +01:00
4 changed files with 29 additions and 34 deletions

View File

@@ -8043,14 +8043,12 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
else{ // $displayMode >= 6 else{ // $displayMode >= 6
$return = $htmlLabel .' '. $htmlImg; $return = $htmlLabel .' '. $htmlImg;
} }
} }
// Use new badge // Use new badge
elseif(!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)){ elseif(!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)){
$statusLabelShort = !empty($statusLabelShort)?$statusLabelShort:$statusLabel; $statusLabelShort = !empty($statusLabelShort)?$statusLabelShort:$statusLabel;
if($displayMode == 3){ if($displayMode == 3){
$return = dolGetBadge($statusLabel, '', $statusType, 'dot'); $return = dolGetBadge($statusLabel, '', $statusType, 'dot');
} }
@@ -8060,7 +8058,6 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
else{ else{
$return = dolGetBadge($statusLabel, $html, $statusType); $return = dolGetBadge($statusLabel, $html, $statusType);
} }
} }
return $return; return $return;

View File

@@ -2200,11 +2200,11 @@ function colorStringToArray($stringcolor, $colorifnotfound = array(88,88,88))
} }
/** /**
* @param string $color * @param string $color the color you need to valid
* @param boolean $allow_white * @param boolean $allow_white in case of white isn't valid
* @return boolean * @return boolean
*/ */
function colorValidateHex($color, $allow_white = false) function colorValidateHex($color, $allow_white = true)
{ {
if(!$allow_white && ($color === '#fff' || $color === '#ffffff') ) return false; if(!$allow_white && ($color === '#fff' || $color === '#ffffff') ) return false;
@@ -2218,8 +2218,8 @@ function colorValidateHex($color, $allow_white = false)
/** /**
* @param string $hex * @param string $hex color in hex
* @param integer $steps * @param integer $steps Steps should be between -255 and 255. Negative = darker, positive = lighter
* @return string * @return string
*/ */
function colorAdjustBrightness($hex, $steps) function colorAdjustBrightness($hex, $steps)
@@ -2247,7 +2247,7 @@ function colorAdjustBrightness($hex, $steps)
} }
/** /**
* @param string $hex * @param string $hex color in hex
* @param integer $percent 0 to 100 * @param integer $percent 0 to 100
* @return string * @return string
*/ */
@@ -2258,7 +2258,7 @@ function colorDarker($hex, $percent)
} }
/** /**
* @param string $hex * @param string $hex color in hex
* @param integer $percent 0 to 100 * @param integer $percent 0 to 100
* @return string * @return string
*/ */
@@ -2270,9 +2270,9 @@ function colorLighten($hex, $percent)
/** /**
* @param string $hex * @param string $hex color in hex
* @param float $alpha 0 to 1 * @param float $alpha 0 to 1
* @param bool $returnArray : * @param bool $returnArray
* @return string * @return string
*/ */
function colorHexToRgb($hex, $alpha = false, $returnArray = false) function colorHexToRgb($hex, $alpha = false, $returnArray = false)

View File

@@ -76,5 +76,3 @@ $badgeStatus6='#cad2d2';
$badgeStatus7='#baa32b'; $badgeStatus7='#baa32b';
$badgeStatus8='#be3013'; $badgeStatus8='#be3013';
$badgeStatus9='#e7f0f0'; $badgeStatus9='#e7f0f0';