Cal Splitview: include groupmember events
authorsstamer <s.stamer@metaways.de>
Wed, 17 Jun 2015 08:12:27 +0000 (10:12 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 22 Jun 2015 10:09:35 +0000 (12:09 +0200)
Change-Id: I84de5fffc9573de1bf51d1e724ee1d101b1c544c
Reviewed-on: http://gerrit.tine20.com/customers/1977
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/js/Model.js

index 8c39eab..d06abd2 100644 (file)
@@ -639,7 +639,14 @@ Tine.Calendar.Model.Attender.getAttendeeStore.getAttenderRecord = function(atten
     var attendeeRecord = false;
     
     attendeeStore.each(function(r) {
-        if (r.get('user_type') == attendee.get('user_type') && r.getUserId() == attendee.getUserId()) {
+        var attendeeType = [attendee.get('user_type')];
+
+        // add groupmember for user
+        if (attendeeType[0] == 'user') {
+            attendeeType.push('groupmember');
+        }
+
+        if (attendeeType.indexOf(r.get('user_type') >= 0) && r.getUserId() == attendee.getUserId()) {
             attendeeRecord = r;
             return false;
         }