Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery EasyUI Extension - Editable Tree

jQuery EasyUI Extension - Editable Tree (Editable Tree)


jQuery EasyUI Extensions 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.

    - updateUrl: when a node is updated, the tree passes the 'id' and 'text' parameters to the server. The server performs the update and returns the updated node data. - destroyUrl: when a node is destroyed, the tree passes the 'id' parameter to the server. The server returns {"success":true} data. - dndUrl: when a node is dragged and dropped, the tree passes the following parameters to the server: id - the id of the dragged node. targetId - the node being dropped onto. point - indicates the drop operation; possible values: 'append', 'top', or 'bottom'. The server performs some actions and returns {"success":true} data.

    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-etree.zip


    jQuery EasyUI Extensions jQuery EasyUI Extension