Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Issues with extendTable for the Event Calendar


Reply


7 Posts   886 Views

Avatar
Andrew Houle

Community Member, 133 Posts

23 July 2010 at 5:12am

I'm trying to remove the 'All Day' field in the DateTime tab to simplify it. I've extended things with Calendar, CalendarEvent and CalendarDateTime subclasses. Now I'm adding an extendTable() function to my CalendarDateTime subclass. I've tried many things (as you can see) to try and remove the All Day checkbox and table header. I'm pretty sure the subclasses are setup correctly because the added Field 'Notes' works properly. Anyone see what I'm missing, or has this functionality been removed? I'm using SS2.4, event calendar #111 and dom #414

public function extendTable() {
   $this->setComplex(true);
   $this->addPopupField(new TextField('Notes'));
   $this->addTableTitle('Notes','Notes');
   $this->removePopupField('is_all_day');
   $this->removePopupField('All day');
   $this->removePopupField('All Day');
   $this->removeTableField('is_all_day');
   $this->removeTableField('All day');
   $this->removeTableField('All Day');
   $this->removeTableTitle('is_all_day','All day');
   $this->removeTableTitle('All day');
   $this->removeTableTitle('All Day');
}

Thanks in advance,
Andrew

Avatar
UncleCheese

Forum Moderator, 4096 Posts

23 July 2010 at 6:05am

Ugh, this is kind of ugly.

$this->removeTableField('FormattedAllDay');

Avatar
Andrew Houle

Community Member, 133 Posts

23 July 2010 at 6:42am

Hey UC,

Thanks for your help! This worked for the table header... $this->removeTableTitle('FormattedAllDay'); but neither of these... $this->removeTableField('FormattedAllDay'); $this->removePopupField('FormattedAllDay'); worked for the popup field itself.

Thanks,
Andrew

Avatar
UncleCheese

Forum Moderator, 4096 Posts

23 July 2010 at 6:57am

For the popup field itself, you can use "is_all_day", but because the table field uses a formatting function, you have to refer to it by the name of the function.

Avatar
Andrew Houle

Community Member, 133 Posts

23 July 2010 at 7:07am

ugh, sorry to keep this going, but neither $this->removePopupField('is_all_day'); or $this->removeTableField('is_all_day'); seem to work. What is the right syntax?

Avatar
UncleCheese

Forum Moderator, 4096 Posts

23 July 2010 at 7:49am

It's ok.. this module just needs to be completely destroyed and rebuilt. This whole system of extending it is so screwy.

Try running an update.. I changed some stuff in CalendarDateTime.php that should help you.

Avatar
Andrew Houle

Community Member, 133 Posts

23 July 2010 at 7:56am

That's the one! Thanks for the help.