#250 showing hidden recitations button now works
This commit is contained in:
parent
ec591172cb
commit
c9ba4cdd62
@ -39,7 +39,7 @@
|
||||
|
||||
@if (nRecitationIndex == 4 && Model.Recitations.Length > 5)
|
||||
{
|
||||
<a role="button" class="pagebutton" id="load-all-recitations" onclick="">همهٔ خوانشها<i class="info-buttons">autorenew</i></a>
|
||||
<a role="button" class="pagebutton" id="load-all-recitations" onclick="showAllRecitations()">همهٔ خوانشها<i class="info-buttons">autorenew</i></a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@ -43,7 +43,7 @@ namespace GanjooRazor.Pages
|
||||
|
||||
public string CSSClass(int recitationIndex)
|
||||
{
|
||||
return recitationIndex < 5 ? "audio-player" : "hidden-item";
|
||||
return recitationIndex < 5 ? "audio-player" : "hidden-recitation";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1132,6 +1132,6 @@ ol {
|
||||
|
||||
}
|
||||
|
||||
.hidden-item {
|
||||
.hidden-recitation {
|
||||
display: none;
|
||||
}
|
||||
@ -895,4 +895,12 @@ function loadMoreRelatedFromPoet(poetId, rhythm, rhymeLetters, skipPoemFullUrl1,
|
||||
$(data).appendTo(document.getElementById(divId));
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function showAllRecitations() {
|
||||
const hiddenRecitations = document.querySelectorAll('.hidden-recitation');
|
||||
hiddenRecitations.forEach(function (recitation) {
|
||||
recitation.className = 'audio-player';
|
||||
});
|
||||
document.getElementById('load-all-recitations').style.display = 'none';
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user