From 41303006f3920ef4762ab7b8b804db6b88f714be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Oct 2019 17:48:55 +0200 Subject: [PATCH] Rename constant --- htdocs/core/lib/functions2.lib.php | 6 +++--- htdocs/main.inc.php | 2 +- htdocs/theme/eldy/info-box.inc.php | 24 ++++++++++++------------ htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/info-box.inc.php | 22 +++++++++++----------- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 7780c7d3b12..1c73e2399d6 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2255,7 +2255,7 @@ function colorValidateHex($color, $allow_white = true) * @return string New string of color * @see colorAdjustBrightness() */ -function colorAgressivity($hex, $ratio = -50) +function colorAgressiveness($hex, $ratio = -50) { // Steps should be between -255 and 255. Negative = darker, positive = lighter $ratio = max(-100, min(100, $ratio)); @@ -2277,7 +2277,7 @@ function colorAgressivity($hex, $ratio = -50) if ($color > 127) $color += ((255 - $color) * ($ratio / 100)); if ($color < 128) $color -= ($color * ($ratio / 100)); } - else // We decrease agressivity + else // We decrease agressiveness { if ($color > 128) $color -= (($color - 128) * (abs($ratio) / 100)); if ($color < 127) $color += ((128 - $color) * (abs($ratio) / 100)); @@ -2294,7 +2294,7 @@ function colorAgressivity($hex, $ratio = -50) * @param string $hex Color in hex ('#AA1122' or 'AA1122' or '#a12' or 'a12') * @param integer $steps Step/offset added to each color component. It should be between -255 and 255. Negative = darker, positive = lighter * @return string New color with format '#AA1122' - * @see colorAgressivity() + * @see colorAgressiveness() */ function colorAdjustBrightness($hex, $steps) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index f522ad29fa8..0a225bb3aaf 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1277,7 +1277,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (GETPOSTISSET('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen', 'int'); } if (GETPOSTISSET('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover', 'int'); } if (GETPOSTISSET('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile', 'int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile', 'int'); } - if (GETPOSTISSET('THEME_AGRESSIVITY_RATIO')) { $themeparam.='&THEME_AGRESSIVITY_RATIO='.GETPOST('THEME_AGRESSIVITY_RATIO', 'int'); } + if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) { $themeparam.='&THEME_AGRESSIVENESS_RATIO='.GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); } if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax) { diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index a483b3d758d..d1adc2ed4e8 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -155,40 +155,40 @@ a.info-box-text{ text-decoration: none;} global->THEME_AGRESSIVITY_RATIO='.$conf->global->THEME_AGRESSIVITY_RATIO.' */'."\n"; -if (! isset($conf->global->THEME_AGRESSIVITY_RATIO)) $conf->global->THEME_AGRESSIVITY_RATIO=-40; -if (GETPOSTISSET('THEME_AGRESSIVITY_RATIO')) $conf->global->THEME_AGRESSIVITY_RATIO=GETPOST('THEME_AGRESSIVITY_RATIO', 'int'); +//print '/* conf->global->THEME_AGRESSIVENESS_RATIO='.$conf->global->THEME_AGRESSIVENESS_RATIO.' */'."\n"; +if (! isset($conf->global->THEME_AGRESSIVENESS_RATIO)) $conf->global->THEME_AGRESSIVENESS_RATIO=-40; +if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENESS_RATIO=GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); ?> .bg-infoxbox-project{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-action{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-propal, .bg-infoxbox-facture, .bg-infoxbox-commande{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-supplier_proposal, .bg-infoxbox-invoice_supplier, .bg-infoxbox-order_supplier{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-contrat{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-bank_account{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-adherent{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-expensereport{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-holiday{ - background-color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + background-color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 086b7f942e6..ed1ca8a9279 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -236,7 +236,7 @@ print 'fontsizesmaller='.$fontsizesmaller."\n"; print 'topMenuFontSize='.$topMenuFontSize."\n"; print 'toolTipBgColor='.$toolTipBgColor."\n"; print 'toolTipFontColor='.$toolTipFontColor."\n"; -print 'conf->global->THEME_AGRESSIVITY_RATIO='.$conf->global->THEME_AGRESSIVITY_RATIO." (must be between -100 and +100)\n"; +print 'conf->global->THEME_AGRESSIVENESS_RATIO='.$conf->global->THEME_AGRESSIVENESS_RATIO." (must be between -100 and +100)\n"; print '*/'."\n"; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 95e057e68f1..8effe7d62d6 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -104,39 +104,39 @@ a.info-box-text{ text-decoration: none;} } global->THEME_AGRESSIVITY_RATIO)) $conf->global->THEME_AGRESSIVITY_RATIO=-100; -if (GETPOSTISSET('THEME_AGRESSIVITY_RATIO')) $conf->global->THEME_AGRESSIVITY_RATIO=GETPOST('THEME_AGRESSIVITY_RATIO', 'int'); +if (! isset($conf->global->THEME_AGRESSIVENESS_RATIO)) $conf->global->THEME_AGRESSIVENESS_RATIO=-100; +if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENESS_RATIO=GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); ?> .bg-infoxbox-project i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-action i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-propal i.fa, .bg-infoxbox-facture i.fa, .bg-infoxbox-commande i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-supplier_proposal i.fa, .bg-infoxbox-invoice_supplier i.fa, .bg-infoxbox-order_supplier i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-contrat i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-bank_account i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-adherent i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-expensereport i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; } .bg-infoxbox-holiday i.fa{ - color: global->THEME_AGRESSIVITY_RATIO); ?> !important; + color: global->THEME_AGRESSIVENESS_RATIO); ?> !important; }