orgchart 3.5.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,17 @@
21
21
  this.$chartContainer = $(elem);
22
22
  this.opts = opts;
23
23
  this.defaultOptions = {
24
+ 'icons': {
25
+ 'theme': 'oci',
26
+ 'parentNode': 'oci-menu',
27
+ 'expandToUp': 'oci-chevron-up',
28
+ 'collapseToDown': 'oci-chevron-down',
29
+ 'collapseToLeft': 'oci-chevron-left',
30
+ 'expandToRight': 'oci-chevron-right',
31
+ 'collapsed': 'oci-plus-square',
32
+ 'expanded': 'oci-minus-square',
33
+ 'spinner': 'oci-spinner'
34
+ },
24
35
  'nodeTitle': 'name',
25
36
  'nodeId': 'id',
26
37
  'toggleSiblingsResp': false,
@@ -30,7 +41,6 @@
30
41
  'exportButtonName': 'Export',
31
42
  'exportFilename': 'OrgChart',
32
43
  'exportFileextension': 'png',
33
- 'parentNodeSymbol': 'oci-leader',
34
44
  'draggable': false,
35
45
  'direction': 't2b',
36
46
  'pan': false,
@@ -71,7 +81,7 @@
71
81
  this.buildHierarchy($root, this.options.ajaxURL ? data : this.attachRel(data, '00'));
72
82
  }
73
83
  } else {
74
- $chart.append('<i class="oci oci-spinner spinner"></i>');
84
+ $chart.append(`<i class="${this.options.icons.theme} ${this.options.icons.spinner} spinner"></i>`);
75
85
  $.ajax({
76
86
  'url': data,
77
87
  'dataType': 'json'
@@ -568,7 +578,7 @@
568
578
  $animatedNodes.closest('.hierarchy').addClass('isCollapsedDescendant');
569
579
  }
570
580
  if ($lowerLevel.is('.vertical') || $lowerLevel.find('.vertical').length) {
571
- $animatedNodes.find('.oci-minus-square').removeClass('oci-minus-square').addClass('oci-plus-square');
581
+ $animatedNodes.find(this.options.icons.expanded).removeClass(this.options.icons.expanded).addClass(this.options.icons.collapsed);
572
582
  }
573
583
  this.repaint($animatedNodes.get(0));
574
584
  $animatedNodes.addClass('sliding slide-up').eq(0).one('transitionend', { 'animatedNodes': $animatedNodes, 'lowerLevel': $lowerLevel, 'node': $node }, this.hideChildrenEnd.bind(this));
@@ -647,7 +657,7 @@
647
657
  event.data.visibleNodes.removeClass('sliding');
648
658
  if (this.isInAction($node)) {
649
659
  this.switchHorizontalArrow($node);
650
- $node.children('.topEdge').removeClass('oci-chevron-up').addClass('oci-chevron-down');
660
+ $node.children('.topEdge').removeClass(this.options.icons.expandToUp).addClass(this.options.icons.collapseToDown);
651
661
  }
652
662
  },
653
663
  //
@@ -702,7 +712,7 @@
702
712
  }
703
713
 
704
714
  $edge.addClass('hidden');
705
- $edge.parent().append('<i class="oci oci-spinner spinner"></i>')
715
+ $edge.parent().append(`<i class="${this.options.icons.theme} ${this.options.icons.spinner} spinner"></i>`)
706
716
  .children().not('.spinner').css('opacity', 0.2);
707
717
  $chart.data('inAjax', true);
708
718
  $('.oc-export-btn').prop('disabled', true);
@@ -719,11 +729,16 @@
719
729
  },
720
730
  // whether the cursor is hovering over the node
721
731
  isInAction: function ($node) {
722
- return $node.children('.edge').attr('class').indexOf('oci-') > -1 ? true : false;
732
+ return [
733
+ this.options.icons.expandToUp,
734
+ this.options.icons.collapseToDown,
735
+ this.options.icons.collapseToLeft,
736
+ this.options.icons.expandToRight
737
+ ].some((icon) => $node.children('.edge').attr('class').indexOf(icon) > -1);
723
738
  },
724
739
  //
725
740
  switchVerticalArrow: function ($arrow) {
726
- $arrow.toggleClass('oci-chevron-up').toggleClass('oci-chevron-down');
741
+ $arrow.toggleClass(`${this.options.icons.expandToUp} ${this.options.icons.collapseToDown}`);
727
742
  },
