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:
Laurent Destailleur
2015-06-26 16:21:09 +02:00
parent 57b0de25e2
commit 8f691138e8
8 changed files with 113 additions and 30 deletions

View File

@@ -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 ' &nbsp; ('.$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 ' &nbsp; ('.$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 ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';
//}
print '</tr>';
}
print '</table>';