| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- $('#treeAjaxHTML').jstree({
- 'core': {
- 'themes': {
- 'responsive': false
- },
- 'check_callback': true,
- 'data': {
- 'url': './script/php/treeJs_getPath.php',
- }
- },
- 'types': {
- 'default': {
- 'icon': 'fa fa-folder'
- },
- 'file': {
- 'icon': 'fa fa-file'
- }
- },
- 'plugins': ['types']
- }).on(
- 'select_node.jstree',
- function (event, data) {
- if (data.node.text.includes(".")) {
- window.location.href = data.node.a_attr.href;
- //console.log(data);
- }
- }).bind('loaded.jstree', function (e, data) {
- // invoked after jstree has loaded
- $('.jstree-anchor').each(function (index) {
- if ($(this).attr('href').includes(".dll") || $(this).attr('href').includes(".dyn")) {
- api = $(this).attr('href');
- }
- });
- if (api != null) {
- var fileNames = api.split("/");
- fileName = fileNames[fileNames.length - 1];
- $("#api").attr("href", api)
- $("#api").append(fileName);
- }
- });
|