Add param to force to hide menu from login page

This commit is contained in:
Laurent Destailleur 2012-08-05 21:14:17 +02:00
parent 4d59ecb049
commit 3af27d17ab
2 changed files with 268 additions and 256 deletions

View File

@ -69,6 +69,8 @@ $(document).ready(function () {
<input type="hidden" name="dst_second" id="dst_second" value="" /> <input type="hidden" name="dst_second" id="dst_second" value="" />
<input type="hidden" name="screenwidth" id="screenwidth" value="" /> <input type="hidden" name="screenwidth" id="screenwidth" value="" />
<input type="hidden" name="screenheight" id="screenheight" value="" /> <input type="hidden" name="screenheight" id="screenheight" value="" />
<input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="" />
<input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="" />
<table class="login_table_title" summary="<?php echo $title; ?>" cellpadding="0" cellspacing="0" border="0" align="center"> <table class="login_table_title" summary="<?php echo $title; ?>" cellpadding="0" cellspacing="0" border="0" align="center">
<tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr> <tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr>

View File

@ -547,6 +547,8 @@ if (! defined('NOLOGIN'))
$_SESSION["dol_screenheight"]=isset($dol_screenheight)?$dol_screenheight:''; $_SESSION["dol_screenheight"]=isset($dol_screenheight)?$dol_screenheight:'';
$_SESSION["dol_company"]=$conf->global->MAIN_INFO_SOCIETE_NOM; $_SESSION["dol_company"]=$conf->global->MAIN_INFO_SOCIETE_NOM;
$_SESSION["dol_entity"]=$conf->entity; $_SESSION["dol_entity"]=$conf->entity;
if (GETPOST('dol_hide_topmenu')) $_SESSION['dol_hide_topmenu']=1;
if (GETPOST('dol_hide_leftmenu')) $_SESSION['dol_hide_leftmenu']=1;
dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id()); dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id());
$db->begin(); $db->begin();
@ -788,8 +790,12 @@ if (! function_exists("llxHeader"))
function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='') function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='')
{ {
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
if (empty($conf->global->MAIN_HIDE_TOP_MENU))
{
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring); top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring);
if (empty($conf->global->MAIN_HIDE_LEFT_MENU)) { }
if (empty($conf->global->MAIN_HIDE_LEFT_MENU))
{
left_menu('', $help_url, '', '', 1, $title); left_menu('', $help_url, '', '', 1, $title);
} }
main_area($title); main_area($title);
@ -1217,6 +1223,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n"; if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
if (empty($_SESSION['dol_hide_topmenu']))
{
print '<div id="tmenu_tooltip" class="tmenu">'."\n"; print '<div id="tmenu_tooltip" class="tmenu">'."\n";
// Show menu // Show menu
@ -1315,6 +1323,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
print '</tr></table>'."\n"; print '</tr></table>'."\n";
print "</div>\n"; print "</div>\n";
}
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "</div><!-- End top layout -->\n"; if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "</div><!-- End top layout -->\n";
@ -1355,6 +1364,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
} }
$hookmanager->initHooks(array('searchform','leftblock')); $hookmanager->initHooks(array('searchform','leftblock'));
if (empty($_SESSION['dol_hide_leftmenu']))
{
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n"; if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
else print '<td class="vmenu" valign="top">'; else print '<td class="vmenu" valign="top">';
@ -1420,7 +1431,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
} }
// Left column // Left column
print '<!-- Begin left area - menu '.$left_menu.' -->'."\n"; print '<!-- Begin left menu - menu '.$left_menu.' -->'."\n";
print '<div class="vmenu">'."\n"; print '<div class="vmenu">'."\n";
@ -1503,7 +1514,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
print "\n"; print "\n";
print "</div>\n"; print "</div>\n";
print "<!-- End left vertical menu -->\n"; print "<!-- End left menu -->\n";
print "\n"; print "\n";
@ -1514,9 +1525,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End left layout -->'."\n"; if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End left layout -->'."\n";
else print '</td>'; else print '</td>';
}
print "\n";
print '<!-- End of left area -->'."\n";
print "\n"; print "\n";
print '<!-- Begin right area -->'."\n"; print '<!-- Begin right area -->'."\n";