#414 changing character counting scope to verses
This commit is contained in:
parent
84555cbf10
commit
0c5d4d5bad
@ -35,7 +35,7 @@
|
||||
}
|
||||
</table>
|
||||
|
||||
@foreach(var verse in Model.Verses.Where(v => !string.IsNullOrEmpty(v.CoupletSummary)).ToList())
|
||||
@foreach (var verse in Model.Verses.Where(v => !string.IsNullOrEmpty(v.CoupletSummary)).ToList())
|
||||
{
|
||||
<div id="summary-block-@Model.CoupletIndex-@verse.VOrder" class="width-100per">
|
||||
<div class="notice">
|
||||
@ -68,7 +68,7 @@
|
||||
@if (Model.LoggedIn)
|
||||
{
|
||||
<a role="button" id="bookmark-@Model.CoupletIndex" class="cursor-pointer" onclick="switchBookmark(@Model.PoemId, @Model.CoupletIndex, '-@Model.CoupletIndex')" title="@Model.BookmarkingText"><i class="material-icons color-white" id="bookmark-icon-@Model.CoupletIndex">@Model.BookmarkingIcon</i></a>
|
||||
|
||||
|
||||
<a role="button" id="editcouplet-@Model.CoupletIndex" class="cursor-pointer" onclick="editCouplet(@Model.PoemId, @Model.CoupletIndex, 'tr')" title="ویرایش از اینجا"><i class="material-icons color-white">edit</i></a>
|
||||
<a role="button" id="editcoupletsummary-@Model.CoupletIndex" class="cursor-pointer" onclick="editCouplet(@Model.PoemId, @Model.CoupletIndex, 'summary')" title="نوشتن معنی به زبان ساده"><i class="material-icons color-white">edit_note</i></a>
|
||||
}
|
||||
@ -89,25 +89,22 @@
|
||||
</div>
|
||||
|
||||
<div id="letters-stat-@Model.CoupletIndex">
|
||||
|
||||
@{
|
||||
var coupletText = "";
|
||||
foreach (var verse in Model.Verses)
|
||||
{
|
||||
coupletText += RMuseum.Services.Implementation.LanguageUtils.MakeTextSearchable(verse.Text);
|
||||
coupletText += " ";
|
||||
}
|
||||
coupletText = coupletText.Trim();
|
||||
|
||||
|
||||
@foreach (var verse in Model.Verses)
|
||||
{
|
||||
var verseTextSearchable = RMuseum.Services.Implementation.LanguageUtils.MakeTextSearchable(verse.Text);
|
||||
|
||||
<div class="century">
|
||||
شمار نویسهها (از @verseTextSearchable.Replace(" ", "").Length.ToPersianNumbers() نویسه)
|
||||
</div>
|
||||
<div id="letters-stat-sourceStringContainer-@verse.Id" class="notice">@verseTextSearchable</div>
|
||||
<div id="letters-stat-resultTableContainer-@verse.Id" class="charContainer"></div>
|
||||
<script>
|
||||
countAndDisplayCharacters('@verseTextSearchable', 'letters-stat-resultTableContainer-@verse.Id', 'letters-stat-sourceStringContainer-@verse.Id');
|
||||
</script>
|
||||
}
|
||||
<div class="century">
|
||||
شمار نویسهها (از @coupletText.Replace(" ", "").Length.ToPersianNumbers() نویسه)
|
||||
</div>
|
||||
<div id="letters-stat-sourceStringContainer-@Model.CoupletIndex" class="notice">@coupletText</div>
|
||||
<div id="letters-stat-resultTableContainer-@Model.CoupletIndex" class="charContainer"></div>
|
||||
<script>
|
||||
countAndDisplayCharacters('@coupletText', 'letters-stat-resultTableContainer-@Model.CoupletIndex', 'letters-stat-sourceStringContainer-@Model.CoupletIndex');
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -123,10 +120,10 @@
|
||||
var userNotifiedOnEditInsteadOfComment = false;
|
||||
|
||||
function createInformationNotification() {
|
||||
tinymce.activeEditor.notificationManager.open({
|
||||
text: 'تمنا میکنیم که به جای گوشزد کردن خطاهای املایی و تایپی در حاشیهها از دکمهٔ «ویرایش» استفاده کنید و خطا را تصحیح کنید.',
|
||||
type: 'info'
|
||||
});
|
||||
tinymce.activeEditor.notificationManager.open({
|
||||
text: 'تمنا میکنیم که به جای گوشزد کردن خطاهای املایی و تایپی در حاشیهها از دکمهٔ «ویرایش» استفاده کنید و خطا را تصحیح کنید.',
|
||||
type: 'info'
|
||||
});
|
||||
}
|
||||
tinymce.init({
|
||||
selector: 'textarea.editorbnum',
|
||||
@ -143,20 +140,20 @@
|
||||
skin: (window.matchMedia("(prefers-color-scheme: dark)").matches && localStorage.getItem("scheme") != "light" ? "oxide-dark" : localStorage.getItem("scheme") == "dark" ? "oxide-dark" : ""),
|
||||
content_css: (window.matchMedia("(prefers-color-scheme: dark)").matches && localStorage.getItem("scheme") != "light" ? "dark" : localStorage.getItem("scheme") == "dark" ? "dark" : ""),
|
||||
setup: function (editor) {
|
||||
editor.on('tap', function(e) {
|
||||
if(userNotifiedOnEditInsteadOfComment == false){
|
||||
userNotifiedOnEditInsteadOfComment = true;
|
||||
createInformationNotification();
|
||||
}
|
||||
},
|
||||
);
|
||||
editor.on('click', function(e) {
|
||||
if(userNotifiedOnEditInsteadOfComment == false){
|
||||
userNotifiedOnEditInsteadOfComment = true;
|
||||
createInformationNotification();
|
||||
}
|
||||
},
|
||||
);
|
||||
editor.on('tap', function (e) {
|
||||
if (userNotifiedOnEditInsteadOfComment == false) {
|
||||
userNotifiedOnEditInsteadOfComment = true;
|
||||
createInformationNotification();
|
||||
}
|
||||
},
|
||||
);
|
||||
editor.on('click', function (e) {
|
||||
if (userNotifiedOnEditInsteadOfComment == false) {
|
||||
userNotifiedOnEditInsteadOfComment = true;
|
||||
createInformationNotification();
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user