noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 06/32: Ergonomy : add button Close Cosmetic :


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 06/32: Ergonomy : add button Close Cosmetic : color
Date: Thu, 5 Jan 2023 14:18:29 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit c727310432f17852644208c1ea2e33cfb4870f78
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Dec 11 11:38:43 2022 +0100

    Ergonomy : add button Close
    Cosmetic : color
---
 include/ajax/ajax_admin.php      | 44 ++++++++++++++++++++++++++++++++------
 include/lib/sort_table.class.php | 46 +++++++++++++++++++++-------------------
 2 files changed, 61 insertions(+), 29 deletions(-)

diff --git a/include/ajax/ajax_admin.php b/include/ajax/ajax_admin.php
index 49df5faef..5715b3c29 100644
--- a/include/ajax/ajax_admin.php
+++ b/include/ajax/ajax_admin.php
@@ -27,6 +27,7 @@ if (!defined('ALLOWED'))
  * admin-noalyss.php
  * @see admin-noalyss.php ajax_misc.php admin.js
  */
+global $g_user;
 if ($g_user->Admin()==0)
 {
     die();
@@ -239,8 +240,16 @@ if (in_array($op, array('modele_drop', 'modele_modify', 
'folder_modify', 'folder
         $max_email_input->value=$dos->get_parameter('max_email');
         $max_email_input->prec=0;
         echo $max_email_input->input();
-        echo '<br>';
+        echo '<ul class="aligned-block">';
+        echo "<li>";
         echo HtmlInput::submit('upd', _('Modifie'));
+        echo "</li>";
+        echo "<li>";
+        echo HtmlInput::button_close("folder_admin_div");
+        echo "</li>";
+        echo '</ul>';
+
+        
         echo '</form>';
         $content=ob_get_clean();
         $status='OK';
@@ -263,10 +272,16 @@ if (in_array($op, array('modele_drop', 'modele_modify', 
'folder_modify', 'folder
         echo _("Tapez le code de confirmation");
         echo confirm_with_string("fld_drop",5);
         echo '</p>';
-        echo '<p style="text-align:center">';
+        echo '<ul class="aligned-block">';
+        echo "<li>";
         echo HtmlInput::submit('remove', _('Effacer'));
-        echo '</p>';
+        echo "</li>";
+        echo "<li>";
+        echo HtmlInput::button_close("folder_admin_div");
+        echo "</li>";
+        echo '</ul>';
         echo '</form>';
+
         $content=ob_get_clean();
         $status='OK';
     }
@@ -288,9 +303,15 @@ if (in_array($op, array('modele_drop', 'modele_modify', 
'folder_modify', 'folder
         echo _('Cochez la case si vous êtes sûr de vouloir effacer ce modèle');
         echo $confirm->input();
         echo '</p>';
-        echo '<p style="text-align:center">';
+        echo '<ul class="aligned-block">';
+        echo "<li>";
         echo HtmlInput::submit('remove', _('Effacer'));
-        echo '</p>';
+        echo "</li>";
+        echo "<li>";
+        echo HtmlInput::button_close("folder_admin_div");
+        echo "</li>";
+        echo '</ul>';
+
         echo '</form>';
         $content=ob_get_clean();
         $status='OK';
@@ -317,8 +338,17 @@ if (in_array($op, array('modele_drop', 'modele_modify', 
'folder_modify', 'folder
         echo $wDesc->input('desc', $desc);
         echo HtmlInput::hidden('m', $dossier);
         echo HtmlInput::hidden('action', 'modele_mgt');
-        echo '<br>';
-        echo HtmlInput::submit('upd', _('Modifie'));
+        
+        echo '<ul class="aligned-block">';
+        echo "<li>";
+        echo  HtmlInput::submit('upd', _('Modifie'));
+        echo "</li>";
+        echo "<li>";
+        echo HtmlInput::button_close("folder_admin_div");
+        echo "</li>";
+        echo '</ul>';
+
+
         echo '</form>';
         $content=ob_get_clean();
         $status='OK';
diff --git a/include/lib/sort_table.class.php b/include/lib/sort_table.class.php
index 15a7ebfbc..f14e6a430 100644
--- a/include/lib/sort_table.class.php
+++ b/include/lib/sort_table.class.php
@@ -25,6 +25,8 @@
  */
 class Sort_Table
 {
+       private $nb;
+       private $array;
 
     function __construct()
     {
@@ -35,12 +37,12 @@ class Sort_Table
     /**
      *@brief add row of a header in the internal array ($this->array)
      * , it uses the $_GET['ord'] parameter,
-     * @param type $p_header label of the header
-     * @param type $p_url base url
-     * @param type $p_sql_asc sql if ascending
-     * @param type $p_sql_desc sql if descending
-     * @param type $p_get_asc the value in $_GET if ascending is choosen
-     * @param type $p_get_desc the value in $_GET if descending is choosen
+     * @param string $p_header label of the header
+     * @param string $p_url base url
+     * @param string $p_sql_asc sql if ascending
+     * @param string $p_sql_desc sql if descending
+     * @param string $p_get_asc the value in $_GET if ascending is choosen
+     * @param string $p_get_desc the value in $_GET if descending is choosen
      */
     function add($p_header, $p_url, $p_sql_asc, $p_sql_desc, $p_get_asc, 
$p_get_desc)
     {
@@ -51,8 +53,8 @@ class Sort_Table
            'sql_desc' => $p_sql_desc,
            'parm_asc' => $p_get_asc,
            'parm_desc' => $p_get_desc,
-           'car_asc' => '<span>&#9650</span>',
-           'car_desc' => '<span>&#9660</span>'
+           'car_asc' => '<span style="font-size:70%">&#9650</span>',
+           'car_desc' => '<span style="font-size:70%">&#9660</span>'
        );
        $ind = $this->nb;
        $this->array[$ind] = $array;
@@ -61,7 +63,7 @@ class Sort_Table
 /**
  * Returns the header (the value into th tags) with the symbol ascending and
  * descending
- * @param  $p_ind the element (from 0 to nb)
+ * @param  int $p_ind the element (from 0 to nb)
  * @return string
  */
     function get_header($p_ind)
@@ -84,19 +86,19 @@ class Sort_Table
 
     function get_sql_order($p_get)
     {
-       for ($i = 0; $i < $this->nb; $i++)
-       {
-           if ($p_get == $this->array[$i]['parm_asc'])
-           {
-               $this->array[$i]['car_asc'] = '<span 
style="color:red">&#9650</span>';
-               return $this->array[$i]['sql_asc'];
-           }
-           if ($p_get == $this->array[$i]['parm_desc'])
-           {
-               $this->array[$i]['car_desc'] = '<span 
style="color:red">&#9660</span>';
-               return $this->array[$i]['sql_desc'];
-           }
-       }
+               for ($i = 0; $i < $this->nb; $i++)
+               {
+                       if ($p_get == $this->array[$i]['parm_asc'])
+                       {
+                       $this->array[$i]['car_asc'] = '<span 
style="color:red;font-size:70%">&#9650</span>';
+                       return $this->array[$i]['sql_asc'];
+                       }
+                       if ($p_get == $this->array[$i]['parm_desc'])
+                       {
+                       $this->array[$i]['car_desc'] = '<span 
style="color:red;font-size:70%">&#9660</span>';
+                       return $this->array[$i]['sql_desc'];
+                       }
+               }
     }
 
 }



reply via email to

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