NEW Add option "Hide images in Top menu".

This commit is contained in:
Laurent Destailleur 2016-08-05 23:34:59 +02:00
parent 126d9ae6bf
commit d2c55330e9
6 changed files with 61 additions and 8 deletions

View File

@ -946,7 +946,7 @@ NEW: add hook in send mail
NEW: Add hooks on list of members to allow an external module to add more fields into list view.
NEW: Add hooks to allow an external module to complete list of events into calendar views.
NEW: Add opportunity amount on project card.
NEW: Add option THEME_ELDY_DISABLE_IMAGE to disable images into menu eldy.
NEW: Add option THEME_TOPMENU_DISABLE_IMAGE to disable images into menu eldy.
NEW: add PDF icon on linked element into project
NEW: add "productpricecard" hook and uniformize code
NEW: Add ref and label of project into export

View File

@ -78,8 +78,12 @@ if ($action == 'update')
$val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'),array()))));
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
else dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', implode(',',colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'),array())),'chaine',0,'',$conf->entity);
else dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', implode(',',colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'),array())),'chaine',0,'',$conf->entity);
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'),'chaine',0,'',$conf->entity);
$val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array()))));
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity);
else dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', implode(',',colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array())),'chaine',0,'',$conf->entity);

View File

@ -296,7 +296,7 @@ function entity_prepare_head($object, $aEntities)
*/
function show_theme($fuser,$edit=0,$foruserprofile=false)
{
global $conf,$langs,$db;
global $conf,$langs,$db,$form;
global $bc;
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
@ -515,6 +515,52 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
print '</td>';
}
// 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
{
$default=$langs->trans('No');
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
print '<td colspan="'.($colspan-1).'">';
if ($edit)
{
print $form->selectyesno('THEME_TOPMENU_DISABLE_IMAGE', $conf->global->THEME_TOPMENU_DISABLE_IMAGE, 1);
}
else
{
print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE);
}
print ' &nbsp; ('.$langs->trans("Default").': <strong>'.$default.'</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';
}
// BackgroundTableTitleColor
if ($foruserprofile)
{

View File

@ -1548,9 +1548,10 @@ HighlightLinesColor=Highlight color of the line when the mouse passes over (keep
TextTitleColor=Color of page title
LinkColor=Color of links
PressF5AfterChangingThis=Press F5 on keyboard after changing this value to have it effective
NotSupportedByAllThemes=Will works with eldy theme but is not supported by all themes
NotSupportedByAllThemes=Will works with core themes, may not be supported by external themes
BackgroundColor=Background color
TopMenuBackgroundColor=Background color for Top menu
TopMenuDisableImages=Hide images in Top menu
LeftMenuBackgroundColor=Background color for Left menu
BackgroundTableTitleColor=Background color for Table title line
BackgroundTableLineOddColor=Background color for odd table lines

View File

@ -932,7 +932,7 @@ $heightmenu=46; /* height of top menu, part with image */
$heightmenu2=48; /* height of top menu, part with login */
$disableimages = 0;
$maxwidthloginblock = 110;
if (! empty($conf->global->THEME_ELDY_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu=0; }
if (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu=0; }
?>
div#id-top {
@ -940,6 +940,8 @@ div#id-top {
display:none;
<?php } else { ?>
background: rgb(<?php echo $colorbackhmenu1 ?>);
-webkit-box-shadow: 0 0 13px rgba(0,0,0,0.2);
box-shadow: 0 0 13px rgba(0,0,0,0.2);
<?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%);
@ -1354,7 +1356,7 @@ div.login_block {
position: absolute;
text-align: right;
<?php print $right; ?>: 5px;
top: 2px;
top: 3px;
font-weight: bold;
max-width: <?php echo $maxwidthloginblock; ?>px;
<?php if (GETPOST("optioncss") == 'print') { ?>
@ -2833,7 +2835,7 @@ span.boxstatstext {
line-height: 18px;
}
span.boxstatsindicator {
font-size: 110%;
font-size: 130%;
font-weight: normal;
}
span.dashboardlineindicator, span.dashboardlineindicatorlate {

View File

@ -972,7 +972,7 @@ $heightmenu=48; /* height of top menu, part with image */
$heightmenu2=48; /* height of top menu, ârt with login */
$disableimages = 0;
$maxwidthloginblock = 110;
if (! empty($conf->global->THEME_MD_DISABLE_IMAGE)) { $heightmenu = 30; $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu=0; }
if (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { $heightmenu = 30; $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu=0; }
?>
div#tmenu_tooltip {