Comments on pressing enter added
This commit is contained in:
parent
2281e8d1e8
commit
8de2871cb4
2 changed files with 24 additions and 0 deletions
|
@ -1729,12 +1729,32 @@ function decode64(input) {
|
|||
|
||||
}
|
||||
|
||||
function comment_onEnter() {
|
||||
$('textarea').bind("enterKey",function(e){
|
||||
});
|
||||
$('textarea').keyup(function(e){
|
||||
if(e.keyCode == 13 && !e.shiftKey)
|
||||
{
|
||||
add_comment_js('comment_form','{$type}','$vdo.video_id');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function add_comment_js(form_id,type)
|
||||
{
|
||||
$("#add_comment_result").css("display","block");
|
||||
$("#add_comment_button").val('Uploading...');
|
||||
$("#add_comment_button").attr("disabled",true);
|
||||
$(".add-reply").attr("disabled",true);
|
||||
|
||||
$('textarea').bind("enterKey",function(e){
|
||||
});
|
||||
$('textarea').keyup(function(e){
|
||||
if(e.keyCode == 13 && !e.shiftKey)
|
||||
{
|
||||
add_comment_js('comment_form','{$type}','$vdo.video_id');
|
||||
}
|
||||
});
|
||||
|
||||
//var captcha_enabled = $("#" + form_id + " input:#cb_captcha_enabled").val();
|
||||
|
||||
|
@ -1775,6 +1795,7 @@ function decode64(input) {
|
|||
$('.no-comments').remove();
|
||||
get_the_comment(data.cid,data.type_id,"#comments-ul");
|
||||
}
|
||||
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
|
|
@ -60,3 +60,6 @@
|
|||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
comment_onEnter();
|
||||
</script>
|
Loading…
Add table
Reference in a new issue