Jstree How to change “New node” Label when creating a new node? -
i'm using contextmenu plugin when create new node , have own function creating new node using ajax post back.
$("#tree").jstree({ //.... "plugins": ["themes", "json_data", "crrm", "contextmenu", "dnd", "ui", "cookies"] }) //... .bind("create.jstree", function (e, data) { //... $.ajax({ type: "post", //... }); });
i alter default label of "new node" "new folder" when click on "create". help appreciated.
here's how alter context menu options
$("#tree").jstree({ "plugins": ["themes", "html_data", "ui", "crrm", "contextmenu"], "contextmenu": { "items": function ($node) { homecoming { "create": { "label": "new folder", "action": function (obj) { this.create(obj); } } }; } } });
updated
you can find part in jquery.jstree.js file
if(!js.data) { js.data = this._get_string("new_node"); }
change part to
if(!js.data) { js.data = this._get_string("new folder"); }
jstree
No comments:
Post a Comment