#268 UI finished

This commit is contained in:
Hamid Reza Mohammadi 2021-12-31 11:26:29 +03:30
parent 0d90b23326
commit 6dff06b8c1
2 changed files with 19 additions and 2 deletions

View File

@ -11,10 +11,27 @@
{
<p>@Model.LastMessage</p>
}
else
else if(Model.Rhythms != null && Model.Poem != null)
{
<form method="post">
<table>
<tr>
<td>
<input type="text" id="select-search" value = "" oninput = "doSearchInMetreCombo()" />
<script>
function doSearchInMetreCombo(){
var value = document.getElementById('select-search').value;
var options = document.getElementById('Poem_GanjoorMetre_Rhythm').options
for(var i=0; i < options.length; i++){
if(options[i].value.indexOf(value) != -1){
document.getElementById('Poem_GanjoorMetre_Rhythm').value = options[i].value;
break;
}
}
}
</script>
</td>
</tr>
<tr>
<td>
<select asp-for="Poem.GanjoorMetre.Rhythm" style="width: 500px">

View File

@ -92,7 +92,7 @@ namespace GanjooRazor.Areas.Admin.Pages
LastMessage = "وزنی انتخاب نشده.";
return Page();
}
var response = await secureClient.PostAsync($"{APIRoot.Url}/api/ganjoor/probablemetre/save/{probableRecordId}",
var response = await secureClient.PutAsync($"{APIRoot.Url}/api/ganjoor/probablemetre/save/{probableRecordId}",
new StringContent(JsonConvert.SerializeObject(metre), Encoding.UTF8, "application/json")
);