noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 64/73: cosmetic : menu on small screen


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 64/73: cosmetic : menu on small screen
Date: Fri, 28 May 2021 05:26:48 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 2838cc2f08abe413b7ef3d83ebf418e589258742
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat May 22 18:16:18 2021 +0200

    cosmetic : menu on small screen
---
 html/css/style-classic7.css         | 89 ++++++++++++++++++++++++++++---------
 html/js/bootstrap.min.js.map        |  1 +
 html/js/jquery-3.6.0.min.js         |  2 +
 html/js/scripts.js                  |  4 +-
 include/lib/function_javascript.php |  1 +
 include/template/menu.php           |  4 +-
 include/template/module.php         | 70 ++++++++++++++++++++++++-----
 7 files changed, 135 insertions(+), 36 deletions(-)

diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css
index 9064dd8..9ba0a8c 100644
--- a/html/css/style-classic7.css
+++ b/html/css/style-classic7.css
@@ -162,7 +162,7 @@ td.tool a.mtitle:hover {
     padding:0px;
     margin: 0px;
     font-size:12.16px;
-    font-size:0.76rem;
+    font-size:0.77rem;
     float:right;
 }
 #module table,#module table tr,#module table td {
@@ -1003,30 +1003,58 @@ div.divinfo
     height:13px;
     font-weight:bold;
 }
+/**
+ * Search form for all HISTO*
+ */
+ div#search_form {
+         width:100%;
+         margin-left:0%;
+         left:0px;
+} 
 
 div#search_form
 {
     position:absolute;
     border:1px solid #000000;
-    top:15%;left:100px;
-    margin-left:25%;
     z-index:2;
-    width:50%;
     display:none;
     background-color:#e4e7ed;
-    /*! background-color:#AFC7F4; */
-    -moz-box-shadow: 10px 10px 5px #888;
-    -webkit-box-shadow: 10px 10px 5px #888;
-    box-shadow: 10px 10px 5px #888;
-    padding-bottom: 10px;
 }
 @media only screen and (max-width: 995px) {
-      div#search_form {
+   
+}
+/* SM */
+@media (min-width: 576px) {
+
+}
+/* MD */
+@media (min-width: 768px) {
+   div#search_form {
+       
          width:90%;
          margin-left:5%;
          left:0px;
+        box-shadow: 10px 10px 5px #888;
+        padding-bottom: 10px;
+         -moz-box-shadow: 10px 10px 5px #888;
+    -webkit-box-shadow: 10px 10px 5px #888;
+      }  
+}
+/* LG */
+@media (min-width: 992px) {
+   div#search_form {
+         top:15%;left:100px;
+        margin-left:25%;
+            width:50%;
+
       }  
 }
+/* XL */
+@media (min-width: 1200px) {
+
+}
+
+
 
 table.sortable td, table.table_large td, table.result td
 {
@@ -1402,10 +1430,7 @@ div#notice {
     border: 1px solid #000000;
 }
 div.name  {
-/*    position:absolute;
-    top:0px;
-    left:0px;*/
-    display:block;
+    display:none;
     }   
 div#modele_op_div{
     display: none;
@@ -1419,11 +1444,11 @@ div#modele_op_div{
     border:1px solid #00008B;
     width: 80%;
 }
