1.) I have upgraded v1.0 to v3.1.0 and my dnd code constantly closes my root node (even after i call open_node on my root element)
2.)the code sample from the jstree demo page does not seem to be an option as it did not work for/(because of) the way my framework was implemented (for both v1.0 and v3.*)
I am not sure how to update my dnd code from v1.0 to >=3.1.0 other than looking into the jstree source code (what has proven to be quite the challenge for a js/jquery beginner):
//my dnd v1.0:
$('#demo').jstree({
core : {
check_callback : true
},
"plugins" : ["themes","html_data","ui","crrm","wholerow","checkbox","dnd","contextmenu","types"],
"crrm" : {
input_width_limit : 200,
move : {
check_move : function (m)
{
var p = this._get_parent(m.o);
if(!p) return false;
p = p == -1 ? this.get_container() : p;
console.log(m.np.attr("type"));
if (m.np.attr("type") == "menu") return true;
return false;
}
}
},
"dnd" : {
drop_target : false,
drag_target : false
}
})
.bind(
"move_node.jstree" : function (event, data) {
var nodeid =data.rslt.o.attr("id");
var par = data.inst._get_parent(data.rslt.o);
var parid = par.attr("id");
var cldr = par.children();
var prev = data.rslt.o.prev().attr("id");
}
});
Kind Regards