728
743
  //
729
744
  switchHorizontalArrow: function ($node) {
@@ -732,24 +747,24 @@
732
747
  var $prevSib = $node.parent().prev();
733
748
  if ($prevSib.length) {
734
749
  if ($prevSib.is('.hidden')) {
735
- $node.children('.leftEdge').addClass('oci-chevron-left').removeClass('oci-chevron-right');
750
+ $node.children('.leftEdge').addClass(opts.icons.collapseToLeft).removeClass(opts.icons.expandToRight);
736
751
  } else {
737
- $node.children('.leftEdge').addClass('oci-chevron-right').removeClass('oci-chevron-left');
752
+ $node.children('.leftEdge').addClass(opts.icons.expandToRight).removeClass(opts.icons.collapseToLeft);
738
753
  }
739
754
  }
740
755
  var $nextSib = $node.parent().next();
741
756
  if ($nextSib.length) {
742
757
  if ($nextSib.is('.hidden')) {
743
- $node.children('.rightEdge').addClass('oci-chevron-right').removeClass('oci-chevron-left');
758
+ $node.children('.rightEdge').addClass(opts.icons.expandToRight).removeClass(opts.icons.collapseToLeft);
744
759
  } else {
745
- $node.children('.rightEdge').addClass('oci-chevron-left').removeClass('oci-chevron-right');
760
+ $node.children('.rightEdge').addClass(opts.icons.collapseToLeft).removeClass(opts.icons.expandToRight);
746
761
  }
747
762
  }
748
763
  } else {
749
764
  var $sibs = $node.parent().siblings();
750
765
  var sibsVisible = $sibs.length ? !$sibs.is('.hidden') : false;
751
- $node.children('.leftEdge').toggleClass('oci-chevron-right', sibsVisible).toggleClass('oci-chevron-left', !sibsVisible);
752
- $node.children('.rightEdge').toggleClass('oci-chevron-left', sibsVisible).toggleClass('oci-chevron-right', !sibsVisible);
766
+ $node.children('.leftEdge').toggleClass(opts.icons.expandToRight, sibsVisible).toggleClass(opts.icons.collapseToLeft, !sibsVisible);
767
+ $node.children('.rightEdge').toggleClass(opts.icons.collapseToLeft, sibsVisible).toggleClass(opts.icons.expandToRight, !sibsVisible);
753
768
  }
754
769
  },
755
770
  //
@@ -767,10 +782,10 @@
767
782
  if (event.type === 'mouseenter') {
768
783
  if ($node.children('.toggleBtn').length) {
769
784
  flag = this.getNodeState($node, 'children').visible;
770
- $toggleBtn.toggleClass('oci-plus-square', !flag).toggleClass('oci-minus-square', flag);
785
+ $toggleBtn.toggleClass(this.options.icons.collapsed, !flag).toggleClass(this.options.icons.expanded, flag);
771
786
  }
772
787
  } else {
773
- $toggleBtn.removeClass('oci-plus-square oci-minus-square');
788
+ $toggleBtn.removeClass(`${this.options.icons.collapsed} ${this.options.icons.expanded}`);
774
789
  }
775
790
  } else {
776
791
  var $topEdge = $node.children('.topEdge');
@@ -780,17 +795,17 @@
780
795
  if (event.type === 'mouseenter') {
781
796
  if ($topEdge.length) {
782
797
  flag = this.getNodeState($node, 'parent').visible;
783
- $topEdge.toggleClass('oci-chevron-up', !flag).toggleClass('oci-chevron-down', flag);
798
+ $topEdge.toggleClass(this.options.icons.expandToUp, !flag).toggleClass(this.options.icons.collapseToDown, flag);
784
799
  }
785
800
  if ($bottomEdge.length) {
786
801
  flag = this.getNodeState($node, 'children').visible;
787
- $bottomEdge.toggleClass('oci-chevron-down', !flag).toggleClass('oci-chevron-up', flag);
802
+ $bottomEdge.toggleClass(this.options.icons.collapseToDown, !flag).toggleClass(this.options.icons.expandToUp, flag);
788
803
  }
789
804
  if ($leftEdge.length) {
790
805
  this.switchHorizontalArrow($node);
791
806
  }
792
807
  } else {
793
- $node.children('.edge').removeClass('oci-chevron-up oci-chevron-down oci-chevron-right oci-chevron-left');
808
+ $node.children('.edge').removeClass(`${this.options.icons.expandToUp} ${this.options.icons.collapseToDown} ${this.options.icons.collapseToLeft} ${this.options.icons.expandToRight}`);
794
809
  }
795
810
  }
