noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 176/323: Manage_Table_SQL : Add tips for some


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 176/323: Manage_Table_SQL : Add tips for some col
Date: Wed, 14 Mar 2018 17:38:45 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit d6c32d4db6c291b3bea5128ae2da92b43d01a2e8
Author: Dany De Bontridder <address@hidden>
Date:   Sat Feb 10 13:18:41 2018 +0100

    Manage_Table_SQL : Add tips for some col
---
 include/lib/manage_table_sql.class.php | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/include/lib/manage_table_sql.class.php 
b/include/lib/manage_table_sql.class.php
index 80e04a9..24daa4b 100644
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@ -77,6 +77,7 @@ class Manage_Table_SQL
     protected $json_parameter; //!< Default parameter to add (gDossier...)
     protected $aerror; //!< Array containing the error of the input data
     protected $col_sort; //!< when inserting, it is the column to sort,-1 to 
disable it and append only
+    protected $a_info; //!< Array with the infotip
 
     const UPDATABLE=1;
     const VISIBLE=2;
@@ -133,6 +134,18 @@ class Manage_Table_SQL
         return $this->col_sort;
     }
     /**
+     * Set the info for a column, use Icon_Action::infobulle
+     * the message are in message_javascript.php
+     * @param string $p_key Column name
+     * @param integer $p_comment comment idx
+     * 
+     * @see message_javascript.php
+     * @see Icon_Action::infobulle()
+     */
+    function set_col_tips($p_key,$p_comment) {
+        $this->a_info[$p_key]=$p_comment;
+    }
+    /**
      * When adding an element ,we place it thanks the DOM Attribute sort_value
      * set it to -1 if you want one to append
      * @param numeric $pn_num
@@ -804,7 +817,12 @@ function check()
             if ($this->get_property_visible($key)===TRUE)
             {
                 // Label
-                echo "<td> {$label} {$error}</td>";
+                $info="";
+                if ( isset($this->a_info[$key])) {
+                    $info=Icon_Action::infobulle($this->a_info[$key]);
+                }
+                // Label
+                echo "<td> {$label} {$info} {$error}</td>";
 
                 if ($this->get_property_updatable($key)==TRUE)
                 {



reply via email to

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