jQuery EasyUI Extension - Editable Tree (Editable Tree)
jQuery EasyUI Extension
Usage
Create a Tree
$('#tt').etree({
url: 'tree_data.json',
createUrl: ...,
updateUrl: ...,
destroyUrl: ...,
dndUrl: ...
});
Set the url, createUrl, updateUrl, destroyUrl, and dndUrl properties to automatically synchronize data between the client and server.
- url: returns the tree data.
- createUrl: when a new node is created, the tree passes a parameter named 'parentId' to the server, indicating the id of the parent node.
The server should return the added node data. The following code demonstrates an example of adding node data:{"id":1,"text":"new node"}
Method
This method extends from the tree; below are the methods added for the editable tree (etree).
| Name | Parameters | Description |
|---|---|---|
| options | none | Return the options object. |
| create | none | Create a new node. |
| edit | none | Edit the currently selected node. |
| destroy | none | Destroy the currently selected node. |
Download the jQuery EasyUI example
jQuery EasyUI Extension