Add 'reply to comment' processing
This commit is contained in:
parent
e80c99ad74
commit
31e04378cd
@ -231,6 +231,9 @@ function handle_comment_form(e) {
|
|||||||
$('#' + emptyCommentElm).removeAttr('tabindex');
|
$('#' + emptyCommentElm).removeAttr('tabindex');
|
||||||
$('#' + emptySubmitElm).removeAttr('tabindex');
|
$('#' + emptySubmitElm).removeAttr('tabindex');
|
||||||
form.find(':not(.comment-edit-text)').hide();
|
form.find(':not(.comment-edit-text)').hide();
|
||||||
|
form.find(':input[name=parent]').val(emptyCommentElm.replace(/\D/g,''));
|
||||||
|
var btn = form.find(':button[type=submit]').html();
|
||||||
|
form.find(':button[type=submit]').html(btn.replace(/<[^>]*>/g, '').trim());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1140,6 +1143,16 @@ function dolike(ident, verb) {
|
|||||||
liking = 1;
|
liking = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doreply(parent, ident, owner) {
|
||||||
|
form = $('#comment-edit-form-' + parent.toString());
|
||||||
|
form.find('input[name=parent]').val(ident);
|
||||||
|
var btn = form.find('button[type=submit]').html();
|
||||||
|
form.find('button[type=submit]').html('<i class="fa fa-reply" ></i> ' + btn);
|
||||||
|
taid = '#comment-edit-text-' + parent.toString();
|
||||||
|
$(taid).val("@{" + owner + "}\n");
|
||||||
|
$(taid).focus();
|
||||||
|
}
|
||||||
|
|
||||||
function doprofilelike(ident, verb) {
|
function doprofilelike(ident, verb) {
|
||||||
$.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; });
|
$.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; });
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user