Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2019-02-08 11:17:14 +01:00
commit e81a2548d8
2 changed files with 277 additions and 126 deletions

View File

@ -0,0 +1,151 @@
div.mainmenu.home::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f015";
color: white;
font-size: 1.5em;
}
div.mainmenu.billing::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f0d6";
color: white;
font-size: 1.5em;
}
div.mainmenu.accountancy::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f0d6";
color: white;
font-size: 1.5em;
}
div.mainmenu.agenda::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f073";
color: white;
font-size: 1.5em;
}
div.mainmenu.bank::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f19c";
color: white;
font-size: 1.5em;
}
div.mainmenu.cashdesk::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f788";
color: white;
font-size: 1.5em;
}
div.mainmenu.takepos::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f788";
color: white;
font-size: 1.5em;
}
div.mainmenu.companies::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f1ad";
color: white;
font-size: 1.5em;
}
div.mainmenu.commercial::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f508";
color: white;
font-size: 1.5em;
}
div.mainmenu.ecm::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f07c";
color: white;
font-size: 1.5em;
}
div.mainmenu.externalsite::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f360";
color: white;
font-size: 1.5em;
}
div.mainmenu.ftp::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f362";
color: white;
font-size: 1.5em;
}
div.mainmenu.hrm::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f5ca";
color: white;
font-size: 1.5em;
}
div.mainmenu.members::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f0c0";
color: white;
font-size: 1.5em;
}
div.mainmenu.products::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f468";
color: white;
font-size: 1.5em;
}
div.mainmenu.project::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f542";
color: white;
font-size: 1.5em;
}
div.mainmenu.ticket::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f3ff";
color: white;
font-size: 1.5em;
}
div.mainmenu.tools::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f0ad";
color: white;
font-size: 1.5em;
}
div.mainmenu.website::before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f0e8";
color: white;
font-size: 1.5em;
}

View File

