Make css more simple

This commit is contained in:
Laurent Destailleur 2016-04-22 13:38:44 +02:00
parent 7515b2ba7b
commit 366db31a9e
5 changed files with 113 additions and 102 deletions

View File

@ -263,9 +263,9 @@ if ($result) {
print "</table>\n";
print '<br /><div align="right"><input type="submit" class="button" value="' . $langs->trans('Modify') . '" name="changetype"></div>';
print '<div align="center"><input type="submit" class="button" value="' . $langs->trans('Refresh') . '" name="changetype"></div>';
print "<br>\n";
print "<br><br>\n";
if (! empty($msg)) {
print $msg;

View File

@ -483,7 +483,7 @@ if ($result)
print '<input class="flat" type="text" name="search_lastname" size="6" value="'.dol_escape_htmltag($search_lastname).'">';
print '</td>';
}
if (! empty($arrayfields['p.lastname']['checked']))
if (! empty($arrayfields['p.firstname']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_firstname" size="6" value="'.dol_escape_htmltag($search_firstname).'">';

View File

@ -479,7 +479,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default");
}
print ' &nbsp; ('.$langs->trans("Default").': <strong>7882aa</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print ' &nbsp; ('.$langs->trans("Default").': <strong>515870</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';
}
@ -535,6 +535,50 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
print '</tr>';
}
// Text LinkColor
if ($foruserprofile)
{
/*$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").'</td>';
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' ';
}
else
{
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),'');
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print '';
}
if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';*/
}
else
{
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("LinkColor").'</td>';
print '<td colspan="'.($colspan-1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','formcolor',1).' ';
}
else
{
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),'');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default");
}
print ' &nbsp; ('.$langs->trans("Default").': <strong>000078</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';
}
// Use Hover
$var=!$var;
if ($foruserprofile)
@ -579,50 +623,6 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
print '</tr>';
}
// TopMenuBackgroundColor
if ($foruserprofile)
{
/*$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").'</td>';
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' ';
}
else
{
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),'');
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print '';
}
if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';*/
}
else
{
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("LinkColor").'</td>';
print '<td colspan="'.($colspan-1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','formcolor',1).' ';
}
else
{
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),'');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default");
}
print ' &nbsp; ('.$langs->trans("Default").': <strong>000078</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';
}
print '</table>';
}

View File

