Projekt

Obecné

Profil

Stáhnout (12.2 KB) Statistiky
| Větev: | Tag: | Revize:
1
<div class="card" style="width: 24.5rem;">
2
    <div class="card-body">
3
        <div id="keyboard">
4
            <div class="display-5" style="margin-bottom: 0.5rem;">Keyboard</div>
5
            <div class="cont">
6
                <div id="keyboard-div">
7
                    <table>
8
                        <tbody>
9
                        <tr>
10
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="á"
11
                                       onclick="keyboardRead(this.value)"></td>
12
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="é"
13
                                       onclick="keyboardRead(this.value)"></td>
14
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="í"
15
                                       onclick="keyboardRead(this.value)"></td>
16
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ú"
17
                                       onclick="keyboardRead(this.value)"></td>
18
                            <td></td>
19
                            <td></td>
20
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Á"
21
                                       onclick="keyboardRead(this.value)"></td>
22
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="É"
23
                                       onclick="keyboardRead(this.value)"></td>
24
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Í"
25
                                       onclick="keyboardRead(this.value)"></td>
26
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ú"
27
                                       onclick="keyboardRead(this.value)"></td>
28
                        </tr>
29
                        <tr>
30
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="à"
31
                                       onclick="keyboardRead(this.value)"></td>
32
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="è"
33
                                       onclick="keyboardRead(this.value)"></td>
34
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ì"
35
                                       onclick="keyboardRead(this.value)"></td>
36
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ù"
37
                                       onclick="keyboardRead(this.value)"></td>
38
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ò"
39
                                       onclick="keyboardRead(this.value)"></td>
40
                            <td></td>
41
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="À"
42
                                       onclick="keyboardRead(this.value)"></td>
43
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="È"
44
                                       onclick="keyboardRead(this.value)"></td>
45
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ì"
46
                                       onclick="keyboardRead(this.value)"></td>
47
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ù"
48
                                       onclick="keyboardRead(this.value)"></td>
49
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ò"
50
                                       onclick="keyboardRead(this.value)"></td>
51
                        </tr>
52
                        <tr>
53
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="â"
54
                                       onclick="keyboardRead(this.value)"></td>
55
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ê"
56
                                       onclick="keyboardRead(this.value)"></td>
57
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="î"
58
                                       onclick="keyboardRead(this.value)"></td>
59
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="û"
60
                                       onclick="keyboardRead(this.value)"></td>
61
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ô"
62
                                       onclick="keyboardRead(this.value)"></td>
63
                            <td></td>
64
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Â"
65
                                       onclick="keyboardRead(this.value)"></td>
66
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ê"
67
                                       onclick="keyboardRead(this.value)"></td>
68
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Û"
69
                                       onclick="keyboardRead(this.value)"></td>
70
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ô"
71
                                       onclick="keyboardRead(this.value)"></td>
72
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="⌈"
73
                                       onclick="keyboardRead(this.value)">
74
                                <input class="btn btn-sm btn-outline-dark" type="button" value="⌉"
75
                                       onclick="keyboardRead(this.value)"></td>
76
                        </tr>
77

    
78

    
79
                        <tr>
80
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ā"
81
                                       onclick="keyboardRead(this.value)"></td>
82
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ē"
83
                                       onclick="keyboardRead(this.value)"></td>
84
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ī"
85
                                       onclick="keyboardRead(this.value)"></td>
86
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ū"
87
                                       onclick="keyboardRead(this.value)"></td>
88
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ō"
89
                                       onclick="keyboardRead(this.value)"></td>
90
                            <td></td>
91
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ā"
92
                                       onclick="keyboardRead(this.value)"></td>
93
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ē"
94
                                       onclick="keyboardRead(this.value)"></td>
95
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ī"
96
                                       onclick="keyboardRead(this.value)"></td>
97
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ū"
98
                                       onclick="keyboardRead(this.value)"></td>
99
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ō"
100
                                       onclick="keyboardRead(this.value)"></td>
101
                        </tr>
102
                        <tr>
103
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ʾ"
104
                                       onclick="keyboardRead(this.value)"></td>
105
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ʿ"
106
                                       onclick="keyboardRead(this.value)"></td>
107
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ṣ"
108
                                       onclick="keyboardRead(this.value)"></td>
109
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="š"
110
                                       onclick="keyboardRead(this.value)"></td>
111
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ṭ"
112
                                       onclick="keyboardRead(this.value)"></td>
113
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ḫ"
114
                                       onclick="keyboardRead(this.value)"></td>
115
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ṣ"
116
                                       onclick="keyboardRead(this.value)"></td>
117
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Š"
118
                                       onclick="keyboardRead(this.value)"></td>
119
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ṭ"
120
                                       onclick="keyboardRead(this.value)"></td>
121
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ḫ"
122
                                       onclick="keyboardRead(this.value)"></td>
123
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="["
124
                                       onclick="keyboardRead(this.value)">
125
                                <input class="btn btn-sm btn-outline-dark" type="button" value="]"
126
                                       onclick="keyboardRead(this.value)"></td>
127
                        </tr>
128
                        <tr>
129
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₁"
130
                                       onclick="keyboardRead(this.value)"></td>
131
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₂"
132
                                       onclick="keyboardRead(this.value)"></td>
133
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₃"
134
                                       onclick="keyboardRead(this.value)"></td>
135
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₄"
136
                                       onclick="keyboardRead(this.value)"></td>
137
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₅"
138
                                       onclick="keyboardRead(this.value)"></td>
139
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₆"
140
                                       onclick="keyboardRead(this.value)"></td>
141
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₇"
142
                                       onclick="keyboardRead(this.value)"></td>
143
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₈"
144
                                       onclick="keyboardRead(this.value)"></td>
145
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₉"
146
                                       onclick="keyboardRead(this.value)"></td>
147
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₀"
148
                                       onclick="keyboardRead(this.value)"></td>
149
                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="x"
150
                                       onclick="keyboardRead(this.value)"></td>
151
                        </tr>
152
                        </tbody>
153
                    </table>
154
                </div>
155
            </div>
156
        </div>
157
    </div>
158
</div>
159

    
160
{block scripts}
161
    <script>
162
        let lastFocused;
163

    
164
        $("form input[type=text]").focus(function(){ lastFocused = this.id; });
165

    
166
        function keyboardRead(val) {
167
            document.getElementById(lastFocused).value = document.getElementById(lastFocused).value + val;
168
        }
169
    </script>
170
{/block}
(1-1/2)