forked from sugarlabs/musicblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
183 lines (154 loc) · 6.81 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Music Blocks</title>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<link rel="stylesheet" href="css/activity.css">
<script src="lib/mespeak.js"></script>
<script src="lib/reqwest.js"></script>
<script src="lib/jquery-2.1.4.js"></script>
<script src="lib/jquery-ui.js"></script>
<script src="lib/webL10n.js"></script>
<script src="lib/tone.min.js"></script>
<script src="lib/vexflow/releases/vexflow-min.js"></script>
<script type="text/javascript"></script>
<script src="//code.jquery.com/jquery-2.1.4.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="prefetch" type="application/l10n" href="./localization.ini" />
<script data-main="js/loader" src="lib/require.js">
</script>
<link rel="manifest" href="android_chrome_manifest.json">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="activity/activity-icon-color-4-00.png">
<meta id="theme-color" name="theme-color" content="#2196F3">
</head>
<body data-title="index" id="body" style="background: #96D3F3;">
<script>
window.fbAsyncInit = function() {
FB.init({
appId: '1496189893985945',
xfbml: true,
version: 'v2.1'
});
};
<!--
try {
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
} catch (e) {}
-->
$(function() {
$("#matrix").draggable();
$("#solfamenu").draggable();
});
(function($) {
$.fn.fixMe = function() {
return this.each(function() {
var $this = $(this),
$t_fixed;
function init() {
$this.wrap('<div class="container" />');
$t_fixed = $this.clone();
$t_fixed.find("tbody").remove().end().addClass("fixed").insertBefore($this);
resizeFixed();
}
function resizeFixed() {
$t_fixed.find("th").each(function(index) {
$(this).css("width", $this.find("th").eq(index).outerWidth() + "px");
});
}
function scrollFixed() {
var offset = $(this).scrollTop(),
tableOffsetTop = $this.offset().top,
tableOffsetBottom = tableOffsetTop + $this.height() - $this.find("thead").height();
if (offset < tableOffsetTop || offset > tableOffsetBottom)
$t_fixed.hide();
else if (offset >= tableOffsetTop && offset <= tableOffsetBottom && $t_fixed.is(":hidden"))
$t_fixed.show();
}
$(window).resize(resizeFixed);
$(window).scroll(scrollFixed);
init();
});
};
})(jQuery);
$(document).ready(function() {
$("solfa").fixMe();
$(".up").click(function() {
$('html, body').animate({
scrollTop: 0
}, 2000);
});
});
function moveMatrix(event) {
var matrixDiv = document.getElementById('matrix');
matrixDivPosition = matrixDiv.getBoundingClientRect();
var table = document.getElementById('myTable');
var row = table.rows.item(0);
row.style.left = matrixDivPosition.left + 'px';
row.style.top = matrixDivPosition.top + 'px';
for (i = 0, row; row = table.rows[i]; i++) {
cell = row.cells[0];
cell.style.left = matrixDivPosition.left + 2 + 'px';
cell.style.top = matrixDivPosition.top + i * cell.style.height + 'px';
}
}
</script>
<!-- see activity/activity-icon-color-loading.svg for info -->
<div class="canvasHolder">
<canvas id="myCanvas" width="1200" height="900"></canvas>
<canvas id="myChart" width="600" height="600"></canvas>
<video id="camVideo" style="visibility:hidden;"></video>
<canvas id="camCanvas" style="visibility:hidden;"></canvas>
<div id="labelDiv"></div>
<div id="ioDiv">
<input tabindex="-1" class="file" type="file" id="myMedia" accept="image/*" />
<input tabindex="-1" class="file" type="file" id="myOpenFile" accept=".ta, .tb" />
<input tabindex="-1" class="file" type="file" id="myOpenPlugin" accept=".json" />
<input tabindex="-1" class="file" type="file" id="myOpenAll" />
</div>
<div id="audio"></div>
<div id="tourData"></div>
</div>
<div id="loading-image-container" style="position: absolute; width: 100%; height: 100%;">
<img src="./activity/mouse.svg" style="max-width:50%; width: 512px; margin: auto; display: block;" />
</div>
<div id="popdown-palette"></div>
<div id="main-toolbar" class="toolbar"></div>
<div id="loader"></div>
<div id="header" class="EaselJS"></div>
<div class="planet" style="display: none;">
<nav>
<div class="nav-container">
<img src="header-icons/planet-button.svg" class="logo" />
<h1 id="planetTitle"></h1>
<ul>
<li class="back"><img src="header-icons/cancel-button.svg" /></li>
<li class="new"><img src="header-icons/add.svg" /></li>
<li class="open"><img src="header-icons/folder-open.svg" /></li>
</ul>
</div>
</nav>
<div class="nav-spacer"></div>
<div class="planet-content">
<h2 id="planetMyDevice"></h2>
<ul class="content l"></ul>
<h2 id="planetWorldwide"></h2>
<ul class="content w"></ul>
</div>
</div>
<canvas hidden id="canvasToSave" width="700" height="800" style="border: 1px solid black"></canvas>
<canvas hidden id="music" width="700"></canvas>
<div id="matrix" overflow-x="auto" ondrag="moveMatrix(event)" onmouseup="moveMatrix(event)"></div>
<div id="helpElem"></div>
</body>
</html>