Cosmetics : Highlight the current menu item
This commit is contained in:
parent
0c74a7c504
commit
eba7f94922
3 changed files with 38 additions and 18 deletions
|
|
@ -154,7 +154,8 @@ function html_page_start($p_theme="",$p_script="")
|
|||
echo "<HEAD>
|
||||
<TITLE> Gnu Accountancy</TITLE>
|
||||
<META http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">
|
||||
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\">
|
||||
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\" media=\"screen\">
|
||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"style-print.css\" media=\"print\">
|
||||
</HEAD><script src=\"scripts.js\" type=\"text/javascript\"></script>";
|
||||
echo "<BODY $p_script>";
|
||||
}
|
||||
|
|
@ -260,18 +261,24 @@ function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$defau
|
|||
// direction Vertical
|
||||
if ( $p_dir == 'V') {
|
||||
foreach ($p_array as $all=>$href){
|
||||
$ret.='<TR><TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'">'.$href[1].'</A></TD></TR>';
|
||||
$title="";
|
||||
if ( isset ($href[2] ))
|
||||
$title=$href[2];
|
||||
$ret.='<TR><TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD></TR>';
|
||||
}
|
||||
}
|
||||
//direction Horizontal
|
||||
else if ( $p_dir == 'H' ) {
|
||||
$ret.="<TR>";
|
||||
foreach ($p_array as $all=>$href){
|
||||
$title="";
|
||||
if ( isset ($href[2] ))
|
||||
$title=$href[2];
|
||||
if ( $default== $href[0]) {
|
||||
$ret.='<TD CLASS="selectedcell">'.$href[1].'</TD>';
|
||||
|
||||
} else {
|
||||
$ret.='<TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'">'.$href[1].'</A></TD>';
|
||||
$ret.='<TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD>';
|
||||
}
|
||||
}
|
||||
$ret.="</TR>";
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null)
|
|||
if ($Max==0) return "No row selected";
|
||||
$r.="<TABLE width=\"100%\">";
|
||||
$l_sessid=$_REQUEST['PHPSESSID'];
|
||||
$r.="<tr>";
|
||||
$r.="<tr class=\"even\">";
|
||||
$r.="<th> Internal </th>";
|
||||
$r.="<th> Date </th>";
|
||||
$r.="<th> Echéance </th>";
|
||||
|
|
@ -346,7 +346,7 @@ function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null)
|
|||
$row=pg_fetch_array($Res,$i);
|
||||
|
||||
if ( $i % 2 == 0 ) $tr='<TR class="odd">';
|
||||
else $tr='<TR>';
|
||||
else $tr='<TR class="even">';
|
||||
$r.=$tr;
|
||||
//internal code
|
||||
// button modify
|
||||
|
|
|
|||
|
|
@ -160,24 +160,36 @@ function ShowMenuCompta($p_dossier)
|
|||
{
|
||||
include_once("postgres.php");
|
||||
$l_name=GetDossierName($p_dossier);
|
||||
// find our current menu
|
||||
$default=basename($_SERVER['SCRIPT_NAME']);
|
||||
switch ($default) {
|
||||
case "user_jrn.php":
|
||||
$default.="?show";
|
||||
break;
|
||||
case "recherche.php":
|
||||
$default.="?p_dossier=$p_dossier";
|
||||
break;
|
||||
case "fiche.php":
|
||||
$default.="?p_dossier=$p_dossier";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$p_array=array(array("user_jrn.php?show","Journaux"),
|
||||
array("recherche.php?p_dossier=$p_dossier","Recherche"),
|
||||
array("fiche.php?p_dossier=$p_dossier","Fiche"),
|
||||
array("user_impress.php","Impression"),
|
||||
array("user_advanced.php","Avancé"),
|
||||
$p_array=array(array("user_jrn.php?show","Journaux","Les journaux permettent d'encoder toutes les opérations"),
|
||||
array("recherche.php?p_dossier=$p_dossier","Recherche","Pour retrouver une opération"),
|
||||
array("fiche.php?p_dossier=$p_dossier","Fiche","Ajouter, modifier ou effacer des fiches"),
|
||||
array("user_impress.php","Impression","Impression"),
|
||||
array("user_advanced.php","Avancé","Opérations délicates"),
|
||||
array("dossier_prefs.php","Paramètre"),
|
||||
array('user_pref.php','Preference'),
|
||||
array('login.php','Accueil'),
|
||||
array('logout.php','logout')
|
||||
array('user_pref.php','Preference',"Préférence de l'utilisateur"),
|
||||
array('login.php','Accueil',"Accueil"),
|
||||
array('logout.php','logout',"Sortie")
|
||||
);
|
||||
|
||||
$result=ShowItem($p_array,'H');
|
||||
//echo "<DIV class=\"tmenu\">";
|
||||
$result=ShowItem($p_array,'H',"mtitle","mtitle",$default);
|
||||
|
||||
echo "<H2 class=\"info\"> $l_name </H2>";
|
||||
echo $result;
|
||||
//echo "</DIV>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -408,7 +420,8 @@ function u_ShowMenuRecherche($p_cn,$p_jrn,$p_sessid,$p_array=null)
|
|||
if ( $p_mont_sel != "" ) $opt.='<OPTION value="'.$p_mont_sel.'" SELECTED> '.$p_mont_sel;
|
||||
$r="";
|
||||
|
||||
$r.= '<div style="border-style:outset;border-width:1pt;">';
|
||||
// $r.= '<div style="border-style:outset;border-width:1pt;">';
|
||||
$r.= '<div class="recherche_form">';
|
||||
$r.=JS_SEARCH_POSTE;
|
||||
$r.= "<B>Recherche</B>";
|
||||
$r.= '<FORM ACTION="recherche.php?action=search&PHPSESSID='.$p_sessid.'&nofirst" METHOD="POST">';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue