docs: #351 retrieving user selected rhyme letters and sending it to the service
This commit is contained in:
parent
f4728ea209
commit
a116400f06
@ -52,7 +52,17 @@ else
|
||||
return;
|
||||
}
|
||||
|
||||
if (breakFromVIndices.length == 0 && $('#rhythm-old').text() == $('#rhythm-new').val()) {
|
||||
var rhythm_new = $('#rhythm-new').val();
|
||||
if (rhythm_new == $('#rhythm-old').text()) {
|
||||
rhythm_new = null;
|
||||
}
|
||||
|
||||
var rhyme_letters = $('#rhyme-letters').val();
|
||||
if (rhyme_letters == $('#rhyme-letters-old').text()) {
|
||||
rhyme_letters = null;
|
||||
}
|
||||
|
||||
if (breakFromVIndices.length == 0 && rhythm_new == null && rhyme_letters == null) {
|
||||
alert('شما هیچ تغییری در متن ندادهاید!');
|
||||
return;
|
||||
}
|
||||
@ -60,11 +70,6 @@ else
|
||||
$('#savecorrections').hide();
|
||||
$('#saving').text('در حال ذخیره ...');
|
||||
|
||||
var rhythm_new = $('#rhythm-new').val();
|
||||
if (rhythm_new == $('#rhythm-old').text()) {
|
||||
rhythm_new = null;
|
||||
}
|
||||
|
||||
|
||||
var url = '?handler=SendSectionCorrections';
|
||||
|
||||
@ -74,6 +79,7 @@ else
|
||||
data: {
|
||||
sectionId: id,
|
||||
rhythm: rhythm_new,
|
||||
rhyme: rhyme_letters,
|
||||
breakFromVIndices: breakFromVIndices,
|
||||
note: $('#note').val()
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ namespace GanjooRazor.Areas.User.Pages
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostSendSectionCorrectionsAsync(int sectionId, string rhythm, int[] breakFromVIndices, string note)
|
||||
public async Task<IActionResult> OnPostSendSectionCorrectionsAsync(int sectionId, string rhythm, string rhyme, int[] breakFromVIndices, string note)
|
||||
{
|
||||
using (HttpClient secureClient = new HttpClient())
|
||||
{
|
||||
@ -271,6 +271,7 @@ namespace GanjooRazor.Areas.User.Pages
|
||||
{
|
||||
SectionId = sectionId,
|
||||
Rhythm = rhythm,
|
||||
RhymeLetters = rhyme,
|
||||
BreakFromVerse1VOrder = breakFromVerse1VOrder,
|
||||
BreakFromVerse2VOrder = breakFromVerse2VOrder,
|
||||
BreakFromVerse3VOrder = breakFromVerse3VOrder,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user