-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
107 lines (98 loc) · 4 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="foundation.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="d3-context-menu.css" />
<script src = "https://d3js.org/d3-collection.v1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<style>
.board {
z-index: 2;
color:red;
}
</style>
</head>
<body>
<article class="persist-area">
<h1 class="persist-header">
<!-- stuff and stuff -->
</article>
<div id="RenameNodeModal" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h2 id="modalTitle">Rename Node</h2>
<form id="RenameNodeForm">
<div class="row">
<div class="large-12 columns">
<label>Node name
<input type="text" class="inputName" id='RenameNodeName' placeholder="node name" />
</label>
</div>
</div>
<div class="row">
<div class="large-8 columns">
</div>
<div class="large-4 columns">
<a href="#" class="button info" onclick="close_rename_node_modal()">Cancel</a>
<a href="#" class="button success" onclick="rename_node()">Rename</a>
</div>
</div>
</form>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<div id="CreateNodeModal" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h2 id="modalTitle">Create Node</h2>
<form id="CreateNodeForm">
<div class="row">
<div class="large-12 columns">
<label>Node name
<input type="text" class="inputName" id='CreateNodeName' placeholder="node name" />
</label>
</div>
</div>
<div class="row">
<div class="large-8 columns">
</div>
<div class="large-4 columns">
<a href="#" class="button info" onclick="close_create_node_modal()">Cancel</a>
<a href="#" class="button success" onclick="create_node()">Create</a>
</div>
</div>
</form>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<div id="tree-container" class="smoothScroll"></div>
<script src="d3.v3.min.js"></script>
<script src="dndTree.js"></script>
<script src="d3-context-menu.js"></script>
<script src="underscore-min.js"></script>
<!-- <script src="jquery.js"></script> -->
<script src="fastclick.js"></script>
<script src="foundation.min.js"></script>
<script>
// for the first initialization
$('document').ready(function(){
$(document).foundation();
$(document).on('opened', '[data-reveal]', function () {
var element = $(".inputName:visible").first();
element.focus(function(){
this.selectionStart = this.selectionEnd = this.value.length;
});
element.focus();
});
$('#RenameNodeForm').submit(function(e){
rename_node();
return false;
});
$('#CreateNodeForm').submit(function(e){
create_node();
return false;
});
var treeJSON = d3.json("coffee.json", draw_tree);
});
</script>
<script type="text/javascript" src="smoothscroll.js"></script>
</body>
</html>