Added method getSentMessagesByPerson to controller Message

This commit is contained in:
bison-paolo
2016-09-28 17:29:14 +02:00
parent 7db01c8eb5
commit 23b22c0817
2 changed files with 21 additions and 1 deletions
@@ -85,6 +85,26 @@ class Message extends APIv1_Controller
}
}
/**
* @return void
*/
public function getSentMessagesByPerson()
{
$person_id = $this->get("person_id");
$all = $this->get("all");
if (isset($person_id))
{
$result = $this->messagelib->getSentMessagesByPerson($person_id, $all);
$this->response($result, REST_Controller::HTTP_OK);
}
else
{
$this->response();
}
}
/**
* @return void
*/
+1 -1
View File
@@ -41,7 +41,7 @@
url: "<?php echo $url; ?>",
data: {"vorlage_kurzbz": vorlage_kurzbz},
success: function(data, textStatus, jqXHR) {
tinyMCE.activeEditor.setContent(data.retval[0].text);
tinyMCE.activeEditor.setContent(data.retval[0].text + "<?php echo $message->body; ?>");
},
error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus + " - " + errorThrown);