noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 05/10: Bug #1151Bug cannot display properly w


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 05/10: Bug #1151Bug cannot display properly when only one submenu
Date: Wed, 26 Aug 2015 18:11:18 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit fd6192fa09c242fcc4c3953516030c53b24ccf94
Author: Dany De Bontridder <address@hidden>
Date:   Wed Aug 26 00:05:14 2015 +0200

    Bug #1151Bug cannot display properly when only one submenu
---
 include/ac_common.php |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/include/ac_common.php b/include/ac_common.php
index a5207b2..358e5b0 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -295,11 +295,14 @@ function html_page_start($p_theme="", $p_script="", 
$p_script2="")
     if ($is_msie == 0 ) 
     {
         echo '<!doctype html>';
+        printf("\n");
         echo '<meta name="viewport" content="width=device-width, 
initial-scale=1.0">';
+        printf("\n");
+    }
+    else {
+        echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN" >';
+        printf("\n");
     }
-    else
-         echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN" >';
-    
     echo "<HTML>";
 
     if ($p_script2 != "")
@@ -991,13 +994,26 @@ function show_menu($module)
             $style_menu=$a_style_menu[$level];
         }
                require 'template/menu.php';
-    } // there is only one submenu so we include the code or javascript
+    } // there is only one submenu so we include the code or javascript 
+      // or we show the submenu
     elseif (count($amenu) == 1)
     {
+        if ( trim($amenu[0]['me_url']) != "" ||
+             trim ($amenu[0]['me_file']) != "" ||
+             trim ($amenu[0]['me_javascript']) != "" )
+        {
                echo '<div class="topmenu">';
                echo h2info(_($amenu[0]['me_menu']));
                echo '</div>';
                $module = $amenu[0]['pm_id'];
+        } else {
+           $url=$_REQUEST['ac'].'/'.$amenu[0]['me_code'];
+           echo '<a href="do.php?gDossier='.Dossier::id().'&ac='.$url.'">';
+           echo _($amenu[0]['me_menu']);
+           echo '</a>';
+           $level++;
+           return;
+        }
     }
     
     // There is no submenu or only one
@@ -1015,8 +1031,7 @@ function show_menu($module)
 
                if (count($file)==0)
                {
-                       echo "Configuration incorrecte pour ce module ".$module;
-                       exit;
+                        return;
                }
 
                if ($file[0]['me_file'] != "")



reply via email to

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