-@media only screen and (min-width: 955px) {
+@media (min-width:1200px)  {
     div.name  {
-    /* position:absolute; */
-    top:0px;
-    left:0px;
+        display:block !important;/* position:absolute; */
+        top:0px;
+        left:0px;
     }   
     div#modele_op_div{
     display: none;
@@ -2895,7 +2920,7 @@ span.tagcell {
        font-size: 1.4rem;
 }
 /***
- * Main Menu
+ * Main Menu navigation
  */
 .nav-fill .nav-item 
 {
@@ -2913,7 +2938,7 @@ span.tagcell {
     color:white;
 }
 .nav-pills .nav-link.active {
-    background-color: #b1c0d7 !important;
+    background-color: #70829d !important;
      border-radius: 0px;
 } 
 .nav-pills .nav-link {
@@ -2925,7 +2950,7 @@ li.li-active {
     
 }
 .nav-level2 {
-    background-color: #4a4a7d;;
+    background-color: #0b2d99
 }
 .nav-level2>li {
     border-right: 1px #9fbcd6 ridge;
@@ -2956,3 +2981,25 @@ li.li-active {
 .nav-level2 .active {
     border-radius:0px !important;
 }
+/**
+ * Module 
+ */
+.nav-item-module {
+}
+
+#module .nav-pills a.nav-link {
+    background-color:white !important;
+    color:navy !important;
+    border:1px solid blue;
+    margin:1px;
+}
+#module .nav-pills a.nav-link:hover {
+    background-color: navy !important;
+    color:white !important;
+    border-radius: 0px;
+}
+#module .nav-item-active , #module .nav-item-active > a.nav-link{
+    background-color: #5d90cd !important;
+    color:white !important;
+    border: 0px solid black;
+}
\ No newline at end of file
diff --git a/html/js/bootstrap.min.js.map b/html/js/bootstrap.min.js.map
new file mode 100644
index 0000000..16db081
--- /dev/null
+++ b/html/js/bootstrap.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../js/src/util.js","../../js/src/alert.js","../../js/src/button.js","../../js/src/carousel.js","../../js/src/collapse.js","../../js/src/dropdown.js","../../js/src/modal.js","../../js/src/tools/sanitizer.js","../../js/src/tooltip.js","../../js/src/popover.js","../../js/src/scrollspy.js","../../js/src/tab.js","../../js/src/toast.js"],"names":["transitionEndEmulator","duration","_this","this","called","$","one","Util","TRANSITION_END","setTimeout","triggerTransit
 [...]
\ No newline at end of file
diff --git a/html/js/jquery-3.6.0.min.js b/html/js/jquery-3.6.0.min.js
new file mode 100644
index 0000000..c4c6022
--- /dev/null
+++ b/html/js/jquery-3.6.0.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | 
jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof 
module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw
 new Error("jQuery requires a window with a document");return 
t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use 
strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return 
t.flat.call(e)}:function(e){return 
t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=
 [...]
diff --git a/html/js/scripts.js b/html/js/scripts.js
index 4eac4f4..3961372 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -3723,8 +3723,8 @@ function updatePreference()
             method: "post",
             parameters: param,
             onSuccess: function (req) {
-                var style = req.responseText.evalJSON();
-                $('pagestyle').setAttribute('href', style.style);
+              var style = req.responseText.evalJSON();
+               // $('pagestyle').setAttribute('href', style.style);
                 removeDiv('preference_div');
             }
         });
diff --git a/include/lib/function_javascript.php 
b/include/lib/function_javascript.php
index f55dd9c..cc23be3 100644
--- a/include/lib/function_javascript.php
+++ b/include/lib/function_javascript.php
@@ -2779,6 +2779,7 @@ function load_all_script()
     echo js_include('acc_currency.js');
     echo js_include('taggroup.js');
     echo js_include('noalyss_checkbox.js');
+ 
 
 }
 /**
diff --git a/include/template/menu.php b/include/template/menu.php
index ecdb5fd..588bc09 100644
--- a/include/template/menu.php
+++ b/include/template/menu.php
@@ -12,7 +12,7 @@ EOF;
 ?><div class="">
     <?php 
   if ($level == 0) {
-      echo '<ul  class="nav nav-pills nav-fill flex-column flex-md-row" >';
+      echo '<ul  class="nav nav-pills nav-fill  flex-row" >';
   }elseif ($level == 1) {
       echo '<ul class="nav nav-pills nav-level2 ">';
       
@@ -78,7 +78,7 @@ EOF;
 
 ?>     
 <li class="<?=$class_list_element?>">
-    <a class="<?=$class_link?> <" href="<?php echo $url;?>" <?php echo $js?> 
title="<?php echo h(gettext($amenu[$i]['me_description']))?>">
+    <a class="<?=$class_link?>" href="<?php echo $url;?>" <?php echo $js?> 
title="<?php echo h(gettext($amenu[$i]['me_description']))?>">
     <?php echo gettext($amenu[$i]['me_menu'])?>
     </a>
 </li>
diff --git a/include/template/module.php b/include/template/module.php
index 09e635b..d25416d 100644
--- a/include/template/module.php
+++ b/include/template/module.php
@@ -1,7 +1,8 @@
 <?php
 //This file is part of NOALYSS and is under GPL 
 //see licence.txt
-?><div id="top">
+?>
+<div id="top">
       <div id="dossier">
        <?php echo h(dossier::name())?>
        </div>
@@ -54,21 +55,22 @@ endif;?>
     </div>
 
     <div id="module">
-       <table>
-           <tr>
+       <div class="d-none d-md-block">
+         <ul class="nav nav-pills nav-fill  flex-row" >
                <?php
                foreach ($amodule as $row):
                        $js="";
                    $style="";
                    if ( $row['me_code']=='new_line')
                    {
-                       echo "</tr><tr>";
+                        echo '</ul>';
+                       echo '<ul class="nav nav-pills nav-fill  flex-row" >';
                        continue;
                    }
-                    $style="tool";
+                    $style="nav-item-module";
                    if ($row['me_code']==$selected_module)
                    {
-                       $style='toolselected';
+                       $style='nav-item-active';
                    }
                    if ( $row['me_url']!='')
                    {
@@ -85,15 +87,61 @@ endif;?>
                                
$url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code'];
                    }
                    ?>
-               <td class="<?php echo $style?>">
-                    <a class="mtitle" href="<?php echo $url?>" title="<?php 
echo _($row['me_description'])?>" <?php echo $js?> ><?php echo 
gettext($row['me_menu'])?></a></td>
+               <li class="<?php echo $style?>">
+                    <a class="nav-link" href="<?php echo $url?>" title="<?php 
echo _($row['me_description'])?>" <?php echo $js?> ><?php echo 
gettext($row['me_menu'])?></a>
+                </li>
                <?php 
                    endforeach;
                ?>
-           </tr>
-       </table>
+          </ul>
 
     </div>
+        <div class="d-md-none navbar-light"  >
+            <button id="showmodule" class="navbar-toggler" 
onclick="toggleHideShow('navbarToggleExternalContent','showmodule')">
+                <span class="navbar-toggler-icon"></span>
+            </button>
+            <div  
style="display:none;position:absolute;top:2px;left:2px;z-index:10" 
id="navbarToggleExternalContent">
+                <ul class="nav nav-pills nav-fill  flex-column bg-dark" >
+                    <?php
+                    foreach ($amodule as $row):
+                            $js="";
+                        $style="";
+
+                        $style="nav-item-module";
+                        if ( $row['me_code']=='new_line')
+                        {
+                                               continue;
+                        }
+                        if ($row['me_code']==$selected_module)
+                        {
+                            $style='nav-item-active';
+                        }
+                        if ( $row['me_url']!='')
+                        {
+                            $url=$row['me_url'];
+                        }
+                        elseif ($row['me_javascript'] != '')
+                            {
+                                    $url="javascript:void(0)";
+                                    $js_dossier=str_replace('<DOSSIER>', 
Dossier::id(), $row['me_javascript']);
+                                    $js=sprintf(' onclick="%s"',$js_dossier);
+                            }
+                            else
+                        {
+                                    
$url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code'];
+                        }
+                        ?>
+                    <li class="<?php echo $style?>">
+                        <a class="nav-link" href="<?php echo $url?>" 
title="<?php echo _($row['me_description'])?>" <?php echo $js?> ><?php echo 
gettext($row['me_menu'])?></a>
+                    </li>
+                    <?php 
+                        endforeach;
+                    ?>
+              </ul>
+            </div>
+            
+        </div>
   
 </div>
-<div style="clear:both;"></div>
+</div>
+<div style="clear:both;"></div>
\ No newline at end of file



reply via email to

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