noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 20/20: Menu : highlight selected menu


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 20/20: Menu : highlight selected menu
Date: Sat, 24 Oct 2015 21:45:07 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 08827e1ae0b2f5ee2c0db6fd1104da1d6f9636b8
Author: Dany De Bontridder <address@hidden>
Date:   Sat Oct 24 23:36:48 2015 +0200

    Menu : highlight selected menu
---
 include/profile.inc.php                          |   13 +++++++++++++
 include/template/profile_menu_display_module.php |   16 ++++------------
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/include/profile.inc.php b/include/profile.inc.php
index e1ace5e..e2c57da 100644
--- a/include/profile.inc.php
+++ b/include/profile.inc.php
@@ -436,4 +436,17 @@ if (isset($_POST['delete_profil']))
     <?php
 
 }
+$dep=HtmlInput::default_value_post("dep", 0);
 ?>
+<script>
+    var selected_menu="<?php echo $dep;?>";
+    function menu_select(rowid) {
+        $('sub'+rowid).addClassName("selectedcell");
+        if ( selected_menu != "0" && rowid != selected_menu ) {
+            if ( $('sub'+selected_menu) ) {
+                $('sub'+selected_menu).removeClassName("selectedcell");
+            }
+        }
+        selected_menu=rowid;
+    }
+</script>  
\ No newline at end of file
diff --git a/include/template/profile_menu_display_module.php 
b/include/template/profile_menu_display_module.php
index 67db6a9..27a058e 100644
--- a/include/template/profile_menu_display_module.php
+++ b/include/template/profile_menu_display_module.php
@@ -24,10 +24,11 @@
  * Profile_Menu
  */
 ?>
- <div id="module_setting">
+ <div id="module_setting" class="content">
        <table class="result">
            <tr>
                <?php
+                $dep=HtmlInput::default_value_post("dep", 0);
                foreach ($ap_module as $row):
                        $js="";
                    $style="";
@@ -36,7 +37,7 @@
                        echo "</tr><tr>";
                        continue;
                    }
-                    $style=" tool ";
+                    $style=($dep == $row['pm_id'])?" selectedcell":" tool ";
                     $url="XX";
                    if ( $row['me_url']!='')
                    {
@@ -101,13 +102,4 @@
 
     </table>
 </div>
-<script>
-    var selected_menu="";
-    function menu_select(rowid) {
-        $('sub'+rowid).style.background="yellow";
-        if ( selected_menu != "" ) {
-            $('sub'+selected_menu).style.background="";
-        }
-        selected_menu=rowid;
-    }
-</script>    
\ No newline at end of file
+  
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]