Synchro with stable

DO NOT INTEGRATE to pre-stable nor stable
This commit is contained in:
sparkyx 2024-09-23 11:32:47 +02:00
parent 333b36372a
commit 39e01d2a75
7 changed files with 15 additions and 22 deletions

View file

@ -402,8 +402,7 @@ class ICard extends HtmlInput
$this->callback=$p_name;
}
/**
* \brief set the javascript callback function
/**\brief set the javascript callback function
* by default it is update_value called AFTER an item has been selected
* \param $p_name callback function name
*/

View file

@ -824,22 +824,11 @@ function check()
$ret=$this->table->seek($p_order, $p_array);
return $ret;
}
/**
* @brief echo the HTML to have a button add
* @return void
*/
protected function create_button_add() {
echo HtmlInput::button_action(" "._("Ajout"),
sprintf("%s.input('-1','%s')",
$this->object_name,
$this->object_name), "xx", "smallbutton", BUTTONADD);
}
/**
* @brief display the data of the table
* @param $p_order is the cond or order of the rows,
* if empty the primary key will be used
* @param $p_array array of the bind variables of the SQL ($p_order)
* @param $p_array array of the bind variables
* @note the function create_js_script MUST be called before this function
*/
function display_table($p_order="", $p_array=NULL)
@ -848,7 +837,10 @@ function check()
$nb=Database::num_row($ret);
if ($this->can_append_row()==TRUE && $this->button_add_top == true)
{
echo $this->create_button_add();
echo HtmlInput::button_action(" "._("Ajout"),
sprintf("%s.input('-1','%s')",
$this->object_name,
$this->object_name), "xx", "smallbutton", BUTTONADD);
}
$nb_order=count($this->a_order);
$virg=""; $result="";
@ -888,7 +880,10 @@ function check()
echo "</table>";
if ($this->can_append_row()==TRUE)
{
echo $this->create_button_add();
echo HtmlInput::button_action(" "._("Ajout"),
sprintf("%s.input('-1','%s')",
$this->object_name,
$this->object_name), "xx", "smallbutton", BUTTONADD);
}
printf('<script> alternate_row_color("tb%s");</script>',
$this->object_name);