upd: note entity
fix js calls add recording URL to json output
This commit is contained in:
+4
-3
@@ -167,14 +167,14 @@ class Note implements JsonSerializable
|
|||||||
|
|
||||||
public function toLink(): string
|
public function toLink(): string
|
||||||
{
|
{
|
||||||
return "<a href='#' onclick=\"retrieveNote('{$this->id}')\">".
|
return "<a href='#' onclick=\"note.retrieveNote('{$this->id}')\">".
|
||||||
$this->title.
|
$this->title.
|
||||||
"</a> ".
|
"</a> ".
|
||||||
"<a href='#' onclick=\"deleteNote('{$this->id}', this)\">".
|
"<a href='#' onclick=\"note.deleteNote('{$this->id}', this)\">".
|
||||||
"<i class='fas fa-trash-alt'></i>".
|
"<i class='fas fa-trash-alt'></i>".
|
||||||
"</a>".
|
"</a>".
|
||||||
(
|
(
|
||||||
$this->recording ? "<br/>".
|
$this->recording ?
|
||||||
"<a href='{$this->recording}' target='_blank' class='recording-link'>".
|
"<a href='{$this->recording}' target='_blank' class='recording-link'>".
|
||||||
"<i class='fa fa-play-circle'></i>".
|
"<i class='fa fa-play-circle'></i>".
|
||||||
"</a>" : null
|
"</a>" : null
|
||||||
@@ -195,6 +195,7 @@ class Note implements JsonSerializable
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->getId(),
|
'id' => $this->getId(),
|
||||||
|
'recording' => $this->getRecording(),
|
||||||
'link' => $this->toLink(),
|
'link' => $this->toLink(),
|
||||||
'title' => $this->getTitle(),
|
'title' => $this->getTitle(),
|
||||||
'date' => $this->getDate(),
|
'date' => $this->getDate(),
|
||||||
|
|||||||
Reference in New Issue
Block a user