From c9ba4cdd623f7ef7f61cfd6541c51094c6b0b1ae Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Wed, 1 Dec 2021 19:25:43 +0330 Subject: [PATCH] #250 showing hidden recitations button now works --- GanjooRazor/Pages/_AudioPlayerPartial.cshtml | 2 +- GanjooRazor/Pages/_AudioPlayerPartial.cshtml.cs | 2 +- GanjooRazor/wwwroot/css/p8.css | 2 +- GanjooRazor/wwwroot/js/bk.js | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/GanjooRazor/Pages/_AudioPlayerPartial.cshtml b/GanjooRazor/Pages/_AudioPlayerPartial.cshtml index 9213b077..c00d3279 100644 --- a/GanjooRazor/Pages/_AudioPlayerPartial.cshtml +++ b/GanjooRazor/Pages/_AudioPlayerPartial.cshtml @@ -39,7 +39,7 @@ @if (nRecitationIndex == 4 && Model.Recitations.Length > 5) { - همهٔ خوانش‌هاautorenew + همهٔ خوانش‌هاautorenew } } diff --git a/GanjooRazor/Pages/_AudioPlayerPartial.cshtml.cs b/GanjooRazor/Pages/_AudioPlayerPartial.cshtml.cs index 3452f97e..88231894 100644 --- a/GanjooRazor/Pages/_AudioPlayerPartial.cshtml.cs +++ b/GanjooRazor/Pages/_AudioPlayerPartial.cshtml.cs @@ -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"; } } } diff --git a/GanjooRazor/wwwroot/css/p8.css b/GanjooRazor/wwwroot/css/p8.css index 0952ce52..4f54d3c2 100644 --- a/GanjooRazor/wwwroot/css/p8.css +++ b/GanjooRazor/wwwroot/css/p8.css @@ -1132,6 +1132,6 @@ ol { } -.hidden-item { +.hidden-recitation { display: none; } \ No newline at end of file diff --git a/GanjooRazor/wwwroot/js/bk.js b/GanjooRazor/wwwroot/js/bk.js index c6754e7d..749d3725 100644 --- a/GanjooRazor/wwwroot/js/bk.js +++ b/GanjooRazor/wwwroot/js/bk.js @@ -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'; } \ No newline at end of file