The selected menu tab is now shown with same background as hover color.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 30 Apr 2007 13:24:05 +0000 (13:24 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 30 Apr 2007 13:24:05 +0000 (13:24 +0000)
CHANGELOG.txt
config.php
includes/page/header.inc

index 090d3bc7994cb68cf489d1528e9ddac1b41902eb..20d784c9759b26838b50a726aa7747a90ae036ac 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+30-Apr-2007 Joe Hunt
+ + The selected menu tab is now shown with same background as hover color.
+ $ config.php (default tab line 77. Change if you want)
+   /includes/page/header.inc
+   
 28-Apr-2007 Joe Hunt
  # When saving work order entries a lot of debug boxes appeared. Fixed
  # When clicking on the link, Issue, on work order inquires an empty screen appeared. Fixed
index dd09acd75406c66504db5a3028e82e29353a3601..3c4a026d9007ff5b44f3189cc2fdc95f63c42258 100644 (file)
@@ -73,6 +73,9 @@
        /* use Audit Trails in GL */
        $use_audit_trail = 0;
 
+       /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
+       $def_app = "orders";
+
        $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
        $dateseps               = array("/", ".", "-", " ");
        $thoseps                = array(",", ".", " ");
index b23ecc87b7787bc1fc17f193b9b75f996e50359d..4a74bb7ba4f914e192a32880e32c5573a78013de 100644 (file)
@@ -3,7 +3,7 @@
 function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="")
 {
        // titles and screen header
-       global $db_connections, $path_to_root;
+       global $db_connections, $path_to_root, $def_app;
        $theme = user_theme();
        $local_path_to_root = $path_to_root;
 
@@ -11,6 +11,16 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
        {
                $no_menu = false;
        }
+       if (!isset($_SESSION["sel_app"]))
+               session_register("sel_app");    
+       if (isset($_SESSION["App"]) && is_object($_SESSION["App"]) && isset($_SESSION["App"]->selected_application) && 
+               $_SESSION["App"]->selected_application != "")
+               $sel_app = $_SESSION["App"]->selected_application;
+       elseif (isset($_SESSION["sel_app"]) && $_SESSION["sel_app"] != "")
+               $sel_app = $_SESSION["sel_app"];
+       else
+               $sel_app = $def_app;
+       $_SESSION["sel_app"] = $sel_app;
 
     echo "<html dir='" . $_SESSION['language']->dir . "' >";
     echo "<head><title>$title</title>";
@@ -39,13 +49,13 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
        {
                echo "<table cellpadding=0 cellspacing=0 width='100%'><tr><td>";
                echo "<div class=tabs>";
-               echo "<a href='$local_path_to_root/index.php?application=orders". SID ."'>" . _("Sales") . "</a>";
-               echo "<a href='$local_path_to_root/index.php?application=AP". SID ."'>" . _("Purchases") . "</a>";
-               echo "<a href='$local_path_to_root/index.php?application=stock". SID ."'>" . _("Items and Inventory") . "</a>";
-               echo "<a href='$local_path_to_root/index.php?application=manuf". SID ."'>" . _("Manufacturing") . "</a>";
-               echo "<a href='$local_path_to_root/index.php?application=proj". SID ."'>" . _("Dimensions") . "</a>";
-               echo "<a href='$local_path_to_root/index.php?application=GL". SID ."'>" . _("Banking and General Ledger") . "</a>";
-               echo "<a href='$local_path_to_root/index.php?application=system". SID ."'>" . _("Setup") . "</a>";
+               echo "<a ".($sel_app == "orders" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=orders". SID ."'>" . _("Sales") . "</a>";
+               echo "<a ".($sel_app == "AP" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=AP". SID ."'>" . _("Purchases") . "</a>";
+               echo "<a ".($sel_app == "stock" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=stock". SID ."'>" . _("Items and Inventory") . "</a>";
+               echo "<a ".($sel_app == "manuf" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=manuf". SID ."'>" . _("Manufacturing") . "</a>";
+               echo "<a ".($sel_app == "proj" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=proj". SID ."'>" . _("Dimensions") . "</a>";
+               echo "<a ".($sel_app == "GL" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=GL". SID ."'>" . _("Banking and General Ledger") . "</a>";
+               echo "<a ".($sel_app == "system" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=system". SID ."'>" . _("Setup") . "</a>";
                echo "</div>";
 
                echo "</td></tr></table>";