Fix: Problème sur le menu webcalendar. C'est un autre menu qui apparaissait sélectionné.

This commit is contained in:
Laurent Destailleur 2005-01-23 18:22:06 +00:00
parent 50523a94fe
commit add221b92e
2 changed files with 13 additions and 10 deletions

View File

@ -108,6 +108,7 @@ class MenuTop {
print '<a '.$class.' href="'.DOL_URL_ROOT.'/adherents/index.php?mainmenu=members&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Members").'</a>'; print '<a '.$class.' href="'.DOL_URL_ROOT.'/adherents/index.php?mainmenu=members&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Members").'</a>';
} }
// Products-Services
if ($conf->produit->enabled || $conf->service->enabled) if ($conf->produit->enabled || $conf->service->enabled)
{ {
$langs->load("products"); $langs->load("products");
@ -130,6 +131,7 @@ class MenuTop {
} }
// Supplier
if ($conf->fournisseur->enabled) if ($conf->fournisseur->enabled)
{ {
$langs->load("suppliers"); $langs->load("suppliers");
@ -147,6 +149,7 @@ class MenuTop {
print '<a '.$class.' href="'.DOL_URL_ROOT.'/fourn/index.php?mainmenu=suppliers&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Suppliers").'</a>'; print '<a '.$class.' href="'.DOL_URL_ROOT.'/fourn/index.php?mainmenu=suppliers&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Suppliers").'</a>';
} }
// Commercial
if ($conf->commercial->enabled) if ($conf->commercial->enabled)
{ {
$langs->load("commercial"); $langs->load("commercial");
@ -165,6 +168,7 @@ class MenuTop {
} }
// Compta
if ($conf->compta->enabled || $conf->banque->enabled || $conf->caisse->enabled) if ($conf->compta->enabled || $conf->banque->enabled || $conf->caisse->enabled)
{ {
$langs->load("compta"); $langs->load("compta");
@ -182,7 +186,8 @@ class MenuTop {
print '<a '.$class.' href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Accountancy")."/".$langs->trans("Treasury").'</a>'; print '<a '.$class.' href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Accountancy")."/".$langs->trans("Treasury").'</a>';
} }
// Tools
if (1 == 1) { if (1 == 1) {
$langs->load("other"); $langs->load("other");
@ -199,16 +204,13 @@ class MenuTop {
print '<a '.$class.' href="'.DOL_URL_ROOT.'/comm/mailing/index.php?mainmenu=tools&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Tools").'</a>'; print '<a '.$class.' href="'.DOL_URL_ROOT.'/comm/mailing/index.php?mainmenu=tools&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Tools").'</a>';
} }
// Webcal
if ($conf->webcal->enabled) if ($conf->webcal->enabled)
{ {
$langs->load("other"); $langs->load("other");
$class=""; $class="";
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "webcalendar") if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "webcal")
{
$class='class="tmenu" id="sel"';
}
elseif (ereg("^".DOL_URL_ROOT."\/projet\/webcal",$_SERVER["PHP_SELF"]) || ereg("^".DOL_URL_ROOT."\/webcalendar\/",$_SERVER["PHP_SELF"]))
{ {
$class='class="tmenu" id="sel"'; $class='class="tmenu" id="sel"';
} }

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
* *
*/ */
/*! \file htdocs/projet/webcal.php /** \file htdocs/projet/webcal.php
\ingroup webcalendar \ingroup webcalendar
\brief Page générant 2 frames, une pour le menu Dolibarr, l'autre pour l'affichage du calendrier \brief Page générant 2 frames, une pour le menu Dolibarr, l'autre pour l'affichage du calendrier
\author Laurent Destailleur \author Laurent Destailleur
@ -29,8 +29,9 @@
require("./pre.inc.php"); require("./pre.inc.php");
$url=PHPWEBCALENDAR_URL; $url=PHPWEBCALENDAR_URL;
$mainmenu=isset($_GET["mainmenu"])?$_GET["mainmenu"]:"";
$leftmenu=isset($_GET["leftmenu"])?$_GET["leftmenu"]:"";
print " print "
<html> <html>
@ -39,7 +40,7 @@ print "
</head> </head>
<frameset rows=\"28,*\" border=0 framespacing=0 frameborder=0> <frameset rows=\"28,*\" border=0 framespacing=0 frameborder=0>
<frame name=\"barre\" src=\"webcaltop.php\" noresize scrolling=\"NO\" noborder> <frame name=\"barre\" src=\"webcaltop.php?mainmenu=$mainmenu&leftmenu=$leftmenu\" noresize scrolling=\"NO\" noborder>
<frame name=\"main\" src=\"$url\"> <frame name=\"main\" src=\"$url\">
<noframes> <noframes>
<body> <body>