-
Notifications
You must be signed in to change notification settings - Fork 15
/
comparison.xhtml
289 lines (245 loc) · 10.3 KB
/
comparison.xhtml
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
---
layout: comparison
title: Verovio – Version comparison
versions:
- url: "/javascript/latest/verovio-toolkit.js"
name: "Latest release"
- url: "/javascript/4.5.0/verovio-toolkit.js"
name: "Version 4.5.0"
- url: "/javascript/4.4.0/verovio-toolkit.js"
name: "Version 4.4.0"
- url: "/javascript/4.3.1/verovio-toolkit.js"
name: "Version 4.3.1"
- url: "/javascript/4.2.0/verovio-toolkit.js"
name: "Version 4.2.0"
- url: "/javascript/4.1.0/verovio-toolkit.js"
name: "Version 4.1.0"
- url: "/javascript/4.0.1/verovio-toolkit.js"
name: "Version 4.0.1"
- url: "/javascript/4.0.0/verovio-toolkit.js"
name: "Version 4.0.0"
- url: "/javascript/3.16.0/verovio-toolkit.js"
name: "Version 3.16.0"
- url: "/javascript/3.15.0/verovio-toolkit.js"
name: "Version 3.15.0"
- url: "/javascript/3.14.0/verovio-toolkit.js"
name: "Version 3.14.0"
- url: "/javascript/3.13.1/verovio-toolkit.js"
name: "Version 3.13.1"
- url: "/javascript/3.13.0/verovio-toolkit.js"
name: "Version 3.13.0"
- url: "/javascript/3.12.1/verovio-toolkit.js"
name: "Version 3.12.1"
- url: "/javascript/3.12.0/verovio-toolkit.js"
name: "Version 3.12.0"
- url: "/javascript/3.11.0/verovio-toolkit.js"
name: "Version 3.11.0"
- url: "/javascript/3.10.0/verovio-toolkit.js"
name: "Version 3.10.0"
- url: "/javascript/3.9.0/verovio-toolkit.js"
name: "Version 3.9.0"
- url: "/javascript/3.8.1/verovio-toolkit.js"
name: "Version 3.8.1"
- url: "/javascript/3.8.0/verovio-toolkit.js"
name: "Version 3.8.0"
- url: "/javascript/3.7.0/verovio-toolkit.js"
name: "Version 3.7.0"
- url: "/javascript/3.6.0/verovio-toolkit.js"
name: "Version 3.6.0"
- url: "/javascript/3.5.0/verovio-toolkit.js"
name: "Version 3.5.0"
- url: "/javascript/3.4.1/verovio-toolkit.js"
name: "Version 3.4.1"
- url: "/javascript/3.4.0/verovio-toolkit.js"
name: "Version 3.4.0"
- url: "/javascript/3.3.0/verovio-toolkit.js"
name: "Version 3.3.0"
- url: "/javascript/3.2.0/verovio-toolkit.js"
name: "Version 3.2.0"
- url: "/javascript/3.1.0/verovio-toolkit.js"
name: "Version 3.1.0"
- url: "/javascript/3.0.2/verovio-toolkit.js"
name: "Version 3.0.2"
- url: "/javascript/3.0.1/verovio-toolkit.js"
name: "Version 3.0.1"
- url: "/javascript/3.0.0/verovio-toolkit.js"
name: "Version 3.0.0"
- url: "/javascript/2.7.2/verovio-toolkit.js"
name: "Version 2.7.2"
- url: "/javascript/2.7.1/verovio-toolkit.js"
name: "Version 2.7.1"
- url: "/javascript/2.7.0/verovio-toolkit.js"
name: "Version 2.7.0"
- url: "/javascript/2.6.0/verovio-toolkit.js"
name: "Version 2.6.0"
- url: "/javascript/2.5.0/verovio-toolkit.js"
name: "Version 2.5.0"
- url: "/javascript/2.4.0/verovio-toolkit.js"
name: "Version 2.4.0"
- url: "/javascript/2.3.5/verovio-toolkit.js"
name: "Version 2.3.5"
- url: "/javascript/2.3.4/verovio-toolkit.js"
name: "Version 2.3.4"
- url: "/javascript/2.3.3/verovio-toolkit.js"
name: "Version 2.3.3"
- url: "/javascript/2.3.2/verovio-toolkit.js"
name: "Version 2.3.2"
- url: "/javascript/2.3.1/verovio-toolkit.js"
name: "Version 2.3.1"
- url: "/javascript/2.3.0/verovio-toolkit.js"
name: "Version 2.3.0"
- url: "/javascript/2.2.1/verovio-toolkit.js"
name: "Version 2.2.1"
- url: "/javascript/2.2.0/verovio-toolkit.js"
name: "Version 2.2.0"
- url: "/javascript/2.1.0/verovio-toolkit.js"
name: "Version 2.1.0"
- url: "/javascript/2.0.2/verovio-toolkit.js"
name: "Version 2.0.2"
- url: "/javascript/2.0.1/verovio-toolkit.js"
name: "Version 2.0.1"
- url: "/javascript/2.0.0/verovio-toolkit.js"
name: "Version 2.0.0"
- url: "/javascript/1.1.6/verovio-toolkit.js"
name: "Version 1.1.6"
- url: "/javascript/1.1.5/verovio-toolkit.js"
name: "Version 1.1.5"
- url: "/javascript/1.1.4/verovio-toolkit.js"
name: "Version 1.1.4"
- url: "/javascript/1.1.3/verovio-toolkit.js"
name: "Version 1.1.3"
- url: "/javascript/1.1.2/verovio-toolkit.js"
name: "Version 1.1.2"
- url: "/javascript/1.1.1/verovio-toolkit.js"
name: "Version 1.1.1"
- url: "/javascript/1.1.0/verovio-toolkit.js"
name: "Version 1.1.0"
- url: "/javascript/1.0.0/verovio-toolkit.js"
name: "Version 1.0.0"
---
<!-- top navbar -->
<div class="container-fluid tests">
<div class="row header-tests">
<div class="col-lg-12">
<a class="navbar-brand logo-nav" href="{{ site.baseurl }}/index.xhtml"><img alt="Verovio logo" src="{{ site.baseurl }}/images/verovio-fadded-50.png" /></a>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-xs-12 sidebar-tests">
<div class="row">
<div class="col-xs-12">
<p>The left panel is the latest build from the develop branch. The right panel is the latest release. You can select another version to be loaded in the right panel. You can also select a local MEI file to compare.</p>
<h4>Select a version</h4>
<select class="form-control" id="versionSelect">
<option value=""></option>
{% for v in page.versions %}
<option value="{{ v.url }}">{{ v.name }}</option>
{% endfor %}
</select>
<h4>Select a test category</h4>
{% assign categories = "" | split: ',' %}
{% for collection in site.collections %}
{% unless collection.label == "posts" %}
{% for file in collection.files %}
{% assign path = file.path | split: '/' %}
{% assign categories = categories | push: path[1] %}
{% endfor %}
{% endunless %}
{% endfor %}
{% assign categories = categories | uniq | sort %}
<select class="form-control" id="catSelect">
<option value=""></option>
{% for category in categories %}
<option value="{{ category }}">{{ category | capitalize }}</option>
{% endfor %}
</select>
<h4>Select an MEI file</h4>
<form id="upload_form" onsubmit="uploadFile( $('#upload_form') ); return false" role="form">
<input type="file" id="mei_files" onchange="$('#submit-btn').popover('show');" name="file" style="margin: 4px 0px 8px 0px;"/>
<p>Additional options</p>
<textarea id="testOptions" class="form-control" rows="5"></textarea>
<p>Optional page number</p>
<input type="number" id="testPage" min="1" max="1000" class="form-control"></input>
<div style="margin-top: 10px;">
<button type="submit" id="submit-btn" class="btn btn-default btn-sm popover-btn" data-container="body" data-toggle="popover" data-placement="right" data-content="Click to display the MEI file!" data-trigger="manual">Refresh</button>
<button id="reset-btn" class="btn btn-default btn-sm">Reset</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-5 col-xs-6">
<iframe id="frame1" src="./test-frame.xhtml?iframe=1"></iframe>
</div>
<div class="col-sm-5 col-xs-6">
<iframe id="iframe2" src="./test-frame.xhtml?iframe=2"></iframe>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
$("#versionSelect").change(function() {
console.log($(this).val());
localStorage['iframe2'] = $(this).val();
location.reload();
});
$("#catSelect").change(function() {
console.log($(this).val());
localStorage['testCat'] = $(this).val();
location.reload();
});
$('#reset-btn').click(function () {
localStorage.removeItem('testData');
localStorage.removeItem('testOptions');
localStorage.removeItem('testPage');
localStorage.removeItem('iframe2');
localStorage.removeItem('testCat');
location.reload();
return false;
});
$('#testPage').click(function () {
localStorage['testPage'] = $("#testPage").val();
location.reload();
});
function uploadFile() {
localStorage['testOptions'] = $("#testOptions").val();
if ($("#testPage").val() != "") {
localStorage['testPage'] = $("#testPage").val();
}
var f = $("#mei_files").prop('files')[0];
if (f === undefined) {
location.reload();
return;
}
var reader = new FileReader();
// Closure to capture the file information.
reader.onload = (function(theFile) {
outputFilename = theFile.name;
return function(e) {
localStorage['testData'] = e.target.result;
location.reload();
};
})(f);
// Read in the image file as a data URL.
reader.readAsText(f);
};
function adjustSize(firstLoad = true) {
$('iframe').height($(window).height() - 120);
$('iframe').width($(window).width() * 0.4 - 10);
if (firstLoad) {
if (localStorage['testOptions']) {
$("#testOptions").val(localStorage['testOptions']);
}
if (localStorage['testPage']) {
$("#testPage").val(localStorage['testPage']);
}
}
}
$( window ).resize(function() {
adjustSize(false)
});
$( document ).ready(function() {
adjustSize();
});
//]]>
</script>