Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

jquery.tree.js 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /**
  2. * Theme: Uplon Admin Template
  3. * Author: Coderthemes
  4. * Tree view
  5. */
  6. $( document ).ready(function() {
  7. // Basic
  8. $('#basicTree').jstree({
  9. 'core' : {
  10. 'themes' : {
  11. 'responsive': false
  12. }
  13. },
  14. 'types' : {
  15. 'default' : {
  16. 'icon' : 'icofont icofont-folder'
  17. },
  18. 'file' : {
  19. 'icon' : 'icofont icofont-file-alt'
  20. }
  21. },
  22. 'plugins' : ['types']
  23. });
  24. // Checkbox
  25. $('#checkTree').jstree({
  26. 'core' : {
  27. 'themes' : {
  28. 'responsive': false
  29. }
  30. },
  31. 'types' : {
  32. 'default' : {
  33. 'icon' : 'icofont icofont-folder'
  34. },
  35. 'file' : {
  36. 'icon' : 'icofont icofont-file-alt'
  37. }
  38. },
  39. 'plugins' : ['types', 'checkbox']
  40. });
  41. // Drag & Drop
  42. $('#dragTree').jstree({
  43. 'core' : {
  44. 'check_callback' : true,
  45. 'themes' : {
  46. 'responsive': false
  47. }
  48. },
  49. 'types' : {
  50. 'default' : {
  51. 'icon' : 'icofont icofont-folder'
  52. },
  53. 'file' : {
  54. 'icon' : 'icofont icofont-file-alt'
  55. }
  56. },
  57. 'plugins' : ['types', 'dnd']
  58. });
  59. // Ajax
  60. $('#ajaxTree').jstree({
  61. 'core' : {
  62. 'check_callback' : true,
  63. 'themes' : {
  64. 'responsive': false
  65. },
  66. 'data' : {
  67. 'url' : function (node) {
  68. return node.id === '#' ? 'assets/plugins/jstree/ajax_roots.json' : 'assets/plugins/jstree/ajax_children.json';
  69. },
  70. 'data' : function (node) {
  71. return { 'id' : node.id };
  72. }
  73. }
  74. },
  75. "types" : {
  76. 'default' : {
  77. 'icon' : 'icofont icofont-folder'
  78. },
  79. 'file' : {
  80. 'icon' : 'icofont icofont-file-alt'
  81. }
  82. },
  83. "plugins" : [ "contextmenu", "dnd", "search", "state", "types", "wholerow" ]
  84. });
  85. });