CMSMS 2.2.10, CGCalendar 2.6, CGExtensions 1.62.3, CGSimpleSmarty 2.2.1
Using the "CGCalendar FullCalendar View Sample" layout to display a month grid-style calendar. For recurring events, the parent event is listed as:
My Event (repeats)
and the children of that event all display as:
My Event (Child)
Is there a way to remove the '(repeats)' and '(Child)' part of the event name?
Remove (child) from CGCalendar month view
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Remove (child) from CGCalendar month view
No, appending that text is hardcoded at this time.
you would have to use javascript to hide it. Perhaps the fullCalender eventRender method would do it.
you would have to use javascript to hide it. Perhaps the fullCalender eventRender method would do it.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Remove (child) from CGCalendar month view
Thanks, Calguy. I'll play around with it and see what I can figure out.
- AccentAvondschool
- Forum Members
- Posts: 41
- Joined: Sun May 08, 2016 5:36 am
- Location: Rotterdam NL
Re: Remove (child) from CGCalendar month view
@baldguy
I'm still reviewing all new functions and while setting up the new calendar overview I've encountered the same problem.
The following works for us ...
It does depend on which view you are in.
I'm still reviewing all new functions and while setting up the new calendar overview I've encountered the same problem.
The following works for us ...
Code: Select all
eventAfterRender: function(event, element, view) {
var txt = $(element, 'fc-event-title').text().replace('(Child)', '').replace('(repeats)', '');
//console.log(txt);
$(element, 'fc-event-title').text(txt);
},
- AccentAvondschool
- Forum Members
- Posts: 41
- Joined: Sun May 08, 2016 5:36 am
- Location: Rotterdam NL
Re: Remove (child) from CGCalendar month view
The eventAfterRender was not really necessary but I could no longer edit the previous post. The following works for us in two views (table and list form):
Code: Select all
eventRender: function(event, element, view) {
if (view.name == 'month') {
var txt = $(element, 'fc-event-title').text().replace('(Child)', '').replace('(repeats)', '');
$(element, 'fc-event-title').text(txt);
}
if (view.name == 'listMonth') {
var txt = $(element, 'fc-event-title').html().replace('(Child)', '').replace('(repeats)', '');
$(element, 'fc-event-title').html(txt);
}
},