#451 bug fixes
This commit is contained in:
parent
5dbad7f8b9
commit
46107f3528
@ -150,7 +150,7 @@
|
||||
</p>
|
||||
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/js/bk.js?version=61"></script>
|
||||
<script src="~/js/bk.js?version=62"></script>
|
||||
<script src="~/js/jplayersupport.js"></script>
|
||||
<script src="~/js/vaabd.js?version=9"></script>
|
||||
<script src="~/dist/jplayer/jquery.jplayer.min.js"></script>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon">
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml">
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script src="/js/jquery.mark.min.js"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
font-family: 'Vazir'
|
||||
}
|
||||
</style>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="~/js/leaflet.js"></script>
|
||||
<script src="~/js/leaflet-providers.js"></script>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -238,7 +238,7 @@
|
||||
|
||||
|
||||
|
||||
<script src="~/js/bk.js?version=61"></script>
|
||||
<script src="~/js/bk.js?version=62"></script>
|
||||
<script src="~/js/jplayersupport.js"></script>
|
||||
<script src="~/js/vaabd.js?version=9"></script>
|
||||
<script src="~/dist/jplayer/jquery.jplayer.min.js"></script>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
function editBanner(bannerId) {
|
||||
var url = '?handler=Edit';
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
});
|
||||
</script>
|
||||
<script src="/lib/diff.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
function compareCorrectionBlocks(originalElemenyId, editedElementId, resultElementId) {
|
||||
var a = document.getElementById(originalElemenyId);
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=61"></script>
|
||||
<script src="/js/bk.js?version=62"></script>
|
||||
<script>
|
||||
var cookieValue = getCookie("playerScrollLock");
|
||||
var playerScrollLock = cookieValue === "true";
|
||||
|
||||
@ -243,7 +243,11 @@
|
||||
|
||||
@if (Model.IsCatPage || Model.IsPoetPage)
|
||||
{
|
||||
<div class="tabcontent related-images-frame" id="tools" style="display:block">
|
||||
<div class="tabcontent related-images-frame" id="words">
|
||||
<div class="century cursor-pointer" id="load-word-counts" onclick="loadWordCounts(@Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id, false)">
|
||||
برای بارگذاری بسامد واژٰگان کلیک کنید.
|
||||
</div>
|
||||
|
||||
<div id="wordcounts-placeholder">
|
||||
@if (Model.CategoryWordsCounts != null)
|
||||
{
|
||||
@ -252,12 +256,6 @@
|
||||
</text>
|
||||
}
|
||||
</div>
|
||||
@if (
|
||||
Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0
|
||||
)
|
||||
{
|
||||
<div id="catmap"></div>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
@ -337,6 +335,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@if (
|
||||
Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0
|
||||
)
|
||||
{
|
||||
<div id="catmap"></div>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1531,6 +1531,16 @@ function reloadWordCounts(catId, poetId, remStopWords) {
|
||||
loadWordCounts(catId, poetId, remStopWords);
|
||||
}
|
||||
|
||||
|
||||
function switchTabWords(evt, tabId, catId, poetId) {
|
||||
var loadButton = document.getElementById("load-word-counts");
|
||||
if (loadButton != null) {
|
||||
loadButton.remove();
|
||||
loadWordCounts(catId, poetId, false);
|
||||
}
|
||||
|
||||
switchTab(evt, tabId);
|
||||
}
|
||||
function loadWordCounts(catId, poetId, remStopWords) {
|
||||
var divParent = document.getElementById('wordcounts-placeholder');
|
||||
var imgElementId = 'loadingwordcountsimg';
|
||||
@ -1543,7 +1553,7 @@ function loadWordCounts(catId, poetId, remStopWords) {
|
||||
},
|
||||
success: function (data) {
|
||||
document.getElementById("remove-this-wordcounts").remove();
|
||||
if (document.getElementById("percent-button") != null) {
|
||||
if (document.getElementById("load-word-counts") != null) {
|
||||
document.getElementById("percent-button").style.display = 'inline-block';
|
||||
}
|
||||
$(data).appendTo(divParent);
|
||||
|
||||
@ -113,7 +113,8 @@ namespace RMuseum.Services.Implementation
|
||||
|
||||
try
|
||||
{
|
||||
var tags = await _context.PoemGeoDateTags.AsNoTracking().Include(t => t.Location).Include(t => t.Person).Where(t => t.PoemId == poemId)
|
||||
var tags = await _context.PoemGeoDateTags.AsNoTracking().Include(t => t.Location).Include(t => t.Person)
|
||||
.Where(t => t.PoemId == poemId && t.MachineGenerated == false)
|
||||
.OrderBy(t => t.LunarDateTotalNumber)
|
||||
.ThenBy(t => t.Id)
|
||||
.ToArrayAsync();
|
||||
@ -139,7 +140,8 @@ namespace RMuseum.Services.Implementation
|
||||
{
|
||||
var cat = await _context.GanjoorCategories.AsNoTracking().Where(c => c.Id == catId).SingleAsync();
|
||||
|
||||
var tags = await _context.PoemGeoDateTags.AsNoTracking().Include(t => t.Location).Include(t => t.Poem).Where(t => t.Poem.CatId == catId && t.IgnoreInCategory == false)
|
||||
var tags = await _context.PoemGeoDateTags.AsNoTracking().Include(t => t.Location).Include(t => t.Poem)
|
||||
.Where(t => t.Poem.CatId == catId && t.MachineGenerated == false && t.IgnoreInCategory == false)
|
||||
.OrderBy(t => t.LunarDateTotalNumber)
|
||||
.ThenBy(t => t.PoemId)
|
||||
.ToArrayAsync();
|
||||
|
||||
@ -398,7 +398,7 @@ namespace RMuseum.Services.Implementation
|
||||
stats = $"{LanguageUtils.FormatMoney(sumRhythmsCouplets - secondMetreCoupletCount)} بیت شعر موجود";
|
||||
}
|
||||
|
||||
string htmlText = "<div class=\"tabcontent\" id=\"stats\">";
|
||||
string htmlText = "<div class=\"tabcontent\" id=\"stats\" style=\"display:block\">";
|
||||
|
||||
htmlText += $"<div id=\"stats-section\">{Environment.NewLine}";
|
||||
|
||||
|
||||
@ -330,19 +330,8 @@ namespace RMuseum.Services.Implementation
|
||||
}
|
||||
}
|
||||
|
||||
html += "<div id=\"pretab\"></div>";
|
||||
html += "<div class=\"tab\" id=\"tab-items\">";
|
||||
html += "<button class=\"tablinks active\" onclick=\"switchTab(event, 'tools')\">اطّلاعات</button>";
|
||||
html += "<button class=\"tablinks\" onclick=\"switchTab(event, 'stats')\">آمار</button>";
|
||||
html += "<button class=\"tablinks\" onclick=\"switchTab(event, 'quoteds')\">مشق شعر</button>";
|
||||
html += $"<button class=\"tablinks\" onclick=\"switchToCatTab(event, 'recitations', {cat.Id})\">خوانشها</button>";
|
||||
if(cat.ParentId == null)
|
||||
{
|
||||
html += "<button class=\"tablinks\" onclick=\"switchTab(event, 'photos')\">تصاویر چهره</button>";
|
||||
html += "<button class=\"tablinks\" onclick=\"switchTab(event, 'papersources')\">منابع کاغذی</button>";
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
|
||||
html = _AddTabs(html, cat);
|
||||
|
||||
if (cat.ParentId == null)
|
||||
{
|
||||
@ -351,6 +340,7 @@ namespace RMuseum.Services.Implementation
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
html += $"<p>دیگر صفحات مرتبط با {poet.Nickname} در این پایگاه:</p>{Environment.NewLine}";
|
||||
// do not include stats pages
|
||||
@ -707,6 +697,8 @@ namespace RMuseum.Services.Implementation
|
||||
html += $"</p>{Environment.NewLine}";
|
||||
}
|
||||
|
||||
|
||||
html = _AddTabs(html, cat);
|
||||
html += await _GetCategoryStatsPage(poet.Id, catId, rhythms, context);
|
||||
|
||||
return new RServiceResult<string>(html);
|
||||
@ -717,6 +709,24 @@ namespace RMuseum.Services.Implementation
|
||||
}
|
||||
}
|
||||
|
||||
private string _AddTabs(string html, GanjoorCat cat)
|
||||
{
|
||||
html += $"<div id=\"pretab\"></div>{Environment.NewLine}";
|
||||
html += $"<div class=\"tab\" id=\"tab-items\">{Environment.NewLine}";
|
||||
html += $"<button class=\"tablinks active\" onclick=\"switchTab(event, 'stats')\">آمار</button> {Environment.NewLine}";
|
||||
html += $"<button class=\"tablinks\" onclick=\"switchTabWords(event, 'words', {cat.Id}, {cat.PoetId})\">واژگان</button> {Environment.NewLine}";
|
||||
html += $"<button class=\"tablinks\" onclick=\"switchToCatTab(event, 'recitations', {cat.Id})\">خوانشها</button>{Environment.NewLine}";
|
||||
if (cat.ParentId == null)
|
||||
{
|
||||
html += $"<button class=\"tablinks\" onclick=\"switchTab(event, 'quoteds')\">مشق شعر</button> {Environment.NewLine}";
|
||||
html += $"<button class=\"tablinks\" onclick=\"switchTab(event, 'photos')\">تصاویر چهره</button> {Environment.NewLine}";
|
||||
html += $"<button class=\"tablinks\" onclick=\"switchTab(event, 'papersources')\">منابع کاغذی</button> {Environment.NewLine}";
|
||||
}
|
||||
|
||||
html += $"</div> {Environment.NewLine}";
|
||||
return html;
|
||||
}
|
||||
|
||||
private async Task _GeneratingSubCatsTOC(Guid userId, RMuseumDbContext context, LongRunningJobProgressServiceEF jobProgressServiceEF, RLongRunningJobStatus job, int catId, GanjoorTOC ganjoorTOC)
|
||||
{
|
||||
foreach (var cat in await context.GanjoorCategories.AsNoTracking().Where(c => c.ParentId == catId).ToListAsync())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user