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

#1062785 Calendar: Bugfixes recurring appointments

parent 464d102f
No related branches found
No related tags found
No related merge requests found
......@@ -183,6 +183,7 @@
<entityParameter>
<name>AppointmentState_param</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/appointmentlinks/children/appointmentstate_param/valueProcess.js</valueProcess>
<expose v="false" />
</entityParameter>
</children>
</entityConsumer>
......
......@@ -19,8 +19,8 @@ if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$para
/**
* Sets explicitly the start date when a preset is sent from the core, due to a move or resize event from the user. Do not remove.
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
result.string(event[calendars.DTSTART]);
}
\ No newline at end of file
//if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$param.Entry_param"))
//{
// var event = JSON.parse(vars.getString("$param.Entry_param"));
// result.string(event[calendars.DTSTART]);
//}
\ No newline at end of file
......@@ -19,8 +19,8 @@ if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$para
/**
* Sets explicitly the end date when a preset is sent from the core, due to a move or resize event from the user. Do not remove.
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
result.string(event[calendars.DTEND]);
}
\ No newline at end of file
//if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$param.Entry_param"))
//{
// var event = JSON.parse(vars.getString("$param.Entry_param"));
// result.string(event[calendars.DTEND]);
//}
\ No newline at end of file
......@@ -13,7 +13,25 @@ import("system.neon");
var appointmentSelect = newSelect("APPOINTMENT_ID").from("AB_APPOINTMENTLINK");
var appointmentUids;
if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW && vars.get("$local.idvalues") != null && vars.get("$local.idvalues") != "")
/**
* Will be used, if the user is operating the calendar.
*/
if(vars.exists("$param.Entry_param") && vars.get("$param.Entry_param"))
{
var entry = JSON.parse(vars.getString("$param.Entry_param"));
var masterEntry = null;
if (vars.exists("$param.MasterEntry_param") && vars.get("$param.MasterEntry_param") != "") {
masterEntry = JSON.parse(vars.getString("$param.MasterEntry_param"));
}
//@TODO Icon
result.object([
buildEntry(entry, masterEntry)
]);
}
else if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW && vars.get("$local.idvalues") != null && vars.get("$local.idvalues") != "")
{
var selectedids = vars.get("$local.idvalues");
result.object([buildEntry(calendars.getEntry(selectedids, null, null), null)]);
......@@ -35,23 +53,6 @@ else if(vars.getString("$param.LinkedObjectId_param") != undefined)
appointmentSelect.whereIfSet("AB_APPOINTMENTLINK.OBJECT_ROWID", "$param.LinkedObjectId_param")
result.object(buildEntriesFromUids(appointmentSelect.table()));
}
/**
* Will be used, if the user is operating the calendar.
*/
else if(vars.exists("$param.Entry_param") && vars.get("$param.Entry_param"))
{
var entry = JSON.parse(vars.getString("$param.Entry_param"));
var masterEntry = null;
if (vars.exists("$param.MasterEntry_param") && vars.get("$param.MasterEntry_param") != "") {
masterEntry = JSON.parse(vars.getString("$param.MasterEntry_param"));
}
//@TODO Icon
result.object([
buildEntry(entry, masterEntry)
]);
}
function buildEntriesFromUids(appointmentUids)
{
......
......@@ -27,6 +27,7 @@
<organizerField>ORGANIZER</organizerField>
<ownerField>OWNER</ownerField>
<categoriesField>CATEGORIES</categoriesField>
<recurrenceIdField>RECURRENCEID</recurrenceIdField>
<favoriteActionGroup1>PartStatActionGroup</favoriteActionGroup1>
<favoriteActionGroup2>seriesActionGroup</favoriteActionGroup2>
<entityField>#ENTITY</entityField>
......
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