• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Remove (child) from CGCalendar month view
PostPosted: Wed Apr 24, 2019 3:00 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Mon Jan 28, 2008 4:04 am
Posts: 34
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?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Remove (child) from CGCalendar month view
PostPosted: Wed Apr 24, 2019 3:07 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8100
Location: Fernie British Columbia, Canada
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.

_________________
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Remove (child) from CGCalendar month view
PostPosted: Wed Apr 24, 2019 3:21 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Mon Jan 28, 2008 4:04 am
Posts: 34
Thanks, Calguy. I'll play around with it and see what I can figure out.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Remove (child) from CGCalendar month view
PostPosted: Mon Jun 17, 2019 1:26 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun May 08, 2016 5:36 am
Posts: 22
Location: Rotterdam NL
@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 ...
Code:
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.

_________________
Regards,

Accent Avondonderwijs
René


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Remove (child) from CGCalendar month view
PostPosted: Tue Jun 18, 2019 8:22 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun May 08, 2016 5:36 am
Posts: 22
Location: Rotterdam NL
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:
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);
    }
},

_________________
Regards,

Accent Avondonderwijs
René


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting