UncleCheese,
I love the DOM, and my question is about cleaning things up.
I have
DataObjects ; Serie -> has many seasons -> has many episodes
Page ; SeriePage
Now when i add a Serie the popup shows with the button [ Add Season ] , but it shows in the same size as the serie popup. So when i add a Season and close the screen i want to go back to the Serie Popup and not to the CMS.
If i'm in the Season Popup and add an Episode i get a smaller popup, i want that for my season too
.
Now whenever i add a season and close the popup it returns me to the CMS, that's a little bit anoying.
FYI
class Serie extends DataObject{
static $db = array ('SerieName' =>'Varchar(20)',
----- and some more --------
);
static $has_one = array(
'SeriePage' =>'SeriePage',
' Cover' => 'Image'
);
static $has_many = array (' SerieSeasons' => 'SerieSeason');
public function getCMSFields()
{
return new FieldSet(
new TextField('SerieName'),
-------And Some more -----,
new ImageUploadField('Cover'),
new DataObjectManager(
$this,
'SerieSeasons',
'SerieSeason',
array('SeasonNmbr' => 'Seizoen')
));
-------------------------------------------------------------------------------------------------
class SerieSeason extends DataObject {
static $db = array('SeasonNmbr' =>' Varchar(20)');
static $has_one = array('Serie' => 'Serie');
static $has_many = array('SerieEpisodes' => 'SerieEpisode');
public function getCMSFields()
{
return new FieldSet
(
new TextField('SeasonNmbr', ' Seizoen' ),
new DataObjectManager(
$this,
' SerieEpisodes',
'SerieEpisode'
);
----------------------------------------------------------------------------------------------------
class SerieEpisode extends DataObject {
static $db = array('EpisodeName' =>' Varchar);
static $has_one = array('SerieSeason' => 'SerieSeason');
----------------------------------------------------------------------------------------------
class SeriePage extends Page {
static $has_many = array ('Series' => ' Serie');
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields -> addFieldToTab("Root.Content.Series", new DataObjectManager($this));
return $fields;
}
Like i mentioned, everything is working, it's just not that userfriendly this way.
One minor issue though...After updating to SS 2.4.3 whenever i need to edit a Serie and the popup opens , the fields don't show correctly, i have to go to Next or Previous and then the Fields are allright. ( talking about the ImageUploadField and the Seasons ) this happens with the episode popup also. There i have to choose ' show all' before the fields are refreshed and i can start edit them.
{posted this issue somewhere else also }
Thank u already