This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
173 lines (155 loc) · 6.46 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TerriaJS catalog editor</title>
<script src="js/jquery.js"></script>
<script src="js/modernizr.js"></script>
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="overrides.css">
<style>
#jsonoutput {
/*display: none; */
width: 98%;
height: 200px;
font-family:monospace;
background-color: hsl(220,80%,95%);
}
#jsonoutputbox label {
color: #555;
font-size: 16px;
}
#sourceurl {
width: 60em;
}
body {
transform: scale(0.75);
transform-origin: top;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="large-12 columns">
<h1>TerriaJS catalog editor (alpha)</h1>
</div>
</div>
<div class="row">
<div class="span4 collapse-group">
<h2>Help</h2>
<a href="terriajs.io" target="_blank">TerriaJS</a> is the software that runs National Map, AREMI, Northern Australia Map, NEII Viewer, and related sites. This tool is for TerriaJS administrators in charge of managing the catalogs for those sites. It lets you load a catalog (a list of datasources), make changes to it, and then save a copy to the web.
<div class="collapse">
<h3>Loading a catalog</h3>
<p>To load a catalog, either:
<ol>
<li>Click the name of one of the National Map catalog groups, then click the <b>Load</b> button.</li>
<li>If the catalog JSON code is on the web somewhere, paste the URL into the URL box then click the <b>Load</b> button.</li>
<li>Copy the JSON code for the catalog from somewhere else. Paste it into the JSON code box, then click anywhere outside the box to load from it.</li>
</ol>
</p>
<h3>Saving changes</h3>
Click the <b>Save to Gist</b> button. A copy of the catalog will be saved to Gist, a website for storing text files
run by GitHub. The contents is private unless you share the URL with someone. You can then preview the changes or
send a copy to the system administrator.
<h3>Adding properties</h3>
There are many additional properties you can add to each catalog item or group besides its name and type.
<ol><li>Click the <b>Properties</b> button at the top of the item</li>
<li>Scroll down to find the property you want to add, then click its checkbox</li>
<li>Now close the <b>Properties</b> list, and go and find that property, to give it a value.</li>
</ol>
<h3>Moving items up and down</h3>
To reorder items within a group, click the ↑ and ↓ buttons located <b>below and to the right</b> of the list of items. Reordering items in the primary group level can be slow.
<h3>Adding an item</h3>
To add a new item into a group:
<ol><li>Click <b>✚ Item</b>, located <b>above</b> the list of items. (To add a new top-level group, click <b>✚ Top-level group</b> located <b>at the bottom</b>.)</li>
<li>Choose a type from the drop down list. The default is "Group"</li>
<li>Enter a name</li>
<li>Add additional properties (See "<i>Adding properties</i>", above)</li>
</ul>
</div>
<p><a class="btn" href="#" style="background:hsl(240,50%,95%)">Click for help »</a></p>
</div>
</div>
<div class="row" id="jsonoutputbox">
<div class="large-12 columns">
<!--<button id='load'>Load from JSON</button>-->
<label for="jsonoutput">JSON code</label>
<textarea id="jsonoutput" value="{ catalog: [] }" >
</textarea>
<!-- This button doesn't "do" anything, but by receiving focus it causes the edit box's change() event
to be triggered -->
<button class="btn">Update</button>
</div>
</div>
<form class="form-horizontal">
<div class="form-group">
<label for="sourceurl" class="col-sm-1 control-label">
Load from:
</label>
<div class="col-sm-5">
<h3>National Map</h3>
<ul id="nm-jsons" style="display:none">
<!--<li><a href="#">test-special</a></a></li>
<li><a href="#">test</a></li>
<li><a href="#">nm</a></li>
<li><a href="#">abs</a></li>
<li><a href="#">ckan</a></li>
<li><a href="#">csiro</a></li>
<li><a href="#">dgakml</a></li>
<li><a href="#">ganew</a></li>
<li><a href="#">geelong</a></li>
<li><a href="#">qld</a></li>
<li><a href="#">sa</a></li>
<li><a href="#">vic</a></li>
<li><a href="#">aremi</a></li>
<li><a href="#">(blank)</a></li>
</ul>-->
</div>
<div class="col-sm-5">
<ul id="other-jsons">
<h3>Other TerriaJS projects</h3>
<li><a href="#">test-special</a></a></li>
<li><a href="#">test</a></li>
<!-- <li><a href="#">aremi</a></li>-->
<li><a href="#">(blank)</a></li>
</ul>
</div>
</div>
<div class="form-group">
<label for="sourceurl" class="col-sm-1 control-label">
URL:
</label>
<div class="col-sm-10 form-inline">
<input type="text" id="sourceurl" class="form-control">
<button type="submit" id="loadjson" class="btn btn-primary">Load</button>
</div>
</div>
<div class="form-group">
<div class="col-sm-1 col-sm-offset-10">
<button type="button" id="savejson" class="btn btn-danger">Save to Gist</button>
</div>
</div>
</form>
<div id="loading" class="centre-block" style="display: none">
<div class="row">
<div class="large-4" id="loadingmsg">
<h2>Loading JSON</h2> Large files take aaaaaaages.
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id='editor_holder' style="display: none"></div>
</formset>
</div>
</div>
</div>
<script src="datasourceeditor.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="jsoneditor/jsoneditor.js"></script>
<script src="js/FileSaver.js/FileSaver.js"></script>
</body>
</html>