796
811
  },
@@ -954,14 +969,14 @@
954
969
  var $descendants = $descWrapper.find('.node');
955
970
  var $children = $descWrapper.children().children('.node');
956
971
  if ($children.is('.sliding')) { return; }
957
- $toggleBtn.toggleClass('oci-plus-square oci-minus-square');
972
+ $toggleBtn.toggleClass(`${this.options.icons.collapsed} ${this.options.icons.expanded}`);
958
973
  if ($descendants.eq(0).is('.slide-up')) {
959
974
  $descWrapper.removeClass('hidden');
960
975
  this.repaint($children.get(0));
961
976
  $children.addClass('sliding').removeClass('slide-up').eq(0).one('transitionend', { 'vNodes': $children }, this.expandVNodesEnd);
962
977
  } else {
963
978
  $descendants.addClass('sliding slide-up').eq(0).one('transitionend', { 'vNodes': $descendants }, this.collapseVNodesEnd);
964
- $descendants.find('.toggleBtn').removeClass('oci-minus-square oci-plus-square');
979
+ $descendants.find('.toggleBtn').removeClass(`${this.options.icons.collapsed} ${this.options.icons.expanded}`);
965
980
  }
966
981
  },
967
982
  //
@@ -1138,14 +1153,14 @@
1138
1153
  // The folowing code snippets are used to process horizontal chart
1139
1154
  // firstly, deal with the hierarchy of drop zone
1140
1155
  if (!$dropZone.siblings('.nodes').length) { // if the drop zone is a leaf node
1141
- $dropZone.append('<i class="edge verticalEdge bottomEdge oci"></i>')
1156
+ $dropZone.append(`<i class="edge verticalEdge bottomEdge ${this.options.icons.theme}"></i>`)
1142
1157
  .after('<ul class="nodes"></ul>')
1143
1158
  .siblings('.nodes').append($dragged.find('.horizontalEdge').remove().end().closest('.hierarchy'));
1144
1159
  if ($dropZone.children('.title').length) {
1145
- $dropZone.children('.title').prepend('<i class="oci '+ this.$chart.data('options').parentNodeSymbol + ' symbol"></i>');
1160
+ $dropZone.children('.title').prepend(`<i class="${this.options.icons.theme} ${this.$chart.data('options').icons.parentNode} parentNodeSymbol"></i>`);
1146
1161
  }
1147
1162
  } else {
1148
- var horizontalEdges = '<i class="edge horizontalEdge rightEdge oci"></i><i class="edge horizontalEdge leftEdge oci"></i>';
1163
+ var horizontalEdges = `<i class="edge horizontalEdge rightEdge ${this.options.icons.theme}"></i><i class="edge horizontalEdge leftEdge ${this.options.icons.theme}"></i>`;
1149
1164
  if (!$dragged.find('.horizontalEdge').length) {
1150
1165
  $dragged.append(horizontalEdges);
1151
1166
  }
@@ -1160,7 +1175,7 @@
1160
1175
  $dragZone.siblings('.nodes').children('.hierarchy').find('.node:first')
1161
1176
  .find('.horizontalEdge').remove();
1162
1177
  } else if ($dragZone.siblings('.nodes').children('.hierarchy').length === 0) {
1163
- $dragZone.find('.bottomEdge, .symbol').remove()
1178
+ $dragZone.find('.bottomEdge, .parentNodeSymbol').remove()
1164
1179
  .end().siblings('.nodes').remove();
1165
1180
  }
1166
1181
  }
@@ -1348,25 +1363,24 @@
1348
1363
  var flags = data.relationship || '';
