Skip to content
Snippets Groups Projects
Commit 41e24607 authored by Andreas Schindlbeck's avatar Andreas Schindlbeck
Browse files

#1024216 Reminder-Integration

parent ab777e09
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ if(vars.exists("$param.entry"))
var organizer = entry[calendars.ORGANIZER2]["paramvalue"];
var status = entry[calendars.STATUS];
var location = entry[calendars.LOCATION];
var reminder = entry[calendars.REMINDER];
var reminder = entry[calendars.REMINDER_DURATION];
var remindercheck = entry[calendars.HASREMINDER]
var classification = entry[calendars.CLASSIFICATION];
var transparency = entry[calendars.TRANSPARENCY];
......
......@@ -4,21 +4,19 @@ import("system.translate");
import("system.calendars");
if( calendars.getBackendType() != calendars.BACKEND_EXCHANGEWS )
{
logging.log("possible items: if")
result.object( [ [calendars.STATUS_TENTATIVE, translate.text("Vorläufig")]
, [calendars.STATUS_CONFIRMED, translate.text("Bestätigt")]
, [calendars.STATUS_CANCELLED, translate.text("Abgesagt")]
] );
{
result.object([
[calendars.STATUS_CONFIRMED, translate.text("Bestätigt")],
[calendars.STATUS_TENTATIVE, translate.text("Vorläufig")],
[calendars.STATUS_CANCELLED, translate.text("Abgesagt")]
]);
}
else
{
logging.log("possible items: else")
result.object( [ [calendars.STATUS_TENTATIVE, translate.text("Vorläufig")]
, [calendars.STATUS_BUSY, translate.text("Gebucht")]
, [calendars.STATUS_OOF, translate.text("Außer Haus")]
, [calendars.STATUS_FREE, translate.text("frei")]
{
result.object( [
[calendars.STATUS_BUSY, translate.text("Gebucht")],
[calendars.STATUS_TENTATIVE, translate.text("Vorläufig")],
[calendars.STATUS_OOF, translate.text("Außer Haus")],
[calendars.STATUS_FREE, translate.text("frei")]
] );
}
\ No newline at end of file
......@@ -22,39 +22,14 @@ event[calendars.LOCATION] = vars.get("$field.LOCATION");
event[calendars.DESCRIPTION] = vars.get("$field.DESCRIPTION");
event[calendars.DTSTART] = vars.get("$field.STARTDATE");
event[calendars.DTEND] = vars.get("$field.ENDDATE");
event[calendars.HASREMINDER] = "false";
var hasReminder = vars.get("$field.REMINDER_CHECK");
if (hasReminder == "true")
{
// Absolut nur, wenn auch gesetzt. Default ist relativ
if ( event[calendars.REMINDER_ABSOLUT] == "true")
{
var reminder_date = vars.get("$field.REMINDER");
if ( reminder_date != "" )
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER_DATE] = reminder_date;
}
}
else
{
var reminder_duration = vars.getString("$field.reminder_duration");
if ( reminder_duration != "")
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER_DURATION] = reminder_duration;
}
}
}
event[calendars.CLASSIFICATION] = vars.get("$field.CLASSIFICATION");
event[calendars.TRANSPARENCY] = vars.get("$field.TRANSPARENCY");
event[calendars.CATEGORIES] = vars.get("$field.CATEGORIES");
//calcrecurrence(event);
//if (event[calendars.RRULE] != undefined) recurrencend(event);
// Links updaten
// swing.saveTableEdit("$field.links");
// Entweder jetzt neu anlegen oder nur updaten
if (vars.get("$field.REMINDER") != undefined && vars.get("$field.REMINDER") != "")
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER_DURATION] = vars.get("$field.REMINDER");
}
event[calendars.ID] = calendars.insert([event])[0];
vars.set("$image.editmode", calendars.MODE_UPDATE);
ok = true;
......
......@@ -41,7 +41,7 @@ if(vars.exists("$param.entry"))
if (vars.get("$field.REMINDER") != undefined && vars.get("$field.REMINDER") != "")
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER] = vars.get("$field.REMINDER");
event[calendars.REMINDER_DURATION] = vars.get("$field.REMINDER");
}
//event[calendars.AFFECTEDUSERS] = getAffectedUsers( event );
// calcrecurrence(event);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment