Extension:InlineTable

What can this extension do?
InlineTable is a DHTML widget of table that can be edited via Javascript(Ajax). The table has the following six main features or purposes:


 * Define database table
 * we can use this extension to define a database table, and then store the data in to database. At the moment, it only supports MySQL.


 * Define template
 * we can define a template in a page and then use this template in anywhere.


 * Editable
 * the cell's content in table can be edited. Each column can have the special type of data (string, int, double, date or boolean) and special widget (label, text, textarea, checkbox, select(combox)). Depending on its data type and widget, the editor for cell can do the simple vary, for example string, integer number and date column will show textbox for editing, and boolen column will show checkbox.


 * Navigable
 * because of the first feature, it does not make sense if the table is not navigable. This means that the active cell can be changed into another cell by pressing the arrow key on the keyboard or by using the mouse to click on another cell. The active cell is the cell in which we can edit its content. When the cell is edited, we cannot move the active cell into another one. The editing state must be ended first, if one wants to move the active cell.


 * Submittable
 * a very special feature. 'Submittable' means that the content of the table can be submitted to the web server via the usual web HTTP protocol. One can easily understand that the table contains elements of FORM. Why should it be submittable? In most cases, we want the user to submit what he/she inserted in the table. For example, the user makes up a list of purchased items and assigns different properties to each of those items, such as the code, the quantity, etc. Such a list is usually visualized by a table, one column containing the code of each purchased item, another one containing the quantity, etc. Each row, of course, represents different items. This function supports PHP, JSP and so on. The 'submit' action relies on AJAX to post the request, so that one does not need to refresh the page.


 * User permission control
 * if user has not permission to edit the current page, then the InlineTable also be disabled directly.

Usage
For more information, please visit Document & Examples page.

Create Database Table
Use the following code to define a database table(This is a full features example for InlineTable):

Create Template
Use the following code to define a template base on a database table:

Use Template
Use the following code to use template and edit table data:

Table and Template Maintenance
Use code  to manage the objects user created.

Installation
To install this extension, unzip the extension to $IP/extensions folder(It should be like this: $IP/extensions/InlineTable). And then add the following to LocalSettings.php: