add sturcutred fbInfo to ease parsing
authorCornelius Weiß <c.weiss@metaways.de>
Wed, 19 Jul 2017 18:04:23 +0000 (20:04 +0200)
committerCornelius Weiss <c.weiss@metaways.de>
Thu, 20 Jul 2017 08:57:51 +0000 (10:57 +0200)
Change-Id: I9553aa23577613ca71ec46c376b728e295465be8
Reviewed-on: http://gerrit.tine20.com/customers/5265
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Tested-by: Cornelius Weiss <c.weiss@metaways.de>
tine20/Calendar/js/FreeBusyInfo.js
tine20/Calendar/js/Model.js

index 455b7f2..59ebda5 100644 (file)
@@ -119,8 +119,10 @@ Tine.Calendar.FreeBusyInfo.prototype = {
             info = Ext.util.Format.htmlEncode(this.getInfoForAttendee(attendee, event)),
             qtip = stateId ? ('ext:qtip="' + info + '" ') : '';
 
-        // @TODO impelment hover
-        return ['<div class="cal-fbinfo-state cal-fbinfo-state-', cls, '"', ' tine:calendar-event-id="', event.get('id'), '" ', qtip, ' />'].join('');
+        return ['<div class="cal-fbinfo-state cal-fbinfo-state-', cls, '"',
+            ' tine:calendar-event-id="', event.get('id'), '" ',
+            ' tine:calendar-freebusy-state-id="', stateId, '" ',
+            qtip, ' ></div>'].join('');
     },
 
     /**
index 260bc6d..44f1798 100644 (file)
@@ -879,7 +879,7 @@ Ext.extend(Tine.Calendar.Model.AttenderProxy, Tine.Tinebase.data.RecordProxy, {
     readRecords : function(resultData){
         var _ = window.lodash,
             totalcount = 0,
-            fbEvents = _.union([].concat(this.freeBusyEventsProvider())),
+            fbEvents = _.compact([].concat(this.freeBusyEventsProvider())),
             records = [],
             fbInfos = _.map(fbEvents, function(fbEvent) {
                 return new Tine.Calendar.FreeBusyInfo(resultData.freeBusyInfo[fbEvent.get('id')]);