donation/public/assets/js/pages/treeview.init.js

91 lines
2.1 KiB
JavaScript

/*
Template Name: Minton - Responsive Bootstrap 4 Admin Dashboard
Author: CoderThemes
Website: https://coderthemes.com/
Contact: support@coderthemes.com
File: Treeview init js
*/
$( document ).ready(function() {
// Basic
$('#basicTree').jstree({
'core' : {
'themes' : {
'responsive': false
}
},
'types' : {
'default' : {
'icon' : 'mdi mdi-folder-star text-warning'
},
'file' : {
'icon' : 'mdi mdi-file text-primary'
}
},
'plugins' : ['types']
});
// Checkbox
$('#checkTree').jstree({
'core' : {
'themes' : {
'responsive': false
}
},
'types' : {
'default' : {
'icon' : 'fa fa-folder text-warning'
},
'file' : {
'icon' : 'fa fa-file text-primary'
}
},
'plugins' : ['types', 'checkbox']
});
// Drag & Drop
$('#dragTree').jstree({
'core' : {
'check_callback' : true,
'themes' : {
'responsive': false
}
},
'types' : {
'default' : {
'icon' : 'fa fa-folder text-warning'
},
'file' : {
'icon' : 'fa fa-file text-primary'
}
},
'plugins' : ['types', 'dnd']
});
// Ajax
$('#ajaxTree').jstree({
'core' : {
'check_callback' : true,
'themes' : {
'responsive': false
},
'data' : {
'url' : function (node) {
return node.id === '#' ? '../assets/data/ajax_roots.json' : '../assets/data/ajax_children.json';
},
'data' : function (node) {
return { 'id' : node.id };
}
}
},
"types" : {
'default' : {
'icon' : 'fa fa-folder text-warning'
},
'file' : {
'icon' : 'fa fa-file text-primary'
}
},
"plugins" : [ "contextmenu", "dnd", "search", "state", "types", "wholerow" ]
});
});