1349
1364
  if ((opts.verticalLevel && level >= opts.verticalLevel) || data.isVertical) {
1350
1365
  if (Number(flags.substr(2,1))) {
1351
- $nodeDiv.append('<i class="toggleBtn oci"></i>')
1352
- .children('.title').prepend('<i class="oci '+ opts.parentNodeSymbol + ' symbol"></i>');
1366
+ $nodeDiv.append(`<i class="toggleBtn ${opts.icons.theme}"></i>`)
1367
+ .children('.title').prepend(`<i class="${opts.icons.theme} ${opts.icons.parentNode} parentNodeSymbol"></i>`);
1353
1368
  }
1354
1369
  } else if (data.isHybrid) {
1355
1370
  if (Number(flags.substr(2,1))) {
1356
- $nodeDiv.append('<i class="edge verticalEdge bottomEdge oci"></i>')
1357
- .children('.title').prepend('<i class="oci '+ opts.parentNodeSymbol + ' symbol"></i>');
1371
+ $nodeDiv.append(`<i class="edge verticalEdge bottomEdge ${opts.icons.theme}"></i>`)
1372
+ .children('.title').prepend(`<i class="${opts.icons.theme} ${opts.icons.parentNode} parentNodeSymbol"></i>`);
1358
1373
  }
1359
1374
  } else {
1360
1375
  if (Number(flags.substr(0,1))) {
1361
- $nodeDiv.append('<i class="edge verticalEdge topEdge oci"></i>');
1376
+ $nodeDiv.append(`<i class="edge verticalEdge topEdge ${opts.icons.theme}"></i>`);
1362
1377
  }
1363
1378
  if(Number(flags.substr(1,1))) {
1364
- $nodeDiv.append('<i class="edge horizontalEdge rightEdge oci"></i>' +
1365
- '<i class="edge horizontalEdge leftEdge oci"></i>');
1379
+ $nodeDiv.append(`<i class="edge horizontalEdge rightEdge ${opts.icons.theme}"></i><i class="edge horizontalEdge leftEdge ${opts.icons.theme}"></i>`);
1366
1380
  }
1367
1381
  if(Number(flags.substr(2,1))) {
1368
- $nodeDiv.append('<i class="edge verticalEdge bottomEdge oci"></i>')
1369
- .children('.title').prepend('<i class="oci '+ opts.parentNodeSymbol + ' symbol"></i>');
1382
+ $nodeDiv.append(`<i class="edge verticalEdge bottomEdge ${opts.icons.theme}"></i>`)
1383
+ .children('.title').prepend(`<i class="${opts.icons.theme} ${opts.icons.parentNode} parentNodeSymbol"></i>`);
1370
1384
  }
1371
1385
  }
1372
1386
 
@@ -1446,16 +1460,16 @@
1446
1460
  // exposed method
