Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

BUG: Staticman reply to functionality broken #243

Closed
VincentTam opened this issue Mar 10, 2021 · 0 comments · Fixed by #245
Closed

BUG: Staticman reply to functionality broken #243

VincentTam opened this issue Mar 10, 2021 · 0 comments · Fixed by #245

Comments

@VincentTam
Copy link
Collaborator

Bug Report

Describe the bug

d167a64#diff-85c25c44f14e0dffc5bd8fd39626dd2cceca217246cc929cf060eb3fe6541c13 in #154 commented out the line for getting the reply thread ID ("oldest ancestor ID").

<a class="comment-date" href="#{{ ._id }}" title="Permalink to this comment">
<time datetime="{{ .date }}">{{ dateFormat "02 Jan 06 15:04" .date }}</time>
</a>
</div>
<!-- TODO: Assess Value (ref ln#73): <a href='#{{ .replyID }}' class='reply-target'>{{ .replyName }}</a> -->
<!-- TODO: Assess Value: <span class ="comment-threadID hidden">{{ .replyThread }}</span> -->
<a class="comment-reply-btn" href="#say-something">{{ i18n "reply" }}</a>
</div>
</header>

That gives empty fields[replyThread] b/c the element <span class="comment-threadID"> isn't there.

var replyThread = cmt.find('.comment-threadID').text();
$('.new-comment input[name="fields[replyThread]"]').val(replyThread);
$('.new-comment input[name="fields[replyID]"]').val(cmt.attr("id"));

Expected behavior

When the reply button is clicked, the reply target's {{ .replyThread }} ("oldest ancestor ID") is copied to fields[replyThread].

Additional context

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant