[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>▲</span>',
- 'car_desc' => '<span>▼</span>'
+ 'car_asc' => '<span style="font-size:70%">▲</span>',
+ 'car_desc' => '<span style="font-size:70%">▼</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">▲</span>';
- return $this->array[$i]['sql_asc'];
- }
- if ($p_get == $this->array[$i]['parm_desc'])
- {
- $this->array[$i]['car_desc'] = '<span
style="color:red">▼</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%">▲</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%">▼</span>';
+ return $this->array[$i]['sql_desc'];
+ }
+ }
}
}
- [Noalyss-commit] [noalyss] 02/32: Bug : incorrect name, (continued)
- [Noalyss-commit] [noalyss] 02/32: Bug : incorrect name, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 12/32: PHPUNIT improve test, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 28/32: Cosmetic, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 24/32: New : Follow Up , the description modifiable is using NicEdit, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 21/32: Merge branch 'dev-9035-tva-code', Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 31/32: Merge branch 'devel-venus2', Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 19/32: Improve ManageTable : add a ctl_pk_id as attribute in the row + doc, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 18/32: Improve install config.inc.php file, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 15/32: Cosmetic add alert box, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 03/32: Cosmetic, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 06/32: Ergonomy : add button Close Cosmetic : color,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 08/32: Follow Up small bug with the #document_id, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 09/32: remove comment, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 29/32: Bug : ledger doesn't exist in 7.4 because the return value, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 26/32: Fix bug : for new TVA id not taken into account but auto-computed, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 25/32: Forgotten files, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 16/32: 0Task #002219: Compatibilit PHP 8.2 : Deprecated: Creation of dynamic property ..., Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 17/32: add gitignore file, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 14/32: Administration : user show email, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 30/32: Function load : give the return type, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 05/32: Restore file, Dany De Bontridder, 2023/01/05