diff --git a/htdocs/theme/eldy/main_menu_fa_icons.css b/htdocs/theme/eldy/main_menu_fa_icons.css new file mode 100644 index 00000000000..44cd7b99044 --- /dev/null +++ b/htdocs/theme/eldy/main_menu_fa_icons.css @@ -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; +} \ No newline at end of file diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 12e2a75154f..14cb118c8d1 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1716,155 +1716,155 @@ a.tmenuimage { /* Do not load menu img for other if hidden to save bandwidth */ - + + global->MAIN_USE_FONT_AWESOME_5)) { ?> + + + div.mainmenu.home{ + background-image: url(); + background-position-x: center; + } -div.mainmenu.home{ - background-image: url(); - background-position-x: center; -} + div.mainmenu.billing { + background-image: url(); + } -div.mainmenu.billing { - background-image: url(); -} + div.mainmenu.accountancy { + background-image: url(); + } -div.mainmenu.accountancy { - background-image: url(); -} + div.mainmenu.agenda { + background-image: url(); + } -div.mainmenu.agenda { - background-image: url(); -} + div.mainmenu.bank { + background-image: url(); + } -div.mainmenu.bank { - background-image: url(); -} + div.mainmenu.cashdesk { + background-image: url(); + } -div.mainmenu.cashdesk { - background-image: url(); -} + div.mainmenu.takepos { + background-image: url(); + } -div.mainmenu.takepos { - background-image: url(); -} + div.mainmenu.companies { + background-image: url(); + } -div.mainmenu.companies { - background-image: url(); -} + div.mainmenu.commercial { + background-image: url(); + } -div.mainmenu.commercial { - background-image: url(); -} + div.mainmenu.ecm { + background-image: url(); + } -div.mainmenu.ecm { - background-image: url(); -} + div.mainmenu.externalsite { + background-image: url(); + } -div.mainmenu.externalsite { - background-image: url(); -} + div.mainmenu.ftp { + background-image: url(); + } -div.mainmenu.ftp { - background-image: url(); -} + div.mainmenu.hrm { + background-image: url(); + } -div.mainmenu.hrm { - background-image: url(); -} + div.mainmenu.members { + background-image: url(); + } -div.mainmenu.members { - background-image: url(); -} + div.mainmenu.products { + background-image: url(); + } -div.mainmenu.products { - background-image: url(); -} + div.mainmenu.project { + background-image: url(); + } -div.mainmenu.project { - background-image: url(); -} + div.mainmenu.ticket { + background-image: url(); + } -div.mainmenu.ticket { - background-image: url(); -} + div.mainmenu.tools { + background-image: url(); + } -div.mainmenu.tools { - background-image: url(); -} + div.mainmenu.website { + background-image: url(); + } -div.mainmenu.website { - background-image: url(); -} + 'name of class for div') -'name of class for div') + $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', + 'fournisseur'=>'companies', + 'barcode'=>'','fckeditor'=>'','categorie'=>'', + ); + $mainmenuused='home'; + foreach($conf->modules as $val) + { + $mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val); + } + $mainmenuusedarray=array_unique(explode(',',$mainmenuused)); -$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', - 'fournisseur'=>'companies', - 'barcode'=>'','fckeditor'=>'','categorie'=>'', -); -$mainmenuused='home'; -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'); + // 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) + { + if (empty($val) || in_array($val,$divalreadydefined)) continue; + if (in_array($val,$divnotrequired)) continue; + //print "XXX".$val; -$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'); -// 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) -{ - if (empty($val) || in_array($val, $divalreadydefined)) continue; - if (in_array($val, $divnotrequired)) continue; - //print "XXX".$val; + // Search img file in module dir + $found=0; $url=''; + foreach($conf->file->dol_document_root as $dirroot) + { + if (file_exists($dirroot."/".$val."/img/".$val."_over.png")) + { + $url=dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1); + $found=1; + break; + } + } + // 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 ($found) + { + 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 + ?> - // Search img file in module dir - $found=0; $url=''; - foreach($conf->file->dol_document_root as $dirroot) - { - if (file_exists($dirroot."/".$val."/img/".$val."_over.png")) - { - $url=dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1); - $found=1; - break; - } - } - // 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 ($found) - { - 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;