diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 4d16dfb78b0..f223982ba6e 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2985,7 +2985,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
)
)) {
$fa='fa';
- if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) $fa='fas';
$fakey = $pictowithoutext;
$facolor = ''; $fasize = '';
$marginleftonlyshort = 2;
@@ -3021,14 +3021,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
elseif ($pictowithoutext == 'edit') {
$fakey = 'fa-pencil';
$facolor = '#444';
- if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fakey = 'fa-pencil-alt';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) $fakey = 'fa-pencil-alt';
}
elseif ($pictowithoutext == 'filter') {
$fakey = 'fa-'.$pictowithoutext;
}
elseif ($pictowithoutext == 'grip_title' || $pictowithoutext == 'grip') {
$fakey = 'fa-arrows';
- if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fakey = 'fa-arrows-alt';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) $fakey = 'fa-arrows-alt';
}
elseif ($pictowithoutext == 'listlight') {
$fakey = 'fa-download';
@@ -3062,7 +3062,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
elseif ($pictowithoutext == 'sign-out') {
$fakey = 'fa-sign-out';
$marginleftonlyshort=0;
- if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fakey = 'fa-sign-out-alt';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) $fakey = 'fa-sign-out-alt';
}
elseif ($pictowithoutext == 'unlink') {
$fakey = 'fa-chain-broken';
@@ -3081,7 +3081,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
}
elseif (in_array($pictowithoutext, array('skype', 'twitter', 'facebook', 'linkedin'))) {
$fakey = 'fa-'.$pictowithoutext;
- if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa = 'fab';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) $fa = 'fab';
}
elseif ($pictowithoutext == 'split') {
$fakey = 'fa-code-fork';
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 4a85cd8ddab..2dcd9265c76 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1285,7 +1285,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
{
print ''."\n";
print ''."\n";
- if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5))
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
{
print ''."\n";
print ''."\n";
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index aaecf23dd44..4145e0e3632 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -1487,7 +1487,7 @@ a.tmenuimage:hover{
/* Do not load menu img for other if hidden to save bandwidth */
- global->MAIN_USE_FONT_AWESOME_5)) { ?>
+ global->MAIN_DISABLE_FONT_AWESOME_5)) { ?>
div.mainmenu.home{
@@ -1551,6 +1551,10 @@ a.tmenuimage:hover{
background-image: url();
}
+ div.mainmenu.mrp {
+ background-image: url();
+ }
+
div.mainmenu.project {
background-image: url();
}
@@ -1588,7 +1592,7 @@ a.tmenuimage:hover{
$generic=1;
// Put here list of menu entries when the div.mainmenu.menuentry was previously defined
- $divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','ftp','holiday','hrm','bookmark','cashdesk','takepos','ecm','geoipmaxmind','gravatar','clicktodial','paypal','stripe','webservices','website');
+ $divalreadydefined=array('home','companies','products','mrp','commercial','externalsite','accountancy','project','tools','members','agenda','ftp','holiday','hrm','bookmark','cashdesk','takepos','ecm','geoipmaxmind','gravatar','clicktodial','paypal','stripe','webservices','website');
// Put here list of menu entries we are sure we don't want
$divnotrequired=array('multicurrency','salaries','ticket','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition');
foreach($mainmenuusedarray as $val)
@@ -1617,26 +1621,28 @@ a.tmenuimage:hover{
// Img file not found
if (! $found)
{
- $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$generic."_over.png", 1);
- $found=1;
- if ($generic < 4) $generic++;
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
+ if (! defined('DISABLE_FONT_AWSOME') && empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) {
+ print 'div.mainmenu.'.$val.'::before {
+ content: "\f249";
+ }';
+ }
+ else
+ {
+ $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic,4))."_over.png", 1);
+ print "div.mainmenu.generic".$generic." {\n";
+ print " background-image: url(".$url.");\n";
+ print "}\n";
+ }
+ $generic++;
}
- if ($found)
+ else
{
print "div.mainmenu.".$val." {\n";
print " background-image: url(".$url.");\n";
print "}\n";
}
}
- $j=0;
- while ($j++ < 4)
- {
- $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$j."_over.png", 1);
- print "div.mainmenu.generic".$j." {\n";
- print " background-image: url(".$url.");\n";
- print "}\n";
- }
// End of part to add more div class css
?>
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 56fdc017604..4a5f6dff994 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -1769,7 +1769,8 @@ div.mainmenu.website {
'name of class for div')
-$moduletomainmenu=array('user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial',
+$moduletomainmenu=array(
+ 'user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial',
'produit'=>'products','service'=>'products','stock'=>'products',
'don'=>'accountancy','tax'=>'accountancy','banque'=>'accountancy','facture'=>'accountancy','compta'=>'accountancy','accounting'=>'accountancy','adherent'=>'members','import'=>'tools','export'=>'tools','mailing'=>'tools',
'contrat'=>'commercial','ficheinter'=>'commercial','ticket'=>'ticket','deplacement'=>'commercial',
@@ -1781,12 +1782,11 @@ foreach($conf->modules as $val)
{
$mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val);
}
-//var_dump($mainmenuused);
$mainmenuusedarray=array_unique(explode(',', $mainmenuused));
$generic=1;
// Put here list of menu entries when the div.mainmenu.menuentry was previously defined
-$divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','ftp','holiday','hrm','bookmark','cashdesk','takepos','ecm','geoipmaxmind','gravatar','clicktodial','paypal','stripe','webservices','website');
+$divalreadydefined=array('home','companies','products','mrp','commercial','externalsite','accountancy','project','tools','members','agenda','ftp','holiday','hrm','bookmark','cashdesk','takepos','ecm','geoipmaxmind','gravatar','clicktodial','paypal','stripe','webservices','website');
// Put here list of menu entries we are sure we don't want
$divnotrequired=array('multicurrency','salaries','ticket','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition');
foreach($mainmenuusedarray as $val)
@@ -1799,13 +1799,13 @@ foreach($mainmenuusedarray as $val)
$found=0; $url='';
foreach($conf->file->dol_document_root as $dirroot)
{
- if (file_exists($dirroot."/".$val."/img/".$val.".png"))
- {
- $url=dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
- $found=1;
- break;
- }
- elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité
+ if (file_exists($dirroot."/".$val."/img/".$val."_over.png"))
+ {
+ $url=dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1);
+ $found=1;
+ break;
+ }
+ elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité
{
$url=dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
$found=1;
@@ -1815,32 +1815,32 @@ foreach($mainmenuusedarray as $val)
// Img file not found
if (! $found)
{
- $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$generic.".png", 1);
- $found=1;
- if ($generic < 4) $generic++;
- print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
+ print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
+ if (! defined('DISABLE_FONT_AWSOME') && empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) {
+ print 'div.mainmenu.'.$val.'::before {
+ content: "\f249";
+ }';
+ }
+ else
+ {
+ $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic,4))."_over.png", 1);
+ print "div.mainmenu.generic".$generic." {\n";
+ print " background-image: url(".$url.");\n";
+ print "}\n";
+ }
+ $generic++;
}
- if ($found)
+ else
{
print "div.mainmenu.".$val." {\n";
print " background-image: url(".$url.");\n";
print "}\n";
}
}
-$j=0;
-while ($j++ < 4)
-{
- $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$j."_over.png", 1);
- print "div.mainmenu.generic".$j." {\n";
- print " background-image: url(".$url.");\n";
- print "}\n";
-}
// End of part to add more div class css
?>
-
+
.tmenuimage {
padding:0 0 0 0 !important;