mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Merge pull request #228 from benwrighton/master
This commit is contained in:
commit
b90ec7715e
@ -81,11 +81,16 @@
|
|||||||
$( ".comment-reply-link" ).entwine({
|
$( ".comment-reply-link" ).entwine({
|
||||||
onclick: function( e ) {
|
onclick: function( e ) {
|
||||||
var allForms = $( ".comment-reply-form-holder" ),
|
var allForms = $( ".comment-reply-form-holder" ),
|
||||||
formID = $( this ).prop('href').replace(/^[^#]*#/, '#'),
|
formID = '#' + $( this ).attr('aria-controls');
|
||||||
form = $(formID).closest('.comment-reply-form-holder');
|
form = $(formID).closest('.comment-reply-form-holder');
|
||||||
|
|
||||||
|
$(this).attr('aria-expanded', function (i, attr) {
|
||||||
|
return attr == 'true' ? 'false' : 'true'
|
||||||
|
});
|
||||||
|
|
||||||
// Prevent focus
|
// Prevent focus
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
if(form.is(':visible')) {
|
if(form.is(':visible')) {
|
||||||
allForms.slideUp();
|
allForms.slideUp();
|
||||||
} else {
|
} else {
|
||||||
|
@ -33,7 +33,9 @@
|
|||||||
<% end_if %>
|
<% end_if %>
|
||||||
</div>
|
</div>
|
||||||
<% if $RepliesEnabled && $canPostComment %>
|
<% if $RepliesEnabled && $canPostComment %>
|
||||||
<a class="comment-reply-link" href="#{$ReplyForm.FormName}"><% _t('CommentsInterface_singlecomment_ss.REPLYTO','Reply to') %> $AuthorName.XML</a>
|
<button class="comment-reply-link" type="button" aria-controls="$ReplyForm.FormName" aria-expanded="false">
|
||||||
|
<% _t('CommentsInterface_singlecomment_ss.REPLYTO','Reply to') %> $AuthorName.XML
|
||||||
|
</button>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
</div>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
Loading…
Reference in New Issue
Block a user