Fix: Missing menu icons

This commit is contained in:
Laurent Destailleur 2011-11-05 13:11:10 +01:00
parent fd9e0d8643
commit f16b751642
5 changed files with 97 additions and 67 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

View File

@ -385,21 +385,12 @@ div.mainmenu {
<?php if (empty($conf->browser->phone)) { ?>
div.mainmenu.home{
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/home.png' ?>);
div.mainmenu.agenda {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/agenda.png' ?>);
}
div.mainmenu.companies {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/company.png' ?>);
}
div.mainmenu.products {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/products.png' ?>);
margin-left: 10px;
}
div.mainmenu.commercial {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/commercial.png' ?>);
div.mainmenu.cashdesk {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/pointofsale.png' ?>);
}
div.mainmenu.accountancy {
@ -410,6 +401,45 @@ div.mainmenu.bank {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/bank.png' ?>);
}
div.mainmenu.companies {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/company.png' ?>);
}
div.mainmenu.commercial {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/commercial.png' ?>);
}
div.mainmenu.externalsite {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/externalsite.png',1) ?>);
}
div.mainmenu.ftp {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/tools.png' ?>);
}
div.mainmenu.ecm {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/ecm.png' ?>);
}
div.mainmenu.home{
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/home.png' ?>);
}
div.mainmenu.gravatar {
}
div.mainmenu.geopipmaxmind {
}
div.mainmenu.members {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/members.png' ?>);
}
div.mainmenu.products {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/products.png' ?>);
margin-left: 10px;
}
div.mainmenu.project {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/project.png' ?>);
}
@ -418,30 +448,10 @@ div.mainmenu.tools {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/tools.png' ?>);
}
div.mainmenu.ftp {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/tools.png' ?>);
}
div.mainmenu.members {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/members.png' ?>);
}
div.mainmenu.shop {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/shop.png' ?>);
}
div.mainmenu.agenda {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/agenda.png' ?>);
}
div.mainmenu.ecm {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/ecm.png' ?>);
}
div.mainmenu.cashdesk {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/pointofsale.png' ?>);
}
div.mainmenu.google {
background-image: url(<?php echo DOL_URL_ROOT.'/theme/cameleo/img/menus/globe.png' ?>);
}
@ -465,31 +475,29 @@ foreach($conf->modules as $key => $val)
$mainmenuusedarray=array_unique(explode(',',$mainmenuused));
$generic=1;
$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','shop','agenda','ecm','cashdesk');
$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','shop','agenda','ecm','bookmark','cashdesk','geoipmaxmind','gravatar','clicktodial','paypal','webservices');
foreach($mainmenuusedarray as $key => $val)
{
if (empty($val) || in_array($val,$divalreadydefined)) continue;
//print "XXX".$val;
// Search img file in module dir
$found=0; $url='';
$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;
}
}
// Img file not found
if (! $found && $generic <= 4)
if (! $url && $generic <= 4)
{
$url=DOL_URL_ROOT."/theme/cameleo/img/menus/generic".$generic.".png";
$found=1;
$generic++;
}
if ($found)
if ($url)
{
print "/* A mainmenu entry but img file ".$val.".png not found, so we use a generic one */\n";
print "div.mainmenu.".$val." {\n";

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -351,6 +351,28 @@ div.mainmenu.home{
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/home.png',1) ?>);
}
div.mainmenu.accountancy {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/money.png',1) ?>);
}
div.mainmenu.agenda {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/agenda.png',1) ?>);
}
div.mainmenu.bank {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/bank.png',1) ?>);
}
div.mainmenu.bookmark {
}
div.mainmenu.cashdesk {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/pointofsale.png',1) ?>);
}
div.mainmenu.click2dial {
}
div.mainmenu.companies {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/members.png',1) ?>);
}
@ -359,21 +381,38 @@ div.mainmenu.contacts {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/stethoscope.png',1) ?>);
}
div.mainmenu.products {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/products.png',1) ?>);
margin-left: 10px;
}
div.mainmenu.commercial {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/commercial.png',1) ?>);
}
div.mainmenu.accountancy {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/money.png',1) ?>);
div.mainmenu.ecm {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/ecm.png',1) ?>);
}
div.mainmenu.bank {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/bank.png',1) ?>);
div.mainmenu.externalsite {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/externalsite.png',1) ?>);
}
div.mainmenu.ftp {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/tools.png',1) ?>);
}
div.mainmenu.gravatar {
}
div.mainmenu.geopipmaxmind {
}
div.mainmenu.members {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/members.png',1) ?>);
}
div.mainmenu.paypal {
}
div.mainmenu.products {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/products.png',1) ?>);
margin-left: 10px;
}
div.mainmenu.project {
@ -384,28 +423,11 @@ div.mainmenu.tools {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/tools.png',1) ?>);
}
div.mainmenu.ftp {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/tools.png',1) ?>);
}
div.mainmenu.members {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/members.png',1) ?>);
}
div.mainmenu.shop {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/shop.png',1) ?>);
}
div.mainmenu.agenda {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/agenda.png',1) ?>);
}
div.mainmenu.ecm {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/ecm.png',1) ?>);
}
div.mainmenu.cashdesk {
background-image: url(<?php echo dol_buildpath($path.'/theme/eldy/img/menus/pointofsale.png',1) ?>);
div.mainmenu.webservices {
}
div.mainmenu.google {
@ -432,7 +454,7 @@ foreach($conf->modules as $key => $val)
$mainmenuusedarray=array_unique(explode(',',$mainmenuused));
$generic=1;
$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','shop','agenda','ecm','cashdesk');
$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','shop','agenda','bookmark','cashdesk','geoipmaxmind','gravatar','clicktodial','paypal','webservices');
foreach($mainmenuusedarray as $key => $val)
{
if (empty($val) || in_array($val,$divalreadydefined)) continue;