summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE/client/bower_components/jqTree/static/documentation.js
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/jqTree/static/documentation.js')
-rw-r--r--ecomp-portal-FE/client/bower_components/jqTree/static/documentation.js51
1 files changed, 51 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/jqTree/static/documentation.js b/ecomp-portal-FE/client/bower_components/jqTree/static/documentation.js
new file mode 100644
index 00000000..43f50f4e
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jqTree/static/documentation.js
@@ -0,0 +1,51 @@
+$(function() {
+ var $menu = $('#menu');
+ var $body = $('body');
+ var $h1 = $('#jqtree h1');
+
+ // title
+ $h1.html("<span class=\"first\">jq</span><span class=\"second\">Tree</span>");
+
+ // menu
+ $menu.affix({
+ offset: {
+ top: $menu.offset().top,
+ bottom: 0
+ }
+ });
+
+ $body.scrollspy({
+ target: '#menu'
+ });
+ var scrollspy = $body.data('bs.scrollspy');
+
+ // If no menu item is active, then activate first item
+ if (! scrollspy.activeTarget) {
+ scrollspy.activate('#general');
+ }
+
+ // demo tree
+ var data = [
+ {
+ label: 'node1', id: 1,
+ children: [
+ { label: 'child1', id: 2 },
+ { label: 'child2', id: 3 }
+ ]
+ },
+ {
+ label: 'node2', id: 4,
+ children: [
+ { label: 'child3', id: 5 }
+ ]
+ }
+ ];
+
+ var $tree1 = $('#tree1');
+
+ $tree1.tree({
+ data: data,
+ autoOpen: true,
+ dragAndDrop: true
+ });
+});