@ -79,7 +79,7 @@ $dol_use_jmobile=$conf->dol_use_jmobile;
//var_dump($user->conf->THEME_ELDY_RGB);
// Colors
$colorbackhmenu1='120,130,170'; // topmenu
$colorbackhmenu1='110,120,160'; // topmenu
$colorbackvmenu1='255,255,255'; // vmenu
$colortopbordertitle1='40,40,40'; // top border of title
$colorbacktitle1='230,230,230'; // title of tables,list
@ -97,14 +97,15 @@ $colortext='0,0,0';
$colortextlink='0,0,120';
$fontsize='13';
$fontsizesmaller='11';
$usegradient=1;
$useboldtitle=1;
$usegradienttop=(isset($conf->global->THEME_ELDY_TOPMENU_BACK1)?0:1);
$usegradienttitle=(isset($conf->global->THEME_ELDY_BACKTITLE1)?0:1);
$useboldtitle=(isset($conf->global->THEME_ELDY_USEBOLDTITLE)?$conf->global->THEME_ELDY_USEBOLDTITLE:1);
// Case of option always editable
if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody;
if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1='120,130,170';
if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1=$colorbackhmenu1;
if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1=$colorbacktitle1;
if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER=='238,246,252';
if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER==$colorbacklinepairhover;
if (! isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB=$colortexttitlenotab;
if (! isset($conf->global->THEME_ELDY_TEXTLINK)) $conf->global->THEME_ELDY_TEXTLINK=$colortextlink;
@ -803,7 +804,7 @@ div#id-top {
display:none;
<?php } else { ?>
background: rgb(<?php echo $colorbackhmenu1 ?>);
<?php if ($usegradient) { ?>
<?php if ($usegradienttop) { ?>
background-image: linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -o-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -moz-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
@ -882,7 +883,7 @@ ul.tmenu { /* t r b l */
}
ul.tmenu li { /* We need this to have background color when menu entry wraps on new lines */
background: rgb(<?php echo $colorbackhmenu1 ?>);
<?php if ($usegradient) { ?>
<?php if ($usegradienttop) { ?>
background-image: linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -o-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -moz-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
@ -2205,17 +2206,8 @@ table.liste, table.noborder, table.formdoc, div.noborder {
}
table.liste tr, table.noborder tr, div.noborder form {
border-top-color: #FEFEFE;
border-right-width: 1px;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBB;
border-left-style: solid;
min-height: 20px;
}
table.liste th, table.noborder th {
padding: 10px 2px 10px 3px; /* t r b l */
}
@ -2526,13 +2518,13 @@ div.liste_titre {
padding-top: 2px;
padding-bottom: 2px;
border-right-width: 1px;
/*border-right-width: 1px;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBB;
border-left-style: solid;
border-left-style: solid;*/
border-top-width: 1px;
border-top-color: #BBB;
@ -2560,13 +2552,14 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list
color: #000 !important;*/
/* TO MATCH ELDY */
/*background: rgb(<?php echo $colorbacktitle1; ?>);*/
<?php if ($usegradient) { ?>
<?php if ($usegradienttitle) { ?>
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
<?php } else { ?>
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php } ?>
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
@ -2712,13 +2705,14 @@ tr.box_titre {
color: #000 !important;*/
/* TO MATCH ELDY */
/* background: rgb(<?php echo $colorbacktitle1; ?>); */
<?php if ($usegradient) { ?>
<?php if ($usegradienttitle) { ?>
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.3) 100%);
<?php } else { ?>
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php } ?>
color: rgb(<?php echo $colortexttitle; ?>);

View File

@ -82,7 +82,8 @@ $dol_use_jmobile=$conf->dol_use_jmobile;
// Colors
$colorbackhmenu1='0,0,80'; // topmenu
$colorbackvmenu1='255,255,255'; // vmenu
$colorbacktitle1='230,230,230'; // title of array
$colortopbordertitle1='40,40,40'; // top border of tables-lists title
$colorbacktitle1='230,230,230'; // title of tables-lists
$colorbacktabcard1='255,255,255'; // card
$colorbacktabactive='234,234,234';
$colorbacklineimpair1='255,255,255'; // line impair
@ -97,8 +98,8 @@ $colortext='0,0,0';
$colortextlink='0,0,120';
$fontsize='13';
$fontsizesmaller='11';
$usegradient=1;
$useboldtitle=1;
$usegradient=0;
$useboldtitle=(isset($conf->global->THEME_ELDY_USEBOLDTITLE)?$conf->global->THEME_ELDY_USEBOLDTITLE:1);
// Case of option always editable
if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody;
@ -343,7 +344,7 @@ input:-moz-placeholder { color:#ccc; }
<?php if (! empty($dol_use_jmobile)) { ?>
legend { margin-bottom: 8px; }
<?php } ?>
fieldset { border: 1px solid #AAAAAA !important; box-shadow: 2px 2px 3px #f4f4f4; }
fieldset { border: 1px solid #AAAAAA !important; }
.button, sbmtConnexion {
@ -1714,11 +1715,13 @@ div.tabBar {
background: rgb(<?php echo $colorbacktabcard1; ?>);
/*
<?php if (empty($dol_optimize_smallscreen)) { ?>
-moz-box-shadow: 3px 3px 4px #f4f4f4;
-webkit-box-shadow: 3px 3px 4px #f4f4f4;
box-shadow: 3px 3px 4px #f4f4f4;
<?php } ?>
*/
}
div.tabsAction {
@ -2043,17 +2046,29 @@ table.liste, table.noborder, table.formdoc, div.noborder {
border-collapse: separate !important;
border-spacing: 0px;
border-width: 1px;
border-color: #BBB;
border-style: solid;
border-top-width: 1px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
/* border-right-width: 1px;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBB;
border-left-style: solid;
*/
border-bottom-width: 1px;
border-bottom-color: #BBB;
border-bottom-style: solid;
margin: 0px 0px 8px 0px;
/*
-moz-box-shadow: 2px 2px 4px #CCC;
-webkit-box-shadow: 2px 2px 4px #CCC;
box-shadow: 2px 2px 4px #CCC;
*/
box-shadow: 0 0 3px rgba(0,0,0,0.16);
/* box-shadow: 0 0 3px rgba(0,0,0,0.16); */
-moz-border-radius: 0.1em;
-webkit-border-radius: 0.1em;
@ -2350,24 +2365,28 @@ div.liste_titre {
padding-top: 2px;
padding-bottom: 2px;
border-right-width: 1px;
/*border-right-width: 1px;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBB;
border-left-style: solid;
border-left-style: solid;*/
border-top-width: 1px;
border-top-color: #BBB;
border-top-style: solid;
}
div.liste_titre_bydiv {
border-top-width: 1px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
box-shadow: none;
border-collapse: collapse;
display: table;
padding: 2px 0px 2px 0;
width: calc(100% - 1px); /* 1px more, i don't know why */
width: 100%; /* 1px more, i don't know why */
}
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
{
@ -2376,20 +2395,19 @@ tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, tabl
div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
{
/* TO MATCH BOOTSTRAP */
background: #ddd;
/* background: #ddd; */
/* TO MATCH ELDY */
/*
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php if ($usegradient) { ?>
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
<?php } else { ?>
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php } ?>
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
*/
color: rgb(<?php echo $colortexttitle; ?>);
font-family: <?php print $fontlist ?>;
@ -2495,7 +2513,7 @@ div.tabBar .noborder {
<?php } ?>
}
span.boxstatstext {
opacity: 0.8;
opacity: 0.9;
line-height: 18px;
}
span.boxstatsindicator {
@ -2525,27 +2543,26 @@ span.dashboardlineko {
.box {
padding-right: 0px;
padding-left: 0px;
padding-bottom: 4px;
padding-bottom: 12px;
}
tr.box_titre {
height: 26px !important;
/* TO MATCH BOOTSTRAP */
background: #ddd;
color: #000 !important;
/*background: #ddd;
color: #000 !important; */
/* TO MATCH ELDY */
/*
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php if ($usegradient) { ?>
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%);
<?php } else { ?>
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php } ?>
*/
background-repeat: repeat-x;
color: rgb(<?php echo $colortexttitle; ?>);