CMS Made Simple Forums https://forum.cmsmadesimple.org/ |
|
Remove (child) from CGCalendar month view https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=80684 |
Page 1 of 1 |
Author: | baldguy [ Wed Apr 24, 2019 3:00 pm ] |
Post subject: | Remove (child) from CGCalendar month view |
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? |
Author: | calguy1000 [ Wed Apr 24, 2019 3:07 pm ] |
Post subject: | 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. |
Author: | baldguy [ Wed Apr 24, 2019 3:21 pm ] |
Post subject: | Re: Remove (child) from CGCalendar month view |
Thanks, Calguy. I'll play around with it and see what I can figure out. |
Author: | AccentAvondschool [ Mon Jun 17, 2019 1:26 pm ] |
Post subject: | 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 ... \$1: 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); }, It does depend on which view you are in. |
Author: | AccentAvondschool [ Tue Jun 18, 2019 8:22 am ] |
Post subject: | 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): \$1: 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); } }, |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |