Ajout type (jstree)
This commit is contained in:
@@ -8,33 +8,9 @@ function Quit()
|
|||||||
document.getElementById('formAction').submit();
|
document.getElementById('formAction').submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main Page
|
/**
|
||||||
// $(function() {
|
* Page load
|
||||||
|
*/
|
||||||
// $(function() {
|
|
||||||
// $.contextMenu({
|
|
||||||
// selector: '#RootDN',
|
|
||||||
// callback: function(key, options) {
|
|
||||||
// var m = "clicked: " + key;
|
|
||||||
// window.console && console.log(m) || alert(m);
|
|
||||||
// },
|
|
||||||
// items: {
|
|
||||||
// "edit": {name: "Edit", icon: "edit"},
|
|
||||||
// "cut": {name: "Cut", icon: "cut"},
|
|
||||||
// copy: {name: "Copy", icon: "copy"},
|
|
||||||
// "paste": {name: "Paste", icon: "paste"},
|
|
||||||
// "delete": {name: "Delete", icon: "delete"},
|
|
||||||
// "sep1": "---------",
|
|
||||||
// "quit": {name: "Quit", icon: function(){
|
|
||||||
// return 'context-menu-icon context-menu-icon-quit';
|
|
||||||
// }}
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// $('.context-menu-one').on('click', function(e){
|
|
||||||
// console.log('clicked', this);
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#jsTree')
|
$('#jsTree')
|
||||||
.jstree({
|
.jstree({
|
||||||
@@ -72,14 +48,25 @@ function Quit()
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"types" : {
|
"types" : {
|
||||||
"default" : {
|
"#" : {
|
||||||
"icon" : "fas fa-globe-europe"
|
"max_children" : 1,
|
||||||
|
"max_depth" : 4,
|
||||||
|
"valid_children" : ["root"]
|
||||||
},
|
},
|
||||||
"demo" : {
|
"root" : {
|
||||||
"icon" : "glyphicon glyphicon-ok"
|
"icon" : "/static/3.3.11/assets/images/tree_icon.png",
|
||||||
|
"valid_children" : ["default"]
|
||||||
|
},
|
||||||
|
"default" : {
|
||||||
|
"valid_children" : ["default","file"]
|
||||||
|
},
|
||||||
|
"file" : {
|
||||||
|
"icon" : "glyphicon glyphicon-file",
|
||||||
|
"valid_children" : []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"plugins" : ["contextmenu","dnd","search"]
|
"plugins" : ["contextmenu","dnd","search"]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// https://www.jstree.com/demo/
|
||||||
|
|||||||
Reference in New Issue
Block a user