mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 07:13:08 +02:00
Some minor bug fixes in the FieldtypeComments classes and javascript.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
* @property-read int $depth Current comment depth (since 3.0.149)
|
||||
* @property-read bool $loaded True when comment is fully loaded from DB (since 3.0.149)
|
||||
* @property-read int $numChildren Number of children with no exclusions. See and use numChildren() method for more options. (since 3.0.154)
|
||||
* @property-read User $createdUser User that created the comment
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -111,20 +111,20 @@ class CommentFormCustom extends CommentForm {
|
||||
<label class='{notify.input.label.class}'>
|
||||
<input class='{notify.input.class}' type='radio' name='{notify.input.name}' checked='checked' value='{notify.input.off.value}' />
|
||||
{notify.input.off.label}
|
||||
<label>
|
||||
</label>
|
||||
|
||||
{if.notify.replies}
|
||||
<label class='{notify.input.label.class}'>
|
||||
<input class='{notify.input.class}' type='radio' name='{notify.input.name}' value='{notify.input.replies.value}' />
|
||||
{notify.input.replies.label}
|
||||
<label>
|
||||
</label>
|
||||
{endif.notify.replies}
|
||||
|
||||
{if.notify.all}
|
||||
<label class='{notify.input.label.class}'>
|
||||
<input class='{notify.input.class}' type='radio' name='{notify.input.name}' value='{notify.input.all.value}' />
|
||||
{notify.input.all.label}
|
||||
<label>
|
||||
</label>
|
||||
{endif.notify.all}
|
||||
</p>
|
||||
{endif.notify}
|
||||
|
@@ -129,23 +129,28 @@ function CommentActionReplyClick() {
|
||||
// clone the main CommentForm
|
||||
$form = jQuery('#CommentForm form').clone().removeAttr('id');
|
||||
$form.addClass('CommentForm' + commentID);
|
||||
$form.hide().find('.CommentFormParent').val($(this).attr('data-comment-id'));
|
||||
var $formPlaceholder = $item.find('form:eq(0)');
|
||||
$form.hide().find('.CommentFormParent').val(commentID);
|
||||
var $formPlaceholder = $item.find('form:not(.CommentFormReply):eq(0)');
|
||||
if($formPlaceholder.length) {
|
||||
// use existing <form></form> placed in there as optional target for reply form
|
||||
$formPlaceholder.replaceWith($form);
|
||||
} else {
|
||||
$this.parent().after($form);
|
||||
}
|
||||
$form.addClass('CommentFormReply');
|
||||
if($form.is('form[hidden]')) {
|
||||
$form.removeAttr('hidden');
|
||||
} else if(!$form.is(':visible')) {
|
||||
$form.slideDown();
|
||||
}
|
||||
$form.trigger('CommentFormReplyAdd');
|
||||
$form.trigger('CommentFormReplyShow');
|
||||
} else if(!$form.is(':visible')) {
|
||||
$form.slideDown();
|
||||
$form.trigger('CommentFormReplyShow');
|
||||
} else {
|
||||
$form.slideUp();
|
||||
$form.trigger('CommentFormReplyHide');
|
||||
}
|
||||
|
||||
return false;
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user