/* * This file is part of NOALYSS. * * NOALYSS is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * NOALYSS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder danydb@aevalys.eu /** *@file *@brief Javascript object to manage ajax calls to * save , input or delete data row. *@details The callback must respond with a XML file , the tag status for the result and data the HTML code to display *@param p_table_name the data table on which we're working in javascript , to create an object to manipulate the table version. Example of code @code // Version will manage the table "version" var version=new ManageTable("version"); // the file ajax_my.php will be called version.set_callback("ajax_my.php"); // Add supplemental parameter to this file version.param_add ({"plugin_code":"OIC"}; // Set the id of dialog box , table and tr prefix version.set_control("dialbox1"); @endcode The answer from ajax must be like this template @verbatim id of the control to update for diag.box, row OK , FAIL ... Html to display @endverbatim List of function - set_control(p_ctl_name) - set_callback (p_new_callback) - param_add (json object) - parseXML (private function) - save - delete - input */ /** * @class ManageTable * @param string p_table_name name of the table and schema */ var ManageTable = function (p_table_name) { this.callback = "ajax.php"; //!< File to call this.control = "dtr"; //