Code

Updated framework to mark currently selected plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Feb 2010 14:18:14 +0000 (14:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Feb 2010 14:18:14 +0000 (14:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15754 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/main.php
gosa-core/ihtml/themes/modern/framework.tpl
gosa-core/include/class_pluglist.inc

index 7ff1ba336c8ff93d6480a6f31ce6c5ba3659d817..f66b548e7a8be43e8dc87ebd0d7367e8b8c83b5f 100644 (file)
@@ -299,8 +299,7 @@ $smarty->assign ("go_help", get_template_path('images/help.png'));
 if($reload_navigation){
   $plist->menu="";
 }
-$plist->gen_menu();
-$smarty->assign ("menu", $plist->menu);
+$smarty->assign ("menu", $plist->gen_menu());
 $smarty->assign ("plug", "$plug");
 
 $smarty->assign("iePngWorkaround", $config->get_cfg_value("iePngWorkaround","false" ) == "true");
index 468a7fca88e68de32d9cddce4c35b24879830fb6..e098fb7851ae51a7b95b2b12babab6969ba56b0c 100644 (file)
@@ -32,8 +32,8 @@
   <div class='plugin-area'>
     <div class='plugin-path'>
      <ul class='path-navigation'>
-      <li class='left right-border'>
-        <div class='nav-home' onClick="openPlugin('');"></div>
+      <li class='left right-border' onClick="openPlugin('');">
+        <div class='nav-home'></div>
       </li>
       <li class='left'>Welcome to GOsa</li>
       <li class='right left-border'>Help</li>
index 09c6808bbf532c755c2a6fcd2a658dffd9cb9e78..ec0e7408631baf840962ffc43f2efd755fd9358a 100644 (file)
@@ -201,7 +201,7 @@ class pluglist {
           $this->allowed_plugins[$index] = $index;
           $class= "";
           if($id == count($plug)) $class=" class='menu-last' \n   ";
-          $menu .=  "\n  <li $class onClick='return openPlugin({$index});'>".$plHeadline."</li>";
+          $menu .=  "\n  <li id='plugMenuId_{$index}' $class onClick='return openPlugin({$index});'>".$plHeadline."</li>";
         }
         $menu.= "\n </ul>";
         $menu.= "\n <div></div>\n";
@@ -223,9 +223,18 @@ class pluglist {
       </script>
         "; 
     }
+  
+    // Use javascript to mark the currently selected plugin.
+    if(isset($_GET['plug'])){
+      $menu = $this->menu."
+        <script language='javascript' type='text/javascript'>
+          $('plugMenuId_".$_GET['plug']."').className= 'current'
+        </script>
+        "; 
+    }
 
     // Return the generated/cached gosa menu.
-    return ($this->menu);
+    return ($menu);
   }