|
|
@@ -127,9 +127,6 @@ switch($_REQUEST['action']) {
|
|
|
case 'getNewDocumentBox':
|
|
|
header("Status: 200 OK");
|
|
|
|
|
|
- // TODO: add reload on draft change
|
|
|
- // TODO: add draft-fields as options, depends on ^
|
|
|
-
|
|
|
$editBox = array(
|
|
|
"options" => array(
|
|
|
array(
|
|
|
@@ -141,7 +138,7 @@ switch($_REQUEST['action']) {
|
|
|
array(
|
|
|
"type" => "text",
|
|
|
"name" => "filename",
|
|
|
- "value" => str_replace(".docx", "", Document::getDefaultDraft()->filename) . "_" . date("d_m_Y") . ".docx" // TODO: get value based on draft
|
|
|
+ "value" => str_replace(".docx", "", Document::getDefaultDraft()->filename) . "_" . date("d_m_Y") . ".docx"
|
|
|
)
|
|
|
),
|
|
|
"title" => "Neues Dokument"
|
|
|
@@ -151,9 +148,6 @@ switch($_REQUEST['action']) {
|
|
|
break;
|
|
|
case 'getDraftVars':
|
|
|
header("Status: 200 OK");
|
|
|
-
|
|
|
- // TODO: handle no draft given
|
|
|
-
|
|
|
$documentHandle = new \PhpOffice\PhpWord\TemplateProcessor('drafts/' . $_REQUEST['draft']);
|
|
|
$templateVars = $documentHandle->getVariables();
|
|
|
echo json_encode(array_values($templateVars));
|
|
|
@@ -205,7 +199,6 @@ switch($_REQUEST['action']) {
|
|
|
header("Status: 200 OK");
|
|
|
Label::addLabel($_REQUEST['name'], $_REQUEST['path']);
|
|
|
|
|
|
- // TODO: get status by DB (See: #40, #43)
|
|
|
$return = array(
|
|
|
"status" => "OK"
|
|
|
);
|
|
|
@@ -216,8 +209,6 @@ switch($_REQUEST['action']) {
|
|
|
header("Status: 200 OK");
|
|
|
Label::removeLabel($_REQUEST['labelId']);
|
|
|
|
|
|
- // TODO: get status by DB (See: #40, #43)
|
|
|
-
|
|
|
$return = array(
|
|
|
"status" => "OK"
|
|
|
);
|
|
|
@@ -228,8 +219,6 @@ switch($_REQUEST['action']) {
|
|
|
header("Status: 200 OK");
|
|
|
MailboxFolder::updateMailboxFolder($_REQUEST['mailboxFolderID'], $_REQUEST['folder'], Mailbox::getMailboxByUsername($_REQUEST['account'])->getId(), $_REQUEST['labelID']);
|
|
|
|
|
|
- // TODO: get status by DB (See: #40, #43)
|
|
|
-
|
|
|
$return = array(
|
|
|
"status" => "OK"
|
|
|
);
|
|
|
@@ -240,8 +229,6 @@ switch($_REQUEST['action']) {
|
|
|
header("Status: 200 OK");
|
|
|
MailboxFolder::addMailboxFolder($_REQUEST['folder'], Mailbox::getMailboxByUsername($_REQUEST['account'])->getId(), $_REQUEST['labelID']);
|
|
|
|
|
|
- // TODO: get status by DB (See: #40, #43)
|
|
|
-
|
|
|
$return = array(
|
|
|
"status" => "OK"
|
|
|
);
|
|
|
@@ -328,7 +315,7 @@ switch($_REQUEST['action']) {
|
|
|
case 'setReminderSnooze':
|
|
|
header("Status: 200 OK");
|
|
|
$reminder = Reminder::getReminderByID($_REQUEST['reminderID']);
|
|
|
- $reminder->setReminderDate(date("Y-m-d H:i:s", strtotime("+30 minutes"))); // TODO: add more values as select somewhere
|
|
|
+ $reminder->setReminderDate(date("Y-m-d H:i:s", strtotime("+30 minutes")));
|
|
|
$reminder->save();
|
|
|
|
|
|
$return = array(
|