Experiment hidden option MAIN_MENU_INVERT
This commit is contained in:
parent
459e5f7472
commit
c1e349d110
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
|||||||
* Core function to output top menu eldy
|
* Core function to output top menu eldy
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param string $atarget Target
|
* @param string $atarget Target (Example: '' or '_top')
|
||||||
* @param int $type_user 0=Menu for backoffice, 1=Menu for front office
|
* @param int $type_user 0=Menu for backoffice, 1=Menu for front office
|
||||||
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
||||||
* @param array &$menu Object Menu to return back list of menu entries
|
* @param array &$menu Object Menu to return back list of menu entries
|
||||||
@ -443,7 +443,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"]));
|
$leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"]));
|
||||||
|
|
||||||
// Show logo company
|
// Show logo company
|
||||||
if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO))
|
if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO))
|
||||||
{
|
{
|
||||||
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
|
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
|
||||||
if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||||
@ -1253,6 +1253,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
if (! is_array($menu_array)) return 0;
|
if (! is_array($menu_array)) return 0;
|
||||||
|
|
||||||
// Show menu
|
// Show menu
|
||||||
|
$invert=empty($conf->global->MAIN_MENU_INVERT)?"":"invert";
|
||||||
if (empty($noout))
|
if (empty($noout))
|
||||||
{
|
{
|
||||||
$alt=0; $blockvmenuopened=false;
|
$alt=0; $blockvmenuopened=false;
|
||||||
@ -1268,11 +1269,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$blockvmenuopened=true;
|
$blockvmenuopened=true;
|
||||||
if (($alt%2==0))
|
if (($alt%2==0))
|
||||||
{
|
{
|
||||||
print '<div class="blockvmenuimpair">'."\n";
|
print '<div class="blockvmenuimpair'.$invert.'">'."\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<div class="blockvmenupair">'."\n";
|
print '<div class="blockvmenupair'.$invert.'">'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -131,8 +131,18 @@ class MenuManager
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
||||||
$this->menu=new Menu();
|
$this->menu=new Menu();
|
||||||
|
|
||||||
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,0);
|
if (empty($conf->global->MAIN_MENU_INVERT))
|
||||||
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0);
|
{
|
||||||
|
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,0);
|
||||||
|
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$conf->global->MAIN_SHOW_LOGO=0;
|
||||||
|
if ($mode == 'top') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0);
|
||||||
|
if ($mode == 'left') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,0);
|
||||||
|
}
|
||||||
|
|
||||||
if ($mode == 'jmobile')
|
if ($mode == 'jmobile')
|
||||||
{
|
{
|
||||||
$res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
$res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
||||||
|
|||||||
@ -46,7 +46,7 @@ print "
|
|||||||
<title>Dolibarr frame for external web site</title>
|
<title>Dolibarr frame for external web site</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<frameset rows=\"".$heightforframes.",*\" border=0 framespacing=0 frameborder=0>
|
<frameset ".(empty($conf->global->MAIN_MENU_INVERT)?"rows":"cols")."=\"".$heightforframes.",*\" border=0 framespacing=0 frameborder=0>
|
||||||
<frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu."&leftmenu=".$leftmenu."&idmenu=".$idmenu.($theme?'&theme='.$theme:'').($codelang?'&lang='.$codelang:'')."&nobackground=1\" noresize scrolling=\"NO\" noborder>
|
<frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu."&leftmenu=".$leftmenu."&idmenu=".$idmenu.($theme?'&theme='.$theme:'').($codelang?'&lang='.$codelang:'')."&nobackground=1\" noresize scrolling=\"NO\" noborder>
|
||||||
<frame name=\"main\" src=\"".$conf->global->EXTERNALSITE_URL."\">
|
<frame name=\"main\" src=\"".$conf->global->EXTERNALSITE_URL."\">
|
||||||
<noframes>
|
<noframes>
|
||||||
|
|||||||
@ -1273,7 +1273,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
*
|
*
|
||||||
* @param string $head Lines in the HEAD
|
* @param string $head Lines in the HEAD
|
||||||
* @param string $title Title of web page
|
* @param string $title Title of web page
|
||||||
* @param string $target Target to use in menu links
|
* @param string $target Target to use in menu links (Example: '' or '_top')
|
||||||
* @param int $disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax)
|
* @param int $disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax)
|
||||||
* @param int $disablehead Do not output head section
|
* @param int $disablehead Do not output head section
|
||||||
* @param array $arrayofjs Array of js files to add in header
|
* @param array $arrayofjs Array of js files to add in header
|
||||||
@ -1373,7 +1373,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
if (empty($conf->dol_hide_topmenu))
|
if (empty($conf->dol_hide_topmenu))
|
||||||
{
|
{
|
||||||
// Show menu entries
|
// Show menu entries
|
||||||
print '<div id="tmenu_tooltip" class="tmenu">'."\n";
|
print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT)?'':'invert').'" class="tmenu">'."\n";
|
||||||
$menumanager->atarget=$target;
|
$menumanager->atarget=$target;
|
||||||
$menumanager->showmenu('top'); // This contains a \n
|
$menumanager->showmenu('top'); // This contains a \n
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|||||||
@ -601,8 +601,10 @@ li.tmenu, li.tmenusel {
|
|||||||
<?php print $minwidthtmenu?'min-width: '.$minwidthtmenu.'px;':''; ?>
|
<?php print $minwidthtmenu?'min-width: '.$minwidthtmenu.'px;':''; ?>
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
|
<?php if (empty($conf->global->MAIN_MENU_INVERT)) { ?>
|
||||||
float: <?php print $left; ?>;
|
float: <?php print $left; ?>;
|
||||||
height: <?php print $heightmenu; ?>px;
|
height: <?php print $heightmenu; ?>px;
|
||||||
|
<?php } ?>
|
||||||
position:relative;
|
position:relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0px 0px 2px 0px;
|
padding: 0px 0px 2px 0px;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user