To support note deletion
This commit is contained in:
@ -332,7 +332,7 @@ class AjaxController extends AbstractController
|
||||
return $res;
|
||||
}
|
||||
|
||||
#[Route('/discard-note', name: 'app_discard_note', methods: ['POST'])]
|
||||
#[Route('/delete-note', name: 'app_discard_note', methods: ['POST'])]
|
||||
public function discardNote(Request $req, EntityManagerInterface $emi): Response
|
||||
{
|
||||
$data = json_decode($req->getContent());
|
||||
|
@ -169,6 +169,9 @@ class Note implements JsonSerializable
|
||||
{
|
||||
return "<a href='#' onclick=\"retrieveNote('{$this->id}')\">".
|
||||
$this->title.
|
||||
"</a> ".
|
||||
"<a href='#' onclick=\"deleteNote('{$this->id}', this)\">".
|
||||
"<i class='fas fa-trash-alt'></i>".
|
||||
"</a>".
|
||||
(
|
||||
$this->recording ? "<br/>".
|
||||
@ -180,7 +183,7 @@ class Note implements JsonSerializable
|
||||
|
||||
public function toTableRow(): string
|
||||
{
|
||||
return "<tr>".
|
||||
return "<tr data-id='row-{$this->id->toHex()}'>".
|
||||
"<td>{$this->toLink()}</td>".
|
||||
"<td>{$this->speaker->getName()}</td>".
|
||||
"<td>{$this->passage}</td>".
|
||||
|
Reference in New Issue
Block a user