docs: #293 breaking poems UI changes

This commit is contained in:
Hamid Reza Mohammadi 2022-03-19 20:03:25 +03:30
parent 4cb59a2a06
commit 3f51c73448
2 changed files with 30 additions and 28 deletions

View File

@ -27,6 +27,35 @@
function resetRhythm() {
document.getElementById('rhythm-new').value = '';
}
function breakPoem(poemId, vOrder, vText) {
if (!confirm(vText))
return;
$('#breakpoem-' + String(vOrder)).hide();
var url = '?handler=BreakPoem';
$.ajax({
type: "POST",
url: url,
data: {
poemId: poemId,
vOrder: vOrder
},
success: function (id) {
location.href = '/?p=' + String(id);
},
error: function (e) {
if (e.responseText == null)
alert(e);
else
alert(e.responseText);
$('#breakpoem-' + String(vOrder)).show();
}
});
}
</script>
@if (!string.IsNullOrEmpty(Model.FatalError))
{
@ -247,7 +276,7 @@ else
</td>
</tr>
@if (Model.CanEdit && Model.PageInformation.Poem.Next == null && verse.VersePosition != RMuseum.Models.Ganjoor.VersePosition.Left)
@if (Model.CanEdit && verse.VersePosition != RMuseum.Models.Ganjoor.VersePosition.Left)
{
<tr>
<td>

View File

@ -218,33 +218,6 @@
}
function breakPoem(poemId, vOrder, vText) {
if (!confirm(vText))
return;
$('#breakpoem-' + String(vOrder)).hide();
var url = '?handler=BreakPoem';
$.ajax({
type: "POST",
url: url,
data: {
poemId: poemId,
vOrder: vOrder
},
success: function (id) {
location.href = '/?p=' + String(id);
},
error: function (e) {
if (e.responseText == null)
alert(e);
else
alert(e.responseText);
$('#breakpoem-' + String(vOrder)).show();
}
});
}
</script>
</head>