-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjsoneditor.html
More file actions
74 lines (69 loc) · 4.12 KB
/
jsoneditor.html
File metadata and controls
74 lines (69 loc) · 4.12 KB
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
<!DOCTYPE html>
<html>
<head>
<title>6.005 Specs Exercise</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="http://web.mit.edu/lu16j/www/boots/bootstrap/js/bootstrap.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css">
<script src="jsoneditor.js"></script>
<link href="http://web.mit.edu/lu16j/www/boots/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="jsoneditor.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<div class="editableSpecImpl">
<div class="head">
<h1>JSON Editor</h1>
<p>Enter in your specs and implementations.<br><strong>What you type here is what you will
see in the application itself.<br> This means that if a word breaks in the middle, the word
break will appear in the app.</strong></p>
</div>
<br>
<h3>
Specs:
</h3>
<p>Enter specs. Add more specs if necessary.</p>
<div class="specs">
<div class="spec1">
<input class="name" style="width:105px; font-family: monospace" type="text" placeholder="Spec name...">
<input class="intersects" style="width:104px; font-family: monospace" type="text" placeholder="Intersects...">
<input class="contains" style="width:104px; font-family: monospace" type="text" placeholder="Contains..."><br>
<textarea class="input-xlarge" style="font-family: monospace; width: 350px" rows="4" placeholder="Enter spec..."></textarea>
<button data-spec="1" class="dec btn btn-info" class="btn btn-primary">Remove Spec</button>
</div>
</div><br>
<button class="add btn btn-info" class="btn btn-primary">Add Spec</button>
<h3>
Implementation:
</h3>
<p>Enter impls.</p>
<div class="impl">
<div class="impl1">
<input class="name span4" style="width: 350px; font-family: monospace" type="text" placeholder="Implementation name..."><br>
<textarea class="span4" style="width: 350px; height: 200px; font-family: monospace" placeholder="Enter implementation"></textarea><br>
<button data-impl="1" class="deci btn btn-info" class="btn btn-primary">Remove Implementation</button>
</div>
</div><br>
<div class="row-fluid">
<button class="addi btn btn-info" class="btn btn-primary">Add Implementation</button><br><br>
<button type="submit" class="btn btn-primary">Add</button>
</div>
</div>
<br><br>
<h3>JSON code</h3>
Copy and paste into questions.js<br><strong>OR</strong> use "Export to File" to generate the file.
(Saves to default download location in Chrome.)<br><br>
<div class="questions">
<div id="result"></div>
<select id="selectionBox" multiple="multiple" style="height: 140px"></select>
<div class="opButtons">
<button id="edit" class="btn disabled"><i class="icon-pencil"></i> Edit</button>
<button id="delete" class="btn disabled"><i class="icon-trash"></i> Delete</button>
</div>
</div>
<button class="btn btn-info" onclick="saveTextAsFile()"><i class="icon-file"></i> Export to File</button>
</div>
</body>
</html>