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
|
||||
*
|
||||
* @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 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
|
||||
@ -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"]));
|
||||
|
||||
// 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;
|
||||
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;
|
||||
|
||||
// Show menu
|
||||
$invert=empty($conf->global->MAIN_MENU_INVERT)?"":"invert";
|
||||
if (empty($noout))
|
||||
{
|
||||
$alt=0; $blockvmenuopened=false;
|
||||
@ -1268,11 +1269,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$blockvmenuopened=true;
|
||||
if (($alt%2==0))
|
||||
{
|
||||
print '<div class="blockvmenuimpair">'."\n";
|
||||
print '<div class="blockvmenuimpair'.$invert.'">'."\n";
|
||||
}
|
||||
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';
|
||||
$this->menu=new Menu();
|
||||
|
||||
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);
|
||||
if (empty($conf->global->MAIN_MENU_INVERT))
|
||||
{
|
||||
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')
|
||||
{
|
||||
$res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
||||
@ -167,7 +177,7 @@ class MenuManager
|
||||
// We add sub entry
|
||||
print str_pad('',1).'<li data-role="list-dividerxxx" class="lilevel1 ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
|
||||
print '<a href="'.$relurl.'"';
|
||||
//print ' data-ajax="false"';
|
||||
//print ' data-ajax="false"';
|
||||
print '>';
|
||||
print str_pad('',12,' ');
|
||||
if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") print $langs->trans("Access"); // No translation
|
||||
@ -185,10 +195,10 @@ class MenuManager
|
||||
if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2='';
|
||||
if ($val2['level']==0) print str_pad('',$val2['level']+1).'<li'.($val2['level']==0?' data-role="list-dividerxxx"':'').' class="lilevel'.($val2['level']+1).' ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
|
||||
else print str_pad('',$val2['level']+1).'<li class="lilevel'.($val2['level']+1).'">'; // ui-btn to highlight on clic
|
||||
if ($relurl2)
|
||||
if ($relurl2)
|
||||
{
|
||||
print '<a href="'.$relurl2.'"';
|
||||
//print ' data-ajax="false"';
|
||||
//print ' data-ajax="false"';
|
||||
print '>';
|
||||
}
|
||||
print str_pad('',($val2['level']+1)*12,' ');
|
||||
|
||||
@ -46,7 +46,7 @@ print "
|
||||
<title>Dolibarr frame for external web site</title>
|
||||
</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=\"main\" src=\"".$conf->global->EXTERNALSITE_URL."\">
|
||||
<noframes>
|
||||
|
||||
@ -1273,7 +1273,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
*
|
||||
* @param string $head Lines in the HEAD
|
||||
* @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 $disablehead Do not output head section
|
||||
* @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))
|
||||
{
|
||||
// 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->showmenu('top'); // This contains a \n
|
||||
print "</div>\n";
|
||||
|
||||
@ -601,8 +601,10 @@ li.tmenu, li.tmenusel {
|
||||
<?php print $minwidthtmenu?'min-width: '.$minwidthtmenu.'px;':''; ?>
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
<?php if (empty($conf->global->MAIN_MENU_INVERT)) { ?>
|
||||
float: <?php print $left; ?>;
|
||||
height: <?php print $heightmenu; ?>px;
|
||||
<?php } ?>
|
||||
position:relative;
|
||||
display: block;
|
||||
padding: 0px 0px 2px 0px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user