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!"/>
|
||||
<button type="button" onclick="close_commform()">Zavřít</button>
|
||||
<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/>
|
||||
<input type="hidden" size="3" id="commform-x" name="x"/>
|
||||
<input type="hidden" size="3" id="commform-y" name="y"/>
|
||||
|
@ -17,17 +17,15 @@
|
|||
|
||||
<script>
|
||||
// ctrl-enter submits form
|
||||
function textarea_onkey(ev)
|
||||
document.getElementById("commform-text").addEventListener("keydown", ev =>
|
||||
{
|
||||
if( (ev.keyCode == 13 || ev.keyCode == 10 ) && ev.ctrlKey ) {
|
||||
var form = document.getElementById('commform');
|
||||
if( form ) {
|
||||
form.submit();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
//hide comment form
|
||||
function close_commform() {
|
||||
|
|
Loading…
Reference in a new issue