diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 015733ed95f..8c01eea6d99 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -186,7 +186,7 @@ - + diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 09e89c98b71..28029def9ff 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -555,7 +555,7 @@ div.divsearchfield { browser->layout == 'phone') { -?> + ?> .divsearchfieldfilter { white-space: nowrap; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 46e1993c1b6..04ae5d298c4 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1230,11 +1230,12 @@ td.showDragHandle { display: block; font-family: "RobotoDraft","Roboto",sans-serif; left: 0; -browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> - + browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + } else { ?> position: fixed; top: 50px; - + z-index: 90; -webkit-transform: translateZ(0); -moz-transform: translateZ(0); @@ -1259,12 +1260,14 @@ td.showDragHandle { -moz-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -webkit-overflow-scrolling: touch; -browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> - + browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + } else { ?> overflow-x: hidden; overflow-y: auto; - - + } /* @@ -1315,11 +1318,12 @@ div.login_block { } .side-nav { -browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> - + browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + } else { ?> overflow-x: initial !important; overflow-y: scroll; - + display: block; position: relative; @@ -1363,11 +1367,12 @@ div.login_block { z-index: 91; background: rgb(); border-right: 1px solid rgba(0,0,0,0.3); -browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> + browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> top: 50px ! important; - + top: 60px ! important; - + } div.fiche { margin-: 6px !important; @@ -1730,12 +1735,12 @@ li.tmenu, li.tmenusel { vertical-align: bottom; global->MAIN_MENU_INVERT)) { ?> float: ; - + height: px; padding: 0px 0px 2px 0px; - + padding: 0px 0px 0px 0px; - + position:relative; display: block; margin: 0px 0px 0px 0px; @@ -1756,9 +1761,9 @@ div.tmenuleft margin-top: 0px; dol_optimize_smallscreen)) { ?> width: 5px; - + height: px; - + } div.tmenucenter @@ -1887,82 +1892,82 @@ 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)); - -$generic=1; -// Put here list of menu entries when the div.mainmenu.menuentry was previously defined -$divalreadydefined=array('home','companies','products','mrp','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) + $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) { - if (file_exists($dirroot."/".$val."/img/".$val."_over.png")) - { - $url=dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1); - $found=1; - break; - } - elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité + $mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val); + } + $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','mrp','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) { - $url=dol_buildpath('/'.$val.'/img/'.$val.'.png', 1); - $found=1; - break; + if (file_exists($dirroot."/".$val."/img/".$val."_over.png")) + { + $url=dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1); + $found=1; + break; + } + elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité + { + $url=dol_buildpath('/'.$val.'/img/'.$val.'.png', 1); + $found=1; + break; + } + } + // Img file not found + if (! $found) + { + if (! defined('DISABLE_FONT_AWSOME')) { + 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 'div.mainmenu.'.$val.'::before { + content: "\f249"; + }'; + } + else + { + 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"; + $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic, 4))."_over.png", 1); + print "div.mainmenu.".$val." {\n"; + print " background-image: url(".$url.");\n"; + print "}\n"; + } + $generic++; + } + else + { + print "div.mainmenu.".$val." {\n"; + print " background-image: url(".$url.");\n"; + print "}\n"; } } - // Img file not found - if (! $found) - { - if (! defined('DISABLE_FONT_AWSOME')) { - 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 'div.mainmenu.'.$val.'::before { - content: "\f249"; - }'; - } - else - { - 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"; - $url=dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic, 4))."_over.png", 1); - print "div.mainmenu.".$val." {\n"; - print " background-image: url(".$url.");\n"; - print "}\n"; - } - $generic++; - } - else - { - print "div.mainmenu.".$val." {\n"; - print " background-image: url(".$url.");\n"; - print "}\n"; - } -} -// End of part to add more div class css -?> - - + // End of part to add more div class css +} // End test if $dol_hide_topmenu ?> .tmenuimage { padding:0 0 0 0 !important;