commit 343af43f3916411b6f9d743503bbfd1a3f87c884
Author: Petr Lukašík <lukasik@rtsoft.cz>
Date:   Wed May 22 17:32:45 2019 +0200

    Re #7508 Template klávesnice přenesen do vlastního souboru a vytvořen JS pro virtuální klávesnici

diff --git a/app/FrontModule/component/Transliteration/TransliterationSearchForm.php b/app/FrontModule/component/Transliteration/TransliterationSearchForm.php
index 2aacd31..0df51e7 100644
--- a/app/FrontModule/component/Transliteration/TransliterationSearchForm.php
+++ b/app/FrontModule/component/Transliteration/TransliterationSearchForm.php
@@ -51,20 +51,26 @@ class TransliterationSearchForm extends Control
         $form = new Form();
 
         $form->addText('word1', 'Word 1')
-            ->addRule(Form::REQUIRED, 'Field %label is required.');
-        $form->addText('word2', 'Word 2');
+            ->addRule(Form::REQUIRED, 'Field %label is required.')
+            ->setAttribute("autofocus")
+            ->setAttribute("onFocus", "setId(this.id)");
+        $form->addText('word2', 'Word 2')
+            ->setAttribute("onFocus", "setId(this.id)");
         $form->addSelect('word2_condition', '', ESearchFormOperators::$wordSelectLabels);
-        $form->addText('word3', 'Word 3');
+        $form->addText('word3', 'Word 3')
+            ->setAttribute("onFocus", "setId(this.id)");
         $form->addSelect('word3_condition', '', ESearchFormOperators::$wordSelectLabels);
 
         $form->addCheckbox('exact_match', ' Exact Match');
 
         $form->addSelect('book_condition', '', ESearchFormOperators::$selectLikeOperatorLabels)
             ->setDefaultValue(ESearchFormOperators::CONTAINS);
-        $form->addText('book', 'Book');
+        $form->addText('book', 'Book')
+            ->setAttribute("onFocus", "setId(this.id)");
         $form->addSelect('museum_condition', '', ESearchFormOperators::$selectLikeOperatorLabels)
             ->setDefaultValue(ESearchFormOperators::CONTAINS);
-        $form->addText('museum', 'Museum number');
+        $form->addText('museum', 'Museum number')
+            ->setAttribute("onFocus", "setId(this.id)");
 
         $form->addSelect('type_condition', '', ESearchFormOperators::$selectEqualsOperatorLabels)
             ->setDefaultValue(ESearchFormOperators::IS);
@@ -75,10 +81,12 @@ class TransliterationSearchForm extends Control
 
         $form->addSelect('registration_condition', '', ESearchFormOperators::$selectLikeOperatorLabels)
             ->setDefaultValue(ESearchFormOperators::CONTAINS);
-        $form->addText('registration', 'Registration / Ex. number');
+        $form->addText('registration', 'Registration / Ex. number')
+            ->setAttribute("onFocus", "setId(this.id)");
         $form->addSelect('date_condition', '', ESearchFormOperators::$selectLikeOperatorLabels)
             ->setDefaultValue(ESearchFormOperators::CONTAINS);
-        $form->addText('date', 'Date');
+        $form->addText('date', 'Date')
+            ->setAttribute("onFocus", "setId(this.id)");
 
         $form->addSubmit('submit', 'Search');
         $form->onSuccess[] = [$this, 'formSuccess'];
diff --git a/app/FrontModule/templates/Keyboard/keyboard.latte b/app/FrontModule/templates/Keyboard/keyboard.latte
new file mode 100644
index 0000000..972f046
--- /dev/null
+++ b/app/FrontModule/templates/Keyboard/keyboard.latte
@@ -0,0 +1,171 @@
+<div class="card" style="width: 24.5rem;">
+    <div class="card-body">
+        <div id="keyboard">
+            <div class="display-5" style="margin-bottom: 0.5rem;">Keyboard</div>
+            <div class="cont">
+                <div id="keyboard-div">
+                    <table>
+                        <tbody>
+                        <tr>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="á"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="é"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="í"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ú"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td></td>
+                            <td></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Á"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="É"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Í"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ú"
+                                       onclick="keyboardRead(this.value)"></td>
+                        </tr>
+                        <tr>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="à"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="è"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ì"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ù"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ò"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="À"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="È"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ì"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ù"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ò"
+                                       onclick="keyboardRead(this.value)"></td>
+                        </tr>
+                        <tr>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="â"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ê"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="î"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="û"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ô"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Â"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ê"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Û"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ô"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="⌈"
+                                       onclick="keyboardRead(this.value)">
+                                <input class="btn btn-sm btn-outline-dark" type="button" value="⌉"
+                                       onclick="keyboardRead(this.value)"></td>
+                        </tr>
+
+
+                        <tr>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ā"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ē"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ī"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ū"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ō"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ā"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ē"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ī"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ū"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ō"
+                                       onclick="keyboardRead(this.value)"></td>
+                        </tr>
+                        <tr>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ʾ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ʿ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ṣ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="š"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ṭ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ḫ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ṣ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Š"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ṭ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="Ḫ"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="["
+                                       onclick="keyboardRead(this.value)">
+                                <input class="btn btn-sm btn-outline-dark" type="button" value="]"
+                                       onclick="keyboardRead(this.value)"></td>
+                        </tr>
+                        <tr>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₁"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₂"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₃"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₄"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₅"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₆"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₇"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₈"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₉"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="₀"
+                                       onclick="keyboardRead(this.value)"></td>
+                            <td><input class="btn btn-sm btn-outline-dark" type="button" value="ｘ"
+                                       onclick="keyboardRead(this.value)"></td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+    let lastFocused;
+    let cur_id;
+
+    function setId(id) {
+        cur_id = id;
+    }
+
+    function keyboardRead(val){
+        document.getElementById(cur_id).value = document.getElementById(cur_id).value+val;
+    }
+</script>
\ No newline at end of file
diff --git a/app/FrontModule/templates/Transliteration/search.latte b/app/FrontModule/templates/Transliteration/search.latte
index 1beae78..00bf224 100644
--- a/app/FrontModule/templates/Transliteration/search.latte
+++ b/app/FrontModule/templates/Transliteration/search.latte
@@ -2,4 +2,5 @@
     <div class="display-5">Search in transliterations</div>
     <hr>
     {control transliterationSearchForm}
+    {include "../Keyboard/keyboard.latte"}
 {/block}
\ No newline at end of file
