How can i access the calendar data inside my event, i mean not in the template, but else where. The idea is, change the template based on the "Confirmed" value that originates from the calendar store.
Here is my code, but no luck so far!
Ext.override(Extensible.calendar.view.DayBody, {
getEventBodyMarkup: function() {
if(!this.eventBodyMarkup) {
// can't seem to get this section to work properly
if (this.data.Confirmed === 1) // I need to access the event store in here...
var statusText='Ok';
else
var statusText='Ko';
this.eventBodyMarkup = ['<p class="ellipsis">{Title}</br><strong>{ServiceName}</strong></br>'+statusText+'{Notes}</p>',
'<tpl if="_isReminder">',
'<i class="ext-cal-ic ext-cal-ic-rem"> </i>',
'</tpl>',
'<tpl if="_isRecurring">',
'<i class="ext-cal-ic ext-cal-ic-rcr"> </i>',
'</tpl>'
].join('');
}
return this.eventBodyMarkup;
},
}
);
Could anyone please help me?
Thanks in advance!