Zbavení se deprecated věci
This commit is contained in:
parent
4006ecd6b8
commit
4a35a63f31
1 changed files with 3 additions and 5 deletions
|
@ -5,7 +5,7 @@
|
||||||
<input type=submit value="Oprav!"/>
|
<input type=submit value="Oprav!"/>
|
||||||
<button type="button" onclick="close_commform()">Zavřít</button>
|
<button type="button" onclick="close_commform()">Zavřít</button>
|
||||||
<br/>
|
<br/>
|
||||||
<textarea onkeypress="textarea_onkey(event);" id="commform-text" cols=40 rows=10 name="txt"></textarea>
|
<textarea id="commform-text" cols=40 rows=10 name="txt"></textarea>
|
||||||
<br/>
|
<br/>
|
||||||
<input type="hidden" size="3" id="commform-x" name="x"/>
|
<input type="hidden" size="3" id="commform-x" name="x"/>
|
||||||
<input type="hidden" size="3" id="commform-y" name="y"/>
|
<input type="hidden" size="3" id="commform-y" name="y"/>
|
||||||
|
@ -17,17 +17,15 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// ctrl-enter submits form
|
// ctrl-enter submits form
|
||||||
function textarea_onkey(ev)
|
document.getElementById("commform-text").addEventListener("keydown", ev =>
|
||||||
{
|
{
|
||||||
if( (ev.keyCode == 13 || ev.keyCode == 10 ) && ev.ctrlKey ) {
|
if( (ev.keyCode == 13 || ev.keyCode == 10 ) && ev.ctrlKey ) {
|
||||||
var form = document.getElementById('commform');
|
var form = document.getElementById('commform');
|
||||||
if( form ) {
|
if( form ) {
|
||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
|
|
||||||
//hide comment form
|
//hide comment form
|
||||||
function close_commform() {
|
function close_commform() {
|
||||||
|
|
Loading…
Reference in a new issue