开发者

Jstree set_type

I'm binding a set_type method to my jstree instance, and then calling the set_type method when clicking a button. Here's my code:

$("#treeDiv").jstree({..}).bind("set_type.jstree", function(e, data) {
            $.post(
                "./classes/jstree/_demo/server.php", 
                {
                    "operation" : "set_type", 
                    "id" : data.rslt.obj.attr("id").replace("node_",""),
                    "type" : data.rslt.obj.attr("type")
                }, 
                function (r) {
                    if(!r.status) {
                        $.jstree.rollback(data.rlbk);
                    }
                }
            );
        });


$("#settype").click(开发者_StackOverflowfunction() {
    $("#treeDiv").jstree("set_type", "block", "#node_663");
});

Type of the icon changes, but the type value dosen't changes in db. What am I doing wrong?


Solved it. I found that class.tree.php has no method that updates type in the database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