-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
295 lines (275 loc) · 11.2 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html>
<html>
<head>
<title>Byzantium: an ODD editor</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="CodeMirror/lib/codemirror.css">
<script src="CodeMirror/lib/codemirror.js"></script>
<script src="CodeMirror/lib/util/formatting.js"></script>
<script src="CodeMirror/mode/xml/xml.js"></script>
<!--
Copyright TEI Consortium.
These material is dual-licensed:
1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
Unported License http://creativecommons.org/licenses/by-sa/3.0/
2. http://www.opensource.org/licenses/BSD-2-Clause
All rights reserved.
-->
<script src="jquery.js"></script>
<script src="jquery-ui.js"></script>
<script src="byzantium.js"></script>
<script src="sparkline.js"></script>
<script>
/*jslint white:true */
/*globals $, TEI*/
$(function () {
'use strict';
function handleFileSelect(evt) {
var files = evt.target.files;
TEI.showFiles(files, 'list');
}
$('#files, #JSONfiles').change(handleFileSelect);
$("#tabs").tabs({
select: function(event, ui) {
var tabNumber = ui.index,
tabName = $(ui.tab).text();
switch (tabNumber) {
case 1:
TEI.editInfo(); break;
case 2:
TEI.doShowDatabases(); break;
case 3:
TEI.showModules(); break;
case 7:
TEI.makeReport(); break;
case 8:
TEI.makePreview(); break;
}
}
});
});
</script>
<link rel="stylesheet" href="jquery-ui.css" />
<link rel="stylesheet" href="byzantium.css" />
</head>
<body>
<div id="banner">
<h1>Byzantium: generating customizations for the TEI</h1>
</div>
<div id="actions"> Project name:<input type="text" id="saveAs" />
<span class="button save">Save to local storage</span>
<select id="outputSelection">
<option>TEI ODD</option>
<option>RELAX NG Compact Schema</option>
<option>RELAX NG Schema</option>
<option>XSD Schema</option>
<option>ISO Schematron</option>
<option>Schematron</option>
<option>DTD</option>
<option>JSON</option>
<option>HTML documentation</option>
<option>ePub documentation</option>
</select>
<span class="button output">Generate</span>
</div>
<div id="tabs">
<ul>
<li>
<a href="#projectSelection">Start</a>
</li>
<li>
<a href="#startInfo">Info</a>
</li>
<li>
<a href="#teiSelection">Database</a>
</li>
<li>
<a href="#modules">Modules</a>
</li>
<li>
<a href="#members">Current Module</a>
</li>
<li>
<a href="#attributes">Current Member</a>
</li>
<li>
<a href="#alterAttributes">Current Attribute</a>
</li>
<li>
<a href="#reportPage">Report</a>
</li>
<li>
<a href="#Preview">View customization</a>
</li>
</ul>
<div id="projectSelection">
<table>
<tr class="choice"><td>New project</td><td><span class="button newProject">Create</span></td></tr>
<tr class="choice"><td>Upload ODD</td>
<td>
<div id="upload">
<input type="file" id="files" name="files[]" multiple="multiple" />
<output id="list"></output>
<span class="button continueToLoad">Load file</span>
</div>
</td>
</tr>
<tr class="choice">
<td>Projects in local storage</td>
<td>
<div id="loadProjectTools"/>
<div id="items_table"></div>
</td>
</tr>
</table>
</div>
<div id="startInfo">
<form>
<table>
<tr>
<td>Title</td>
<td>
<input type="text" id="title" value="My TEI customization" />
</td>
</tr>
<tr>
<td>Filename</td>
<td>
<input type="text" id="filename" value="myTEI" />
</td>
</tr>
<tr>
<td>Author Name</td>
<td>
<input type="text" id="author" />
</td>
</tr>
<tr>
<td>Description</td>
<td>
<textarea rows="4" cols="40" id="description"></textarea>
</td>
</tr>
<tr>
<td>Language</td>
<td>
<select id="languageSelect">
<option value="en">English</option>
<option value="de">Deutsch</option>
<option value="it">Italiano</option>
<option value="es">Español</option>
<option value="fr">Français</option>
<option value="pt">Portugues</option>
<option value="ja">日本語</option>
<option value="zh">中文</option>
</select>
</td>
</tr>
<tr>
<td>Module element list method</td>
<td>
<select id="methodSelect">
<option value="except">Exception</option>
<option value="include">Inclusion</option>
</select>
</td>
</tr>
</table>
</form>
<span class="button saveStartInfo">Save</span>
</div>
<div id="teiSelection">
<h2>Please Select Your TEI Database:</h2>
<p id="TEI_Selected"></p>
<table>
<tr>
<td>Default</td>
<td><span class="button TEI_Default">Load</span></td>
</tr>
<tr class="choice"> <td colspan="2"><span id="defaultDatabase"/></td></tr>
<tr class="choice">
<td>From web</td>
<td>
<div id="OnlineSelector">Enter URL:<input type="text" id="TEI_OnlineSelector"
/><br /> Name TEI:<input type="text" id="TEI_OnlineName" /><br />
<span class="button setOnline">Load</span>
</div>
</td>
</tr>
<tr class="choice">
<td>From local storage</td>
<td>
<div id="teiitems_table"></div>
</td>
</tr>
<tr class="choice">
<td>Upload file</td>
<td>
<div id="UploadCustom">
<input type="text" id="TEI_LocalName" /> TEI Name<br />
<input type="file" id="JSONfiles" name="files[]" multiple="multiple" />
<output id="JSONlist"></output>
<span class="button loadCustomJSON">Load</span>
</div>
</td>
</tr>
</table>
</div>
<div id="modules">
<div id="sparkline" style="float:right" border="1">
<span class="moduleSparkline"></span>
<ul>
<li>Red: Unused members</li>
<li>Blue: Used members</li>
</ul>
</div>
<div id="moduleSummary">
<p></p>
</div>
<table id="moduleList" class="modules">
<tr>
<td>NO DATABASE LOADED</td>
</tr>
</table>
<!-- <div id="selected"></div>-->
</div>
<div id="members">
<p>NO MODULE SELECTED YET</p>
</div>
<div id="attributes">
<p>NO ELEMENT OR CLASS SELECTED YET</p>
</div>
<div id="alterAttributes">
<p>NO ATTRIBUTE SELECTED YET</p>
</div>
<div id="output"></div>
<div id="reportPage">
<h2>Status report</h2>
<p id="repTitle"></p>
<p id="repFilename"></p>
<p id="repAuthor"></p>
<p id="repDescription"></p>
<p id="repLanguage"></p>
<p id="repMethod"></p>
<p id="repModulesTag"></p>
<div id="repModules"></div>
<p id="repElementsTag"></p>
<div id="repElements"></div>
<p id="repAttributesTag"></p>
<div id="repAttributes"></div>
</div>
<div id="Preview">
<textarea id="code" style="width: 90%; height: 12em; border: 1px solid black; padding: .2em .4em;">
</textarea>
</div>
</div>
<div id="message"></div>
<textarea rows="50" cols="75" style="display:none" id="inputarea"></textarea>
<div class="trailer">
<p id="colophon"></p>
<p><a
href="https://github.com/sebastianrahtz/Byzantium">Source
on Github</a></p>
</div>
</body>
</html>