mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 00:53:00 +01:00
NEW Can edit Background color for Top menu and Background color for
table title line (works only with theme menu eldy).
This commit is contained in:
@@ -254,7 +254,10 @@ function entity_prepare_head($object, $aEntities)
|
||||
*/
|
||||
function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
{
|
||||
global $conf,$langs,$bc;
|
||||
global $conf,$langs,$db;
|
||||
global $bc;
|
||||
|
||||
$formother = new FormOther($db);
|
||||
|
||||
//$dirthemes=array(empty($conf->global->MAIN_FORCETHEMEDIR)?'/theme':$conf->global->MAIN_FORCETHEMEDIR.'/theme');
|
||||
$dirthemes=array('/theme');
|
||||
@@ -380,9 +383,48 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
|
||||
$hoverdisabled=(isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '0');
|
||||
print '<td colspan="'.($colspan-1).'"><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
||||
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
//if ($conf->theme == 'eldy')
|
||||
//{
|
||||
// TopMenuBackgroundColor
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||
print '<td colspan="'.($colspan-1).'">';
|
||||
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; width: 36px; background-color: #'.$color.'" value="'.$color.'">';
|
||||
else print $langs->trans("Default");
|
||||
}
|
||||
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';
|
||||
|
||||
// BackgroundTableTitleColor
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("BackgroundTableTitleColor").'</td>';
|
||||
print '<td colspan="'.($colspan-1).'">';
|
||||
if ($edit)
|
||||
{
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1,array()),''),'THEME_ELDY_BACKTITLE1','formcolor',1).' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
|
||||
}
|
||||
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';
|
||||
//}
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
Reference in New Issue
Block a user