Change to support icon on eldy themes
This commit is contained in:
parent
1f3bcb3747
commit
62d63bc1b6
@ -46,13 +46,13 @@ header('Content-type: text/css');
|
|||||||
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
||||||
else header('Cache-Control: no-cache');
|
else header('Cache-Control: no-cache');
|
||||||
|
|
||||||
|
|
||||||
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
|
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
|
||||||
$langs->load("main",0,1);
|
$langs->load("main",0,1);
|
||||||
$right=($langs->direction=='rtl'?'left':'right');
|
$right=($langs->direction=='rtl'?'left':'right');
|
||||||
$left=($langs->direction=='rtl'?'right':'left');
|
$left=($langs->direction=='rtl'?'right':'left');
|
||||||
$fontsize=empty($conf->browser->phone)?'12':'9';
|
$fontsize=empty($conf->browser->phone)?'12':'9';
|
||||||
$fontsizesmaller=empty($conf->browser->phone)?'11':'9';
|
$fontsizesmaller=empty($conf->browser->phone)?'11':'9';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
@ -338,25 +338,60 @@ div.mainmenu.cashdesk {
|
|||||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/menus/pointofsale.png' ?>);
|
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/menus/pointofsale.png' ?>);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.mainmenu.generic1 {
|
<?php
|
||||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/menus/generic1.png' ?>);
|
// Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div')
|
||||||
height:26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.mainmenu.generic2 {
|
$moduletomainmenu=array('user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial',
|
||||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/menus/generic2.png' ?>);
|
'produit'=>'products','service'=>'products','stock'=>'products',
|
||||||
height:26px;
|
'don'=>'accountancy','tax'=>'accountancy','banque'=>'accountancy','facture'=>'accountancy','compta'=>'accountancy','accounting'=>'accountancy','adherent'=>'members','import'=>'tools','export'=>'tools','mailing'=>'tools',
|
||||||
|
'contrat'=>'commercial','ficheinter'=>'commercial','deplacement'=>'commercial',
|
||||||
|
'fournisseur'=>'companies',
|
||||||
|
'barcode'=>'','fckeditor'=>'','categorie'=>'',
|
||||||
|
);
|
||||||
|
$mainmenuused='home';
|
||||||
|
foreach($conf->modules as $key => $val)
|
||||||
|
{
|
||||||
|
$mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val);
|
||||||
}
|
}
|
||||||
|
//var_dump($mainmenuused);
|
||||||
|
$mainmenuusedarray=array_unique(explode(',',$mainmenuused));
|
||||||
|
|
||||||
div.mainmenu.generic3 {
|
$generic=1;
|
||||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/menus/generic3.png' ?>);
|
$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','shop','agenda','ecm','cashdesk');
|
||||||
height:26px;
|
foreach($mainmenuusedarray as $key => $val)
|
||||||
}
|
{
|
||||||
|
if (empty($val) || in_array($val,$divalreadydefined)) continue;
|
||||||
|
//print "XXX".$val;
|
||||||
|
|
||||||
div.mainmenu.generic4 {
|
// Search img file in module dir
|
||||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/menus/generic4.png' ?>);
|
$found=0; $url='';
|
||||||
height:26px;
|
foreach($conf->file->dol_document_root as $dirroot)
|
||||||
|
{
|
||||||
|
if (file_exists($dirroot."/".$val."/img/".$val.".png"))
|
||||||
|
{
|
||||||
|
$url=DOL_URL_ROOT.'/'.$val.'/img/'.$val.'.png';
|
||||||
|
$found=1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// Img file not found
|
||||||
|
if (! $found && $generic <= 4)
|
||||||
|
{
|
||||||
|
$url=DOL_URL_ROOT."/theme/eldy/img/menus/generic".$generic.".png";
|
||||||
|
$found=1;
|
||||||
|
$generic++;
|
||||||
|
}
|
||||||
|
if ($found)
|
||||||
|
{
|
||||||
|
print "/* A mainmenu entry but img file ".$val.".png not found, so we use a generic one */\n";
|
||||||
|
print "div.mainmenu.".$val." {\n";
|
||||||
|
print " background-image: url(".$url.");\n";
|
||||||
|
print " height:26px;\n";
|
||||||
|
print "}\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// End of part to add more div class css
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
/* Login */
|
/* Login */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user