ADD comment Ctrl+Enter
This commit is contained in:
parent
0724236e2e
commit
4c3586b3ea
|
|
@ -13,3 +13,11 @@ function noReply()
|
|||
$('#answerTo').val(0);
|
||||
$('#reply').hide(200);
|
||||
}
|
||||
|
||||
$(document).ready(function (){
|
||||
$('#commentFormTextarea').keydown(function (e) {
|
||||
if (e.ctrlKey && e.keyCode == 13) {
|
||||
$('#commentForm').submit();
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<span id="replyNick"></span>
|
||||
<span class="glyphicon glyphicon-remove btn btn-link" onclick="noReply()"></span>
|
||||
</div>
|
||||
<form action="/comments/add" method="POST">
|
||||
<form action="/comments/add" method="POST" id="commentForm">
|
||||
<input type="hidden" name="answerTo" id="answerTo" value="0" />
|
||||
<input type="hidden" name="parentType" value="<?= $parentType ?>" />
|
||||
<input type="hidden" name="parentId" value="<?= $parentId ?>" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue