-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (44 loc) · 2.73 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="bower_components/angular-ui-tree/dist/angular-ui-tree.min.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="demo.css">
</head>
<body ng-app="demoApp" ng-controller="MainCtrl" >
<div ng-include="'tabset.html'" ng-repeat="tabset in tabsets"></div>
<script type="text/ng-template" id="tabset.html">
<tabset id="{{tabset.id}}_tabset" class="col-sm-4 tabset">
<tab ng-repeat="tree in trees" heading="{{tree.name}}" select="select($index, tabset.id)">
<div ng-model="tree" ng-include="'tree.html'"></div>
</tab>
</tabset>
</script>
<script type="text/ng-template" id="tree.html">
<div ui-tree="treeOptions" data-drag-delay="100" id="tree-root_{{tree.id}}" data-type="tree-root">
<ol ui-tree-nodes ng-model="tree.list">
<li ng-repeat="node in tree.list" ui-tree-node ng-include="'nodes_renderer.html'"></li>
</ol>
</div>
</script>
<script type="text/ng-template" id="nodes_renderer.html">
<div ui-tree-handle data-id="{{node.id}}" ng-click="click()">
<button class="btn btn-success btn-xs" data-nodrag="" ng-click="toggle(this); afterToggle();"><span class="glyphicon glyphicon-chevron-down" ng-class="{'glyphicon-chevron-right': collapsed, 'glyphicon-chevron-down': !collapsed}"></span></button>
{{node.title}}
<button class="pull-right btn btn-danger btn-xs" data-nodrag="" ng-click="removeNode(this)"><span class="glyphicon glyphicon-remove"></span></button>
<button class="pull-right btn btn-primary btn-xs connect" data-nodrag="" ng-click="connect(this)" style="margin-right: 8px;"><span class="glyphicon glyphicon-transfer"></span></button>
<button class="pull-right btn btn-primary btn-xs" data-nodrag="" ng-click="newSubItem(this)" style="margin-right: 8px;"><span class="glyphicon glyphicon-plus"></span></button>
</div>
<ol ui-tree-nodes="" ng-model="node.nodes" ng-class="{hidden: collapsed}">
<li ng-repeat="node in node.nodes" ui-tree-node ng-include="'nodes_renderer.html'">
</li>
</ol>
</script>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/angular/angular.min.js"></script>
<script type="text/javascript" src="bower_components/angular-ui-tree/dist/angular-ui-tree.min.js"></script>
<script type="text/javascript" src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>
</html>