-
Notifications
You must be signed in to change notification settings - Fork 1
/
application.js
43 lines (32 loc) · 1.13 KB
/
application.js
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
dojo.require("dojo.dnd.Source");
function init() {
console.log("init");
var topRowKeys = ['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'];
var middleRowKeys = ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'];
var bottomRowKeys = ['Z', 'C', 'V', 'B', 'N', 'M'];
dojo.forEach(topRowKeys,
function(key) {
var keyNode = dojo.create('span', {innerHTML:key});
dojo.addClass(keyNode, 'keyblock');
dojo.place(keyNode, 'keys_available');
}
);
dojo.place('</br>', 'keys_available');
dojo.forEach(middleRowKeys,
function(key) {
var keyNode = dojo.create('span', {innerHTML:key});
dojo.addClass(keyNode, 'keyblock');
dojo.place(keyNode, 'keys_available');
}
);
dojo.place('</br>', 'keys_available');
dojo.forEach(bottomRowKeys,
function(key) {
var keyNode = dojo.create('span', {innerHTML:key});
dojo.addClass(keyNode, 'keyblock');
dojo.place(keyNode, 'keys_available');
}
);
console.log("done");
}
dojo.ready(init);