I have stuck to manage the contextmenu after the right click . Actually I need to display some item of contextmenu for folder and some item of contextmenu for folder.
On click of folder context menu will look like :
- create
- remove
- rename
- new
On click of file context menu will look like :
- create
- remove
- rename
Is there any way to manage this menu after click . I have look into documentation and other blog , but not getting useful content .
Can you please guide me some thing so that I can implement like that .
Thanks in advance
Hello ,
Thanks for take a look, but I got the way to make it Please take a look on below :
$('#detail_dir_container').jstree({
"json_data" : {
"ajax" : {
"url" : ''
}
},
"contextmenu" : {
"items": function(node){
if(node.attr('type') == 'file' )
{
return {
create : true,
rename : true,
remove : true
}
}
else
{
return {
create : true,
rename : true,
remove : true,
new : true,
}
}
}
});
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With