10379 Posts in 2194 Topics by 1710 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1013 Views |
-
Event Calendar upgrade, extended CalendarDateTime field disappears

31 August 2009 at 8:26am
Hi,
I recently upgrade SS to 2.3.3 and then pulled down the latest Event Calendar code from SVN. I had some extension classes working nicely, but now there are issues.
In particular, how do I get my custom field to show up in the Date popup?
Example:
<?php
class CourseOrEventDateTime extends CalendarDateTime
{
static $db = array (
'Location' => 'Varchar(50)'
);static $has_one = array (
'CourseOrEvent' => 'CourseOrEvent'
);public function extendTable()
{
$this->addTableTitles(array(
'Location' => 'Location'
));
$this->addTableFields(array(
'Location' => 'TextField'
));
}
}
?>How do I get "Location" to appear in the pop-up?
Todd
-
Re: Event Calendar upgrade, extended CalendarDateTime field disappears

31 August 2009 at 8:48am Last edited: 31 August 2009 8:48am
Wouldn't you know it, right after I post I find a "solution". Or is the following a hack?
public function extendTable()
{
$this->addTableTitles(array(
'Location' => 'Location'
));
$this->addTableFields(array(
'Location' => 'TextField'
));
$newpopup = new TextField('Location');
$this->addPopupField($newpopup);
} -
Re: Event Calendar upgrade, extended CalendarDateTime field disappears

31 August 2009 at 10:31am
Yeah, the addTableField() method is somewhat deprecated. I eventually want EventCalendar to require DataObjectManager, making the old TableFields useless. So what you did is correct. addPopupField() and addPopupFields() are what you should be using.
| 1013 Views | ||
|
Page:
1
|
Go to Top |

