From fa5a381f11598396e4f89699bf4947925791b47d Mon Sep 17 00:00:00 2001
From: "a.schindlbeck" <a.schindlbeck@adito.de>
Date: Tue, 11 Jun 2019 10:42:16 +0200
Subject: [PATCH] =?UTF-8?q?Kalender:=20Gesamte=20Serie=20l=C3=B6schbar?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 entity/Appointment_entity/Appointment_entity.aod   | 12 ++++++++++++
 .../children/deleteseries/onActionProcess.js       | 14 ++++++++++++++
 .../_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod    |  3 +++
 language/_____LANGUAGE_de/_____LANGUAGE_de.aod     |  4 ++++
 language/_____LANGUAGE_en/_____LANGUAGE_en.aod     |  3 +++
 .../AppointmentPreview_view.aod                    |  1 +
 6 files changed, 37 insertions(+)
 create mode 100644 entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js

diff --git a/entity/Appointment_entity/Appointment_entity.aod b/entity/Appointment_entity/Appointment_entity.aod
index 78cbee09a0..8fbeb7bf39 100644
--- a/entity/Appointment_entity/Appointment_entity.aod
+++ b/entity/Appointment_entity/Appointment_entity.aod
@@ -162,6 +162,18 @@
         </entityParameter>
       </children>
     </entityConsumer>
+    <entityActionGroup>
+      <name>seriesActionGroup</name>
+      <children>
+        <entityActionField>
+          <name>deleteSeries</name>
+          <title>Delete</title>
+          <onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js</onActionProcess>
+          <iconId>VAADIN:TRASH</iconId>
+          <tooltip>series delete action</tooltip>
+        </entityActionField>
+      </children>
+    </entityActionGroup>
   </entityFields>
   <recordContainers>
     <jDitoRecordContainer>
diff --git a/entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js b/entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js
new file mode 100644
index 0000000000..114756992f
--- /dev/null
+++ b/entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js
@@ -0,0 +1,14 @@
+import("system.vars");
+import("system.calendars");
+import("system.question");
+import("system.translate");
+
+
+var event = JSON.parse(vars.getString("$param.MasterEntry_param"));
+
+if(event != undefined && event != "")
+{
+    var reallyDelete = question.askYesNo(translate.text("Do you really want to delete this recurring appointment?"), "", false);
+    if(reallyDelete)
+        calendars.removeEntryByUID(-1, null, event[calendars.ID], null);
+}
\ No newline at end of file
diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
index fc1f8f3cff..b7d3d1d1d0 100644
--- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
+++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
@@ -3669,6 +3669,9 @@
     <entry>
       <key>Assignment</key>
     </entry>
+    <entry>
+      <key>Complaint</key>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
   <sqlModels>
diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
index 5ff91eb370..cb9b4e0a4c 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -22,6 +22,10 @@
       <key>Notifications</key>
       <value>Benachrichtigungen</value>
     </entry>
+    <entry>
+      <key>Do you really want to delete this recurring appointment?</key>
+      <value>Wollen Sie wirklich die Serie löschen?</value>
+    </entry>
     <entry>
       <key>Add to Campaign</key>
       <value>Zu Kampagne hinzufügen</value>
diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
index d4da94aea5..3f538660df 100644
--- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
+++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
@@ -3718,6 +3718,9 @@
     <entry>
       <key>Assignment</key>
     </entry>
+    <entry>
+      <key>Complaint</key>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
diff --git a/neonView/AppointmentPreview_view/AppointmentPreview_view.aod b/neonView/AppointmentPreview_view/AppointmentPreview_view.aod
index beabd69859..e20d0cb34d 100644
--- a/neonView/AppointmentPreview_view/AppointmentPreview_view.aod
+++ b/neonView/AppointmentPreview_view/AppointmentPreview_view.aod
@@ -25,6 +25,7 @@
       <organizerField>ORGANIZER</organizerField>
       <categoriesField>CATEGORIES</categoriesField>
       <favoriteActionGroup1>PartStatActionGroup</favoriteActionGroup1>
+      <favoriteActionGroup2>seriesActionGroup</favoriteActionGroup2>
       <entityField>#ENTITY</entityField>
     </appointmentPreviewViewTemplate>
     <neonViewReference>
-- 
GitLab