diff --git a/GanjooRazor/Areas/User/Pages/Editor.cshtml b/GanjooRazor/Areas/User/Pages/Editor.cshtml index 15c40a56..1855c1cf 100644 --- a/GanjooRazor/Areas/User/Pages/Editor.cshtml +++ b/GanjooRazor/Areas/User/Pages/Editor.cshtml @@ -17,14 +17,20 @@ function savePoemCorrections(id, verseCount) { var verseOrderText = []; + var verseOrderMarkedForDelete = []; for (var i = 0; i <= verseCount; i++) { var oldElementName = '#original-' + i.toString(); var newElementName = '#id-' + i.toString(); - if ($(newElementName).text() != $(oldElementName).text()) { + var checkVIndex = '#marked-for-delete-' + i.toString(); + if ($(newElementName).text() != $(oldElementName).text() || $(checkVIndex).is(":checked")) { verseOrderText.push(i.toString() + 'TextSeparator' + $(newElementName).text()); + verseOrderMarkedForDelete.push(i); } } + + + if (verseOrderText.length == 0) { if ($('#rhythm-old').text() == $('#rhythm-new').val() && $('#rhythm-old2').text() == $('#rhythm-new2').val()) { alert('شما هیچ تغییری در متن ندادهاید!'); @@ -53,6 +59,7 @@ data: { poemid: id, verseOrderText: verseOrderText, + verseOrderMarkedForDelete: verseOrderMarkedForDelete, rhythm: rhythm_new, rhythm2: rhythm_new2, note: $('#note').val() @@ -248,7 +255,20 @@ else @if (Model.MyLastEdit.VerseOrderText != null) @foreach (var verse in Model.MyLastEdit.VerseOrderText) { -
@verse.OriginalText
+باید حذف شود
+@verse.OriginalText
@verse.Text
@verse.Text
+@correction.Title
@CorrectionReviewResultConvertor.GetString(correction.Result)
} else - @if (correction.Result == CorrectionReviewResult.Approved) + @if (correction.Result == CorrectionReviewResult.Approved) {@CorrectionReviewResultConvertor.GetString(correction.Result)
} @@ -117,12 +117,12 @@ else@correction.Rhythm
@CorrectionReviewResultConvertor.GetString(correction.RhythmResult)
} else - @if (correction.RhythmResult == CorrectionReviewResult.Approved) + @if (correction.RhythmResult == CorrectionReviewResult.Approved) {@CorrectionReviewResultConvertor.GetString(correction.RhythmResult)
} @@ -156,12 +156,12 @@ else@correction.Rhythm2
@CorrectionReviewResultConvertor.GetString(correction.Rhythm2Result)
} else - @if (correction.Rhythm2Result == CorrectionReviewResult.Approved) + @if (correction.Rhythm2Result == CorrectionReviewResult.Approved) {@CorrectionReviewResultConvertor.GetString(correction.Rhythm2Result)
} @@ -183,29 +183,58 @@ else @if (correction.VerseOrderText != null) @foreach (var verse in correction.VerseOrderText) { -@verse.OriginalText
-@verse.Text
-@CorrectionReviewResultConvertor.GetString(verse.Result)
- } - else - if (verse.Result == CorrectionReviewResult.Approved) - { -@CorrectionReviewResultConvertor.GetString(verse.Result)
- } - else - { -@CorrectionReviewResultConvertor.GetString(verse.Result)
- } -@verse.OriginalText
+باید حذف شود
+@CorrectionReviewResultConvertor.GetString(verse.MarkForDeleteResult)
+ } + else + if (verse.MarkForDeleteResult == CorrectionReviewResult.Approved) + { +@CorrectionReviewResultConvertor.GetString(verse.MarkForDeleteResult)
+ } + else + { +@CorrectionReviewResultConvertor.GetString(verse.MarkForDeleteResult)
+ } +@verse.OriginalText
+@verse.Text
+@CorrectionReviewResultConvertor.GetString(verse.Result)
+ } + else + if (verse.Result == CorrectionReviewResult.Approved) + { +@CorrectionReviewResultConvertor.GetString(verse.Result)
+ } + else + { +@CorrectionReviewResultConvertor.GetString(verse.Result)
+ } +