|
| 1 | +<!doctype html> |
| 2 | +<html class="no-js" lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | + <title>TerriaJS catalog editor</title> |
| 7 | + |
| 8 | + <script src="js/jquery.js"></script> |
| 9 | + |
| 10 | + <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> |
| 11 | + |
| 12 | + <link rel="stylesheet" href="overrides.css"> |
| 13 | + |
| 14 | + |
| 15 | + <style> |
| 16 | + #jsonoutput { |
| 17 | + /*display: none; */ |
| 18 | + width: 98%; |
| 19 | + height: 200px; |
| 20 | + font-family:monospace; |
| 21 | + background-color: hsl(220,80%,95%); |
| 22 | + } |
| 23 | + #jsonoutputbox label { |
| 24 | + color: #555; |
| 25 | + font-size: 16px; |
| 26 | + } |
| 27 | + #sourceurl { |
| 28 | + width: 60em; |
| 29 | + } |
| 30 | + body { |
| 31 | + transform: scale(0.75); |
| 32 | + transform-origin: top; |
| 33 | + } |
| 34 | + </style> |
| 35 | + |
| 36 | + |
| 37 | + </head> |
| 38 | + <body> |
| 39 | + <div class="container"> |
| 40 | + <div class="row"> |
| 41 | + <div class="large-12 columns"> |
| 42 | + <h1>TerriaJS catalog editor (alpha)</h1> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + <div class="row"> |
| 46 | + <div class="span4 collapse-group"> |
| 47 | + <h2>Help</h2> |
| 48 | + <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. |
| 49 | + <div class="collapse"> |
| 50 | + <h3>Loading a catalog</h3> |
| 51 | + <p>To load a catalog, either: |
| 52 | + <ol> |
| 53 | + <li>Click the name of one of the National Map catalog groups, then click the <b>Load</b> button.</li> |
| 54 | + <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> |
| 55 | + <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> |
| 56 | + |
| 57 | + </ol> |
| 58 | + </p> |
| 59 | + <h3>Saving changes</h3> |
| 60 | + Click the <b>Save to Gist</b> button. A copy of the catalog will be saved to Gist, a website for storing text files |
| 61 | + run by GitHub. The contents is private unless you share the URL with someone. You can then preview the changes or |
| 62 | + send a copy to the system administrator. |
| 63 | + <h3>Adding properties</h3> |
| 64 | + There are many additional properties you can add to each catalog item or group besides its name and type. |
| 65 | + <ol><li>Click the <b>Properties</b> button at the top of the item</li> |
| 66 | + <li>Scroll down to find the property you want to add, then click its checkbox</li> |
| 67 | + <li>Now close the <b>Properties</b> list, and go and find that property, to give it a value.</li> |
| 68 | + </ol> |
| 69 | + |
| 70 | + <h3>Moving items up and down</h3> |
| 71 | + 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. |
| 72 | + <h3>Adding an item</h3> |
| 73 | + To add a new item into a group: |
| 74 | + <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> |
| 75 | + <li>Choose a type from the drop down list. The default is "Group"</li> |
| 76 | + <li>Enter a name</li> |
| 77 | + <li>Add additional properties (See "<i>Adding properties</i>", above)</li> |
| 78 | + </ul> |
| 79 | + </div> |
| 80 | + <p><a class="btn" href="#" style="background:hsl(240,50%,95%)">Click for help »</a></p> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + |
| 84 | + <div class="row" id="jsonoutputbox"> |
| 85 | + <div class="large-12 columns"> |
| 86 | + <!--<button id='load'>Load from JSON</button>--> |
| 87 | + <label for="jsonoutput">JSON code</label> |
| 88 | + <textarea id="jsonoutput" value="{ catalog: [] }" > |
| 89 | + </textarea> |
| 90 | + <!-- This button doesn't "do" anything, but by receiving focus it causes the edit box's change() event |
| 91 | + to be triggered --> |
| 92 | + <button class="btn">Update</button> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + |
| 96 | + |
| 97 | + <form class="form-horizontal"> |
| 98 | + <div class="form-group"> |
| 99 | + <label for="sourceurl" class="col-sm-1 control-label"> |
| 100 | + Load from: |
| 101 | + </label> |
| 102 | + <div class="col-sm-5"> |
| 103 | + <h3>National Map</h3> |
| 104 | + <ul id="nm-jsons" style="display:none"> |
| 105 | + <!--<li><a href="#">test-special</a></a></li> |
| 106 | + <li><a href="#">test</a></li> |
| 107 | + <li><a href="#">nm</a></li> |
| 108 | + <li><a href="#">abs</a></li> |
| 109 | + <li><a href="#">ckan</a></li> |
| 110 | + <li><a href="#">csiro</a></li> |
| 111 | + <li><a href="#">dgakml</a></li> |
| 112 | + <li><a href="#">ganew</a></li> |
| 113 | + <li><a href="#">geelong</a></li> |
| 114 | + <li><a href="#">qld</a></li> |
| 115 | + <li><a href="#">sa</a></li> |
| 116 | + <li><a href="#">vic</a></li> |
| 117 | + <li><a href="#">aremi</a></li> |
| 118 | + <li><a href="#">(blank)</a></li> |
| 119 | + </ul>--> |
| 120 | + </div> |
| 121 | + <div class="col-sm-5"> |
| 122 | + <ul id="other-jsons"> |
| 123 | + <h3>Other TerriaJS projects</h3> |
| 124 | + <li><a href="#">test-special</a></a></li> |
| 125 | + <li><a href="#">test</a></li> |
| 126 | + <!-- <li><a href="#">aremi</a></li>--> |
| 127 | + <li><a href="#">(blank)</a></li> |
| 128 | + </ul> |
| 129 | + </div> |
| 130 | + </div> |
| 131 | + <div class="form-group"> |
| 132 | + |
| 133 | + <label for="sourceurl" class="col-sm-1 control-label"> |
| 134 | + URL: |
| 135 | + </label> |
| 136 | + <div class="col-sm-10 form-inline"> |
| 137 | + <input type="text" id="sourceurl" class="form-control"> |
| 138 | + <button type="submit" id="loadjson" class="btn btn-primary">Load</button> |
| 139 | + </div> |
| 140 | + </div> |
| 141 | + <div class="form-group"> |
| 142 | + <div class="col-sm-1 col-sm-offset-10"> |
| 143 | + <button type="button" id="savejson" class="btn btn-danger">Save to Gist</button> |
| 144 | + </div> |
| 145 | + </div> |
| 146 | + </form> |
| 147 | + |
| 148 | + <div id="loading" class="centre-block" style="display: none"> |
| 149 | + <div class="row"> |
| 150 | + <div class="large-4" id="loadingmsg"> |
| 151 | + <h2>Loading JSON</h2> Large files take aaaaaaages. |
| 152 | + </div> |
| 153 | + </div> |
| 154 | + </div> |
| 155 | + |
| 156 | + <div class="row"> |
| 157 | + <div class="col-md-12"> |
| 158 | + <div id='editor_holder' style="display: none"></div> |
| 159 | + </formset> |
| 160 | + |
| 161 | + </div> |
| 162 | + </div> |
| 163 | + </div> |
| 164 | + |
| 165 | + |
| 166 | +https://raw.githubusercontent.com/TerriaJS/DataSourceEditor/gh-pages/datasourceeditor.js |
| 167 | + <script src="dist/datasourceeditorOrginal.js"></script> |
| 168 | + <!--<script src="dist/datasourceeditor.js"></script>--> |
| 169 | + <!-- Latest compiled and minified JavaScript --> |
| 170 | + <script src="bootstrap/js/bootstrap.min.js"></script> |
| 171 | + <script src="dist/jsoneditor.js"></script> |
| 172 | + <script src="js/FileSaver.js/FileSaver.js"></script> |
| 173 | + |
| 174 | + </body> |
| 175 | +</html> |
0 commit comments