1447
1461
  addChildren: function ($node, data) {
1448
1462
  this.buildChildNode($node.closest('.hierarchy'), data);
1449
- if (!$node.find('.symbol').length) {
1450
- $node.children('.title').prepend('<i class="oci '+ this.options.parentNodeSymbol + ' symbol"></i>');
1463
+ if (!$node.find('.parentNodeSymbol').length) {
1464
+ $node.children('.title').prepend(`<i class="${this.options.icons.theme} ${this.options.icons.parentNode} parentNodeSymbol"></i>`);
1451
1465
  }
1452
1466
  if ($node.closest('.nodes.vertical').length) {
1453
1467
  if (!$node.children('.toggleBtn').length) {
1454
- $node.append('<i class="toggleBtn oci"></i>');
1468
+ $node.append(`<i class="toggleBtn ${this.options.icons.theme}"></i>`);
1455
1469
  }
1456
1470
  } else {
1457
1471
  if (!$node.children('.bottomEdge').length) {
1458
- $node.append('<i class="edge verticalEdge bottomEdge oci"></i>');
1472
+ $node.append(`<i class="edge verticalEdge bottomEdge ${this.options.icons.theme}"></i>`);
1459
1473
  }
1460
1474
  }
1461
1475
  if (this.isInAction($node)) {
@@ -1474,7 +1488,7 @@
1474
1488
  addParent: function ($currentRoot, data) {
1475
1489
  this.buildParentNode($currentRoot, data);
1476
1490
  if (!$currentRoot.children('.topEdge').length) {
1477
- $currentRoot.children('.title').after('<i class="edge verticalEdge topEdge oci"></i>');
1491
+ $currentRoot.children('.title').after(`<i class="edge verticalEdge topEdge ${this.options.icons.theme}"></i>`);
1478
1492
  }
1479
1493
  if (this.isInAction($currentRoot)) {
1480
1494
  this.switchVerticalArrow($currentRoot.children('.topEdge'));
@@ -1505,11 +1519,11 @@
1505
1519
  this.buildSiblingNode($node.closest('.hierarchy'), data);
1506
1520
  $node.closest('.nodes').data('siblingsLoaded', true);
1507
1521
  if (!$node.children('.leftEdge').length) {
1508
- $node.children('.topEdge').after('<i class="edge horizontalEdge rightEdge oci"></i><i class="edge horizontalEdge leftEdge oci"></i>');
1522
+ $node.children('.topEdge').after(`<i class="edge horizontalEdge rightEdge ${this.options.icons.theme}"></i><i class="edge horizontalEdge leftEdge ${this.options.icons.theme}"></i>`);
1509
1523
  }
1510
1524
  if (this.isInAction($node)) {
1511
1525
  this.switchHorizontalArrow($node);
1512
- $node.children('.topEdge').removeClass('oci-chevron-up').addClass('oci-chevron-down');
1526
+ $node.children('.topEdge').removeClass(this.options.icons.expandToUp).addClass(this.options.icons.collapseToDown);
1513
1527
  }
1514
1528
  },
1515
1529
  // remove node and its descendent nodes
@@ -1594,10 +1608,10 @@
1594
1608
  if ((!isWebkit && !isFf) || isEdge) {
1595
1609
  window.navigator.msSaveBlob(canvas.msToBlob(), exportFilename + '.png');
1596
1610
  } else {
1597
- var selector = '.oci-download-btn' + (that.options.chartClass !== '' ? '.' + that.options.chartClass : '');
1611
+ var selector = '.download-btn' + (that.options.chartClass !== '' ? '.' + that.options.chartClass : '');
1598
1612
 
1599
1613
  if (!$chartContainer.find(selector).length) {
1600
- $chartContainer.append('<a class="oci-download-btn' + (that.options.chartClass !== '' ? ' ' + that.options.chartClass : '') + '"'
1614
+ $chartContainer.append('<a class="download-btn' + (that.options.chartClass !== '' ? ' ' + that.options.chartClass : '') + '"'
1601
1615
  + ' download="' + exportFilename + '.png"></a>');
1602
1616
  }
1603
1617
 
@@ -1615,7 +1629,7 @@
1615
1629
  var $chartContainer = this.$chartContainer;
1616
1630
  var $mask = $chartContainer.find('.mask');
1617
1631
  if (!$mask.length) {
1618
- $chartContainer.append('<div class="mask"><i class="oci oci-spinner spinner"></i></div>');
1632
+ $chartContainer.append(`<div class="mask"><i class="${this.options.icons.theme} ${this.options.icons.spinner} spinner"></i></div>`);
1619
1633
  } else {
1620
1634
  $mask.removeClass('hidden');
1621
1635
  }
@@ -19,7 +19,7 @@ describe('orgchart -- integration tests', function () {
19
19
  ]
20
20
  },
21
21
  fragment = '<div class="orgchart"><ul class="nodes"><li class="hierarchy">' +
22
- '<div id="n1" class="node"><div class="title"><i class="oci oci-leader symbol">' +
22
+ '<div id="n1" class="node"><div class="title"><i class="oci oci-menu parentNodeSymbol">' +
23
23
  '</i>Lao Lao</div><i class="edge verticalEdge bottomEdge oci"></i></div><ul class="nodes">' +
24
24
  '<li class="hierarchy"><div id="n2" data-parent="n1" class="node">' +
25
25
  '<div class="title">Bo Miao</div><i class="edge verticalEdge topEdge oci"></i>' +
@@ -73,7 +73,7 @@ describe('orgchart -- integration tests', function () {
73
73
 
74
74
  it('initialize chart with the given vertical level', function () {
75
75
  var fragment = '<li class="hierarchy"><div id="n1" class="node"><div class="title">' +
76
- '<i class="oci oci-leader symbol"></i>Lao Lao</div><i class="edge verticalEdge bottomEdge oci">' +
76
+ '<i class="oci oci-menu parentNodeSymbol"></i>Lao Lao</div><i class="edge verticalEdge bottomEdge oci">' +
77
77
  '</i></div><ul class="nodes vertical"><li class="hierarchy"><div id="n2" data-parent="n1" class="node">' +
78
78
  '<div class="title">Bo Miao</div></div></li><li class="hierarchy"><div id="n3" data-parent="n1" class="node">' +
79
79
  '<div class="title">Su Miao</div></div></li></ul></li>';
@@ -101,11 +101,11 @@ describe('orgchart -- integration tests', function () {
101
101
 
102
102
  it('verticalLevel=2 and visibleLevel=1', function () {
103
103
  var fragment = '<div class="orgchart"><ul class="nodes"><li class="hierarchy">' +
104
- '<div class="node"><div class="title"><i class="oci oci-leader symbol">' +
104
+ '<div class="node"><div class="title"><i class="oci oci-menu parentNodeSymbol">' +
105
105
  '</i>Lao Lao</div><i class="edge verticalEdge bottomEdge oci"></i></div>' +
106
106
  '<ul class="nodes hidden vertical"><li class="hierarchy"><div class="node slide-up">' +
107
107
  '<div class="title">Bo Miao</div></div></li><li class="hierarchy">' +
108
- '<div class="node slide-up"><div class="title"><i class="oci oci-leader symbol"></i>Su Miao</div>' +
108
+ '<div class="node slide-up"><div class="title"><i class="oci oci-menu parentNodeSymbol"></i>Su Miao</div>' +
109
109
  '<i class="toggleBtn oci"></i></div><ul class="nodes hidden">' +
110
110
  '<li class="hierarchy"><div class="node slide-up"><div class="title">Tie Hua</div>' +
111
111
  '</div></li><li class="hierarchy"><div class="node slide-up">' +
@@ -120,10 +120,10 @@ describe('orgchart -- integration tests', function () {
120
120
 
121
121
  it('verticalLevel=2 and visibleLevel=2', function () {
122
122
  var fragment = '<div class="orgchart"><ul class="nodes"><li class="hierarchy">' +
123
- '<div class="node"><div class="title"><i class="oci oci-leader symbol"></i>Lao Lao</div>' +
123
+ '<div class="node"><div class="title"><i class="oci oci-menu parentNodeSymbol"></i>Lao Lao</div>' +
124
124
  '<i class="edge verticalEdge bottomEdge oci"></i></div><ul class="nodes vertical">' +
125
125
  '<li class="hierarchy"><div class="node"><div class="title">Bo Miao</div></div></li>' +
126
- '<li class="hierarchy"><div class="node"><div class="title"><i class="oci oci-leader symbol"></i>Su Miao</div>' +
126
+ '<li class="hierarchy"><div class="node"><div class="title"><i class="oci oci-menu parentNodeSymbol"></i>Su Miao</div>' +
127
127
  '<i class="toggleBtn oci"></i></div><ul class="nodes hidden">' +
128
128
  '<li class="hierarchy"><div class="node slide-up"><div class="title">Tie Hua</div></div>' +
129
129
  '</li><li class="hierarchy"><div class="node slide-up"><div class="title">Hei Hei</div>' +
@@ -138,10 +138,10 @@ describe('orgchart -- integration tests', function () {
138
138
 
139
139
  it('verticalLevel=2 and visibleLevel=3', function () {
140
140
  var fragment = '<div class="orgchart"><ul class="nodes"><li class="hierarchy">' +
141
- '<div class="node"><div class="title"><i class="oci oci-leader symbol"></i>Lao Lao</div>' +
141
+ '<div class="node"><div class="title"><i class="oci oci-menu parentNodeSymbol"></i>Lao Lao</div>' +
142
142
  '<i class="edge verticalEdge bottomEdge oci"></i></div><ul class="nodes vertical">' +
143
143
  '<li class="hierarchy"><div class="node"><div class="title">Bo Miao</div></div></li>' +
144
- '<li class="hierarchy"><div class="node"><div class="title"><i class="oci oci-leader symbol"></i>Su Miao</div>' +
144
+ '<li class="hierarchy"><div class="node"><div class="title"><i class="oci oci-menu parentNodeSymbol"></i>Su Miao</div>' +
145
145
  '<i class="toggleBtn oci"></i></div><ul class="nodes">' +
146
146
  '<li class="hierarchy"><div class="node"><div class="title">Tie Hua</div></div>' +
147
147
  '</li><li class="hierarchy"><div class="node"><div class="title">Hei Hei</div></div>' +