Debug v20

This commit is contained in:
Laurent Destailleur
2024-06-19 02:09:59 +02:00
parent 03a8a154c3
commit d63bb3e08e
6 changed files with 147 additions and 58 deletions

View File

@@ -583,12 +583,9 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block'); print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
/*
print '<tr class="oddeven"><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
print "</tr>";*/
} }
// Main menu color logo // Main menu color on pictos
if ($foruserprofile) { if ($foruserprofile) {
// Nothing // Nothing
} else { } else {
@@ -605,7 +602,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</tr>'; print '</tr>';
} }
// BorderTableActive // Use border on tables
if ($foruserprofile) { if ($foruserprofile) {
} else { } else {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
@@ -645,48 +642,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
} }
*/ */
// Background color THEME_ELDY_BACKBODY // Background color for top menu - TopMenuBackgroundColor
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
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 class="nowrap left" width="20%"><input 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','',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 {
$default = 'ffffff';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
//var_dump($conf->global->THEME_ELDY_BACKBODY);
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_BACKBODY') ? $conf->global->THEME_ELDY_BACKBODY : ''), array()), ''), 'THEME_ELDY_BACKBODY', '', 1, '', '', 'colorbackbody', $default).' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, 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; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
print '</td>';
print '</tr>';
}
// TopMenuBackgroundColor
if ($foruserprofile) { if ($foruserprofile) {
/* /*
print '<tr class="oddeven">'; print '<tr class="oddeven">';
@@ -730,7 +686,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</tr>'; print '</tr>';
} }
// LeftMenuBackgroundColor // Background color for left menu - LeftMenuBackgroundColor
if ($foruserprofile) { if ($foruserprofile) {
/* /*
print '<tr class="oddeven">'; print '<tr class="oddeven">';
@@ -774,6 +730,47 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</tr>'; print '</tr>';
} }
// Background color for main area THEME_ELDY_BACKBODY
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
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 class="nowrap left" width="20%"><input 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','',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 {
$default = 'ffffff';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
//var_dump($conf->global->THEME_ELDY_BACKBODY);
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray((getDolGlobalString('THEME_ELDY_BACKBODY') ? $conf->global->THEME_ELDY_BACKBODY : ''), array()), ''), 'THEME_ELDY_BACKBODY', '', 1, '', '', 'colorbackbody', $default).' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, 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; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
print '</td>';
print '</tr>';
}
// TextTitleColor for title of Pages // TextTitleColor for title of Pages
if ($foruserprofile) { if ($foruserprofile) {
} else { } else {

View File

@@ -2719,7 +2719,9 @@ img.photorefnoborder {
<?php } else { ?> <?php } else { ?>
background: var(--colorbackhmenu1); background: var(--colorbackhmenu1);
/* background-image: linear-gradient(-45deg, <?php echo colorAdjustBrightness(colorArrayToHex(colorStringToArray($colorbackhmenu1)), '5'); ?>, var(--colorbackhmenu1)); */ /* background-image: linear-gradient(-45deg, <?php echo colorAdjustBrightness(colorArrayToHex(colorStringToArray($colorbackhmenu1)), '5'); ?>, var(--colorbackhmenu1)); */
/* box-shadow: 0px 0px 5px #eee; */ <?php if ($colorbackhmenu1 == '255,255,255') { ?>
box-shadow: 0px 0px 4px #ddd;
<?php } ?>
<?php } ?> <?php } ?>
} }
@@ -2761,7 +2763,6 @@ div.tmenudiv {
margin: 0px 0px 0px 0px; /* t r b l */ margin: 0px 0px 0px 0px; /* t r b l */
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: normal;
color: #000000;
text-decoration: none; text-decoration: none;
<?php } ?> <?php } ?>
} }
@@ -2814,6 +2815,9 @@ ul.tmenu { /* t r b l */
} }
ul.tmenu li { /* We need this to have background color when menu entry wraps on new lines */ ul.tmenu li { /* We need this to have background color when menu entry wraps on new lines */
} }
li#mainmenutd_home {
margin-left: 5px;
}
li.tmenu, li.tmenusel { li.tmenu, li.tmenusel {
<?php print $minwidthtmenu ? 'min-width: '.$minwidthtmenu.'px;' : ''; ?> <?php print $minwidthtmenu ? 'min-width: '.$minwidthtmenu.'px;' : ''; ?>
text-align: center; text-align: center;
@@ -2863,6 +2867,7 @@ div.tmenucenter
{ {
padding-left: 2px; padding-left: 2px;
padding-right: 2px; padding-right: 2px;
color: var(--colortextbackhmenu);
<?php if ($disableimages) { ?> <?php if ($disableimages) { ?>
padding-top: 8px; padding-top: 8px;
height: 26px; height: 26px;
@@ -2889,6 +2894,7 @@ div.menu_titre {
padding-<?php print $right; ?>: 2px; padding-<?php print $right; ?>: 2px;
font-family: Roboto,<?php echo $fontlist; ?>; font-family: Roboto,<?php echo $fontlist; ?>;
font-weight: 400; font-weight: 400;
opacity: 0.8;
} }
div.mainmenu { div.mainmenu {
@@ -2927,8 +2933,9 @@ a.tmenuimage:hover{
} }
/* To show text of top menu on hover only (THEME_TOPMENU_DISABLE_IMAGE == 2) */ /* To show text of top menu according to option THEME_TOPMENU_DISABLE_IMAGE */
/* Text hidden by default */
<?php if (in_array(getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE'), array(2, 3, 4))) { ?> <?php if (in_array(getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE'), array(2, 3, 4))) { ?>
.tmenulabel:not(.menuhider), .tmenulabel:not(.menuhider)::before { .tmenulabel:not(.menuhider), .tmenulabel:not(.menuhider)::before {
display: none; display: none;
@@ -2941,7 +2948,14 @@ span.tmenuimage:not(.menuhider), span.tmenuimage:not(.menuhider)::before {
margin-top: 8px !important; margin-top: 8px !important;
} }
div.tmenucenter { /* we must have a field length of top menu to avoid size to change when in mode text on hover */
width: 80px;
overflow: hidden;
text-overflow: ellipsis;
}
<?php } ?> <?php } ?>
/* Test of picto visible on hover, for all picto */
<?php if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 2) { ?> <?php if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 2) { ?>
.tmenudiv:hover .tmenulabel:not(.menuhider), .tmenudiv:hover .tmenulabel:not(.menuhider)::before { .tmenudiv:hover .tmenulabel:not(.menuhider), .tmenudiv:hover .tmenulabel:not(.menuhider)::before {
display: block; display: block;
@@ -2959,14 +2973,14 @@ span.tmenuimage:not(.menuhider), span.tmenuimage:not(.menuhider)::before {
color: var(--colortextbackhmenu); color: var(--colortextbackhmenu);
top: 0px; top: 0px;
} }
.tmenudiv:hover .tmenuimage:not(.menuhider), .tmenudiv:hover .tmenuimage:not(.menuhider)::before { .tmenudiv:hover .tmenuimage:not(.menuhider), .tmenudiv:hover .tmenuimage:not(.menuhider)::before {
/* For transition transition-delay: 1000ms; /* For transition transition-delay: 1000ms;
transition-property: all; */ transition-property: all; */
margin-top: 0px !important; margin-top: 0px !important;
} }
<?php } ?> <?php } ?>
/* Text of picto visible on hover the picto only */
<?php if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 3) { ?> <?php if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 3) { ?>
li.tmenu:hover .tmenulabel:not(.menuhider), li.tmenu:hover .tmenulabel:not(.menuhider)::before { li.tmenu:hover .tmenulabel:not(.menuhider), li.tmenu:hover .tmenulabel:not(.menuhider)::before {
display: initial !important; display: initial !important;

View File

@@ -405,6 +405,11 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
<?php echo $prefix; ?>color: #755114 !important; <?php echo $prefix; ?>color: #755114 !important;
} }
/* Disable colors on left vmenu */
a.vmenu span {
color: unset !important;
}
.infobox-adherent, .infobox-member { .infobox-adherent, .infobox-member {
color: #79633f; color: #79633f;
} }

View File

@@ -27,7 +27,7 @@ button.dropdown-item.global-search-item {
#topmenu-global-search-dropdown a.login-dropdown-a, #topmenu-quickadd-dropdown a.login-dropdown-a, #topmenu-bookmark-dropdown a.login-dropdown-a { #topmenu-global-search-dropdown a.login-dropdown-a, #topmenu-quickadd-dropdown a.login-dropdown-a, #topmenu-bookmark-dropdown a.login-dropdown-a {
color: #fff; color: var(--colortextbackhmenu);
} }
div#topmenu-global-search-dropdown { div#topmenu-global-search-dropdown {

View File

@@ -91,6 +91,13 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
<?php echo $prefix; ?>color: #755114 !important; <?php echo $prefix; ?>color: #755114 !important;
} }
/* Disable colors on left vmenu */
a.vmenu span {
color: unset !important;
}
div.login_block_other a {
color: var(--colortextbackvmenu);
}
.infobox-adherent, .infobox-member { .infobox-adherent, .infobox-member {
color: #79633f; color: #79633f;

View File

@@ -2317,6 +2317,13 @@ td.showDragHandle {
vertical-align: top; vertical-align: top;
} }
#id-top { #id-top {
<?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?>
display:none;
<?php } else { ?>
<?php if ($colorbackhmenu1 == '255,255,255') { ?>
border-bottom: 1px solid rgba(0,0,0,0.2); /* must be same than border-right of .side-nav */
<?php } ?>
<?php } ?>
} }
#id-left { #id-left {
min-height: 100%; min-height: 100%;
@@ -2869,6 +2876,9 @@ div#tmenu_tooltip {
<?php } ?> <?php } ?>
} }
li#mainmenutd_home {
margin-left: 5px;
}
li.tmenusel::after, li.tmenusel:hover::after { li.tmenusel::after, li.tmenusel:hover::after {
content: ""; content: "";
position: absolute; position: absolute;
@@ -3025,6 +3035,7 @@ div.menu_titre {
padding-<?php print $right; ?>: 2px; padding-<?php print $right; ?>: 2px;
font-family: Roboto,<?php echo $fontlist; ?>; font-family: Roboto,<?php echo $fontlist; ?>;
font-weight: 400; font-weight: 400;
opacity: 0.9;
} }
div.mainmenu { div.mainmenu {
@@ -3039,7 +3050,6 @@ a.tmenuimage:focus, .mainmenu.topmenuimage:focus {
outline: none; outline: none;
} }
div.mainmenu.home{ div.mainmenu.home{
background-position-x: center; background-position-x: center;
} }
@@ -3050,6 +3060,58 @@ div.mainmenu.menu {
} }
/* To show text of top menu according to option THEME_TOPMENU_DISABLE_IMAGE */
/* Text hidden by default */
<?php if (in_array(getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE'), array(2, 3, 4))) { ?>
.tmenulabel:not(.menuhider), .tmenulabel:not(.menuhider)::before {
display: none;
/* opacity: 0; To show text after transition */
}
a.tmenuimage:not(.menuhider), a.tmenuimage:not(.menuhider)::before,
div.tmenuimage:not(.menuhider), div.tmenuimage:not(.menuhider)::before,
span.tmenuimage:not(.menuhider), span.tmenuimage:not(.menuhider)::before {
font-size: 1.3em;
margin-top: 8px !important;
}
<?php } ?>
/* Test of picto visible on hover, for all picto */
<?php if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 2) { ?>
.tmenudiv:hover .tmenulabel:not(.menuhider), .tmenudiv:hover .tmenulabel:not(.menuhider)::before {
display: block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
/* For transition transition-delay: 1000ms;
transition-property: all; */
opacity: 1;
display: initial !important;
line-height: 0.6em !important;
height: 1em !important;
overflow: hidden;
text-overflow: ellipsis;
color: var(--colortextbackhmenu);
top: 0px;
}
.tmenudiv:hover .tmenuimage:not(.menuhider), .tmenudiv:hover .tmenuimage:not(.menuhider)::before {
/* For transition transition-delay: 1000ms;
transition-property: all; */
margin-top: 0px !important;
}
<?php } ?>
/* Text of picto visible on hover, for the picto only */
<?php if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 3) { ?>
li.tmenu:hover .tmenulabel:not(.menuhider), li.tmenu:hover .tmenulabel:not(.menuhider)::before {
display: initial !important;
}
li.tmenu:hover .tmenuimage:not(.menuhider), li.tmenu:hover .tmenuimage:not(.menuhider):before {
font-size: 1.1em !important;
margin-top: 0px !important;
}
<?php } ?>
/* Do not load menu img if hidden to save bandwidth */ /* Do not load menu img if hidden to save bandwidth */
<?php if (empty($dol_hide_topmenu)) { ?> <?php if (empty($dol_hide_topmenu)) { ?>
@@ -3314,7 +3376,7 @@ div.login_block {
top: -1000px; top: -1000px;
} }
div.login_block a { div.login_block a {
color: var(--colortexthmenu); color: var(--colortextbackvmenu);
display: inline-block; display: inline-block;
} }
div.login_block a .atoploginusername { div.login_block a .atoploginusername {
@@ -3325,7 +3387,7 @@ div.login_block a .atoploginusername {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
div.login_block span.aversion { div.login_block span.aversion {
color: var(--colortexthmenu); color: var(--colortextbackvmenu);
filter: contrast(0.7); filter: contrast(0.7);
} }
div.login_block table { div.login_block table {
@@ -3384,7 +3446,7 @@ a.aversion {
} }
.atoplogin, .atoplogin:hover { .atoplogin, .atoplogin:hover {
color: var(--colortexthmenu) !important; color: var(--colortextbackvmenu) !important;
} }
.alogin, .alogin:hover { .alogin, .alogin:hover {
color: #888 !important; color: #888 !important;
@@ -6455,6 +6517,9 @@ input.select2-input {
{ {
background-color: unset; background-color: unset;
} }
#blockvmenusearch .select2-container--default .select2-selection--single .select2-selection__placeholder {
color: var(--colortextbackvmenu);
}
.select2-container--default .select2-selection--single .select2-selection__rendered { .select2-container--default .select2-selection--single .select2-selection__rendered {
color: unset; color: unset;
} }
@@ -7912,6 +7977,7 @@ table.jPicker {
{ {
div.tmenucenter { div.tmenucenter {
max-width: 56px; /* size of viewport */ max-width: 56px; /* size of viewport */
width: 52px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;