clean indent in theme directory

This commit is contained in:
Frédéric FRANCE 2019-10-26 21:11:36 +02:00
parent c8259ff380
commit 7f3f48be0f
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
3 changed files with 97 additions and 92 deletions

View File

@ -186,7 +186,7 @@
<!-- Check indent are done with spaces and with correct number --> <!-- Check indent are done with spaces and with correct number -->
<!-- Disabled as this does not support tab --> <!-- Disabled as this does not support tab -->
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> --> <!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
<!-- TODO Enable this
<arg name="tab-width" value="4"/> <arg name="tab-width" value="4"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"> <rule ref="Generic.WhiteSpace.ScopeIndent">
<properties> <properties>
@ -194,7 +194,7 @@
<property name="tabIndent" value="true"/> <property name="tabIndent" value="true"/>
</properties> </properties>
</rule> </rule>
-->
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" /> <rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />

View File

@ -555,7 +555,7 @@ div.divsearchfield {
<?php <?php
// Add a nowrap on smartphone, so long list of field used for filter are overflowed with clip // Add a nowrap on smartphone, so long list of field used for filter are overflowed with clip
if ($conf->browser->layout == 'phone') { if ($conf->browser->layout == 'phone') {
?> ?>
.divsearchfieldfilter { .divsearchfieldfilter {
white-space: nowrap; white-space: nowrap;
} }

View File

@ -1230,11 +1230,12 @@ td.showDragHandle {
display: block; display: block;
font-family: "RobotoDraft","Roboto",sans-serif; font-family: "RobotoDraft","Roboto",sans-serif;
left: 0; left: 0;
<?php if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> <?php
<?php } else { ?> if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
} else { ?>
position: fixed; position: fixed;
top: 50px; top: 50px;
<?php } ?> <?php } ?>
z-index: 90; z-index: 90;
-webkit-transform: translateZ(0); -webkit-transform: translateZ(0);
-moz-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); -moz-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
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; -webkit-overflow-scrolling: touch;
<?php if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> <?php
<?php } else { ?> if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
} else { ?>
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
<?php } ?> <?php }
<?php } ?> }
?>
} }
/* /*
@ -1315,11 +1318,12 @@ div.login_block {
} }
.side-nav { .side-nav {
<?php if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> <?php
<?php } else { ?> if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
} else { ?>
overflow-x: initial !important; overflow-x: initial !important;
overflow-y: scroll; overflow-y: scroll;
<?php } ?> <?php } ?>
display: block; display: block;
position: relative; position: relative;
@ -1363,11 +1367,12 @@ div.login_block {
z-index: 91; z-index: 91;
background: rgb(<?php echo $colorbackvmenu1; ?>); background: rgb(<?php echo $colorbackvmenu1; ?>);
border-right: 1px solid rgba(0,0,0,0.3); border-right: 1px solid rgba(0,0,0,0.3);
<?php if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> <?php
if (in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?>
top: 50px ! important; top: 50px ! important;
<?php } else { ?> <?php } else { ?>
top: 60px ! important; top: 60px ! important;
<?php } ?> <?php } ?>
} }
div.fiche { div.fiche {
margin-<?php print $left; ?>: 6px !important; margin-<?php print $left; ?>: 6px !important;
@ -1887,31 +1892,33 @@ div.mainmenu.website {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite.png', 1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/externalsite.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'=>'',
$mainmenuused='home'; 'categorie'=>'',
foreach($conf->modules as $val) );
{ $mainmenuused='home';
foreach($conf->modules as $val)
{
$mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val); $mainmenuused.=','.(isset($moduletomainmenu[$val])?$moduletomainmenu[$val]:$val);
} }
$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','mrp','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','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 // 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;
@ -1958,11 +1965,9 @@ foreach($mainmenuusedarray as $val)
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
?> } // 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;