@ -1716,113 +1716,114 @@ a.tmenuimage {
/* Do not load menu img for other if hidden to save bandwidth */ /* Do not load menu img for other if hidden to save bandwidth */
<?php if (empty($dol_hide_topmenu)) { ?> <?php if (empty($dol_hide_topmenu)) : ?>
<?php if (! defined('DISABLE_FONT_AWSOME') && !empty($conf->global->MAIN_USE_FONT_AWESOME_5)) { ?>
div.mainmenu.home{ <?php include echo dol_buildpath($path.'/theme/'.$theme.'/main_menu_fa_icons.css', 1); ?>
<?php } else { ?>
div.mainmenu.home{
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home_over.png', 1) ?>);
background-position-x: center; background-position-x: center;
} }
div.mainmenu.billing { div.mainmenu.billing {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/money_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/money_over.png', 1) ?>);
} }
div.mainmenu.accountancy { div.mainmenu.accountancy {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/money_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/money_over.png', 1) ?>);
} }
div.mainmenu.agenda { div.mainmenu.agenda {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda_over.png', 1) ?>);
} }
div.mainmenu.bank { div.mainmenu.bank {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/bank_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/bank_over.png', 1) ?>);
} }
div.mainmenu.cashdesk { div.mainmenu.cashdesk {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/pointofsale_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/pointofsale_over.png', 1) ?>);
} }
div.mainmenu.takepos { div.mainmenu.takepos {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/pointofsale_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/pointofsale_over.png', 1) ?>);
} }
div.mainmenu.companies { div.mainmenu.companies {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/company_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/company_over.png', 1) ?>);
} }
div.mainmenu.commercial { div.mainmenu.commercial {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/commercial_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/commercial_over.png', 1) ?>);
} }
div.mainmenu.ecm { div.mainmenu.ecm {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/ecm_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/ecm_over.png', 1) ?>);
} }
div.mainmenu.externalsite { div.mainmenu.externalsite {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite_over.png', 1) ?>);
} }
div.mainmenu.ftp { div.mainmenu.ftp {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools_over.png', 1) ?>);
} }
div.mainmenu.hrm { div.mainmenu.hrm {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/holiday_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/holiday_over.png', 1) ?>);
} }
div.mainmenu.members { div.mainmenu.members {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/members_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/members_over.png', 1) ?>);
} }
div.mainmenu.products { div.mainmenu.products {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/products_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/products_over.png', 1) ?>);
} }
div.mainmenu.project { div.mainmenu.project {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/project_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/project_over.png', 1) ?>);
} }
div.mainmenu.ticket { div.mainmenu.ticket {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/ticket_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/ticket_over.png', 1) ?>);
} }
div.mainmenu.tools { div.mainmenu.tools {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools_over.png', 1) ?>);
} }
div.mainmenu.website { div.mainmenu.website {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite_over.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite_over.png', 1) ?>);
} }
<?php <?php
// Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div') // Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div')
$moduletomainmenu=array( $moduletomainmenu=array(
'user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial', 'user'=>'','syslog'=>'','societe'=>'companies','projet'=>'project','propale'=>'commercial','commande'=>'commercial',
'produit'=>'products','service'=>'products','stock'=>'products', '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', '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', 'contrat'=>'commercial','ficheinter'=>'commercial','ticket'=>'ticket','deplacement'=>'commercial',
'fournisseur'=>'companies', 'fournisseur'=>'companies',
'barcode'=>'','fckeditor'=>'','categorie'=>'', 'barcode'=>'','fckeditor'=>'','categorie'=>'',
); );
$mainmenuused='home'; $mainmenuused='home';
foreach($conf->modules as $val) foreach($conf->modules as $val)
{ {
$mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val); $mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val);
} }
//var_dump($mainmenuused); $mainmenuusedarray=array_unique(explode(',',$mainmenuused));
$mainmenuusedarray=array_unique(explode(',', $mainmenuused));
$generic=1; $generic=1;
// Put here list of menu entries when the div.mainmenu.menuentry was previously defined // 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','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 // 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'); $divnotrequired=array('multicurrency','salaries','ticket','margin','opensurvey','paybox','expensereport','incoterm','prelevement','propal','workflow','notification','supplier_proposal','cron','product','productbatch','expedition');
foreach($mainmenuusedarray as $val) foreach($mainmenuusedarray as $val)
{ {
if (empty($val) || in_array($val, $divalreadydefined)) continue; if (empty($val) || in_array($val,$divalreadydefined)) continue;
if (in_array($val, $divnotrequired)) continue; if (in_array($val,$divnotrequired)) continue;
//print "XXX".$val; //print "XXX".$val;
// Search img file in module dir // Search img file in module dir
@ -1839,7 +1840,7 @@ foreach($mainmenuusedarray as $val)
// Img file not found // Img file not found
if (! $found) if (! $found)
{ {
$url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$generic."_over.png", 1); $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$generic."_over.png",1);
$found=1; $found=1;
if ($generic < 4) $generic++; 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";
@ -1850,21 +1851,20 @@ foreach($mainmenuusedarray as $val)
print " background-image: url(".$url.");\n"; print " background-image: url(".$url.");\n";
print "}\n"; print "}\n";
} }
} }
$j=0; $j=0;
while ($j++ < 4) while ($j++ < 4)
{ {
$url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$j."_over.png", 1); $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.$j."_over.png",1);
print "div.mainmenu.generic".$j." {\n"; print "div.mainmenu.generic".$j." {\n";
print " background-image: url(".$url.");\n"; print " background-image: url(".$url.");\n";
print "}\n"; print "}\n";
} }
// End of part to add more div class css // End of part to add more div class css
?> ?>
<?php <?php } //legacy icons ?>
} // End test if $dol_hide_topmenu <?php } // End test if $dol_hide_topmenu ?>
?>
.tmenuimage { .tmenuimage {
padding:0 0 0 0 !important; padding:0 0 0 0 !important;