From 1a0e97acefcc5087a100442b5c4a258bf4e350dd Mon Sep 17 00:00:00 2001 From: Rachel Date: Fri, 13 Jan 2017 16:56:51 +0100 Subject: [PATCH] Manage_Table , the js and php code are been splitted in 2 files , the ajax calls are nearly done , doxygen for these files is correct Signed-off-by: Dany De Bontridder --- html/js/managetable.js | 211 +++++++++++++++++++++++++ include/lib/class_manage_table_sql.php | 158 ++++++------------ 2 files changed, 261 insertions(+), 108 deletions(-) create mode 100644 html/js/managetable.js diff --git a/html/js/managetable.js b/html/js/managetable.js new file mode 100644 index 000000000..7b766db4d --- /dev/null +++ b/html/js/managetable.js @@ -0,0 +1,211 @@ + diff --git a/include/lib/class_manage_table_sql.php b/include/lib/class_manage_table_sql.php index e7e227d8d..99af3496a 100644 --- a/include/lib/class_manage_table_sql.php +++ b/include/lib/class_manage_table_sql.php @@ -1,110 +1,46 @@ - - table->seek(); $nb=Database::num_count($ret); + printf ('',$this->object_name); for ($i=0;$i< $nb ; $i++ ) { if ( $i == 0 ) { @@ -370,15 +309,18 @@ class Manage_Table_SQL } echo ""; echo "
"; if ( $this->can_update_row() ) { - $js=printf ("ManageTable.input('%s');", - $p_row[$this->table->primary_key] + $js=printf ("ManageTable.input('%s','%s');", + $p_row[$this->table->primary_key], + $this->object_name ); } echo ""; if ( $this->can_delete_row() ) { - $js=printf ("ManageTable.delete('%s');", - $p_row[$this->table->primary_key] + $js=printf ("ManageTable.delete('%s','%s');", + $p_row[$this->table->primary_key], + $this->object_name + ); }