From 6711b7fbd11f9e13e0ce44de3c6758fb4bb34825 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Jun 2016 23:46:07 +0200 Subject: [PATCH] Fix css entries added when not required --- htdocs/theme/eldy/style.css.php | 5 ++++- htdocs/theme/md/style.css.php | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 88b0cf30412..5aa97452a11 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1133,9 +1133,12 @@ $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','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices','websites'); +// Put here list of menu entries we are sure we don't want +$divnotrequired=array('multicurrency','salaries','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition'); foreach($mainmenuusedarray as $val) { if (empty($val) || in_array($val,$divalreadydefined)) continue; + if (in_array($val,$divnotrequired)) continue; //print "XXX".$val; // Search img file in module dir @@ -1155,7 +1158,7 @@ foreach($mainmenuusedarray as $val) $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$generic.".png",1); $found=1; if ($generic < 4) $generic++; - print "/* A mainmenu entry 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 ($found) { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 884c11b1cce..4fe274b3ae3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1178,9 +1178,12 @@ $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','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices','websites'); +// Put here list of menu entries we are sure we don't want +$divnotrequired=array('multicurrency','salaries','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition'); foreach($mainmenuusedarray as $val) { if (empty($val) || in_array($val,$divalreadydefined)) continue; + if (in_array($val,$divnotrequired)) continue; //print "XXX".$val; // Search img file in module dir