5121 Posts in 1527 Topics by 1119 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1187 Views |
-
Object::useCustomClass('TabSet', 'MyTabSet');

28 July 2010 at 5:15am Last edited: 28 July 2010 5:16am
I'm theming the admin area, but i run into trouble with popups.
I have LeftAndMainDecorator with this working code in init():
Requirements::block(THIRDPARTY_DIR . '/tabstrip/tabstrip.css');
Requirements::css('admintheme/mytheme/tabstrip/tabstrip.css');Now I have new styled tabs. But when I have a popup from SecurityAdmin or AssetAdmin, those lines as skipped.
I thought of extending TabSet to block the default css and add my own and use:
Object::useCustomClass('TabSet', 'MyTabSet');
to substitute the original TabSet with MyTabSet.
Of course this does not work.....
Any Idea how I can change requirements in popup forms?
-
Re: Object::useCustomClass('TabSet', 'MyTabSet');

29 July 2010 at 1:21am Last edited: 29 July 2010 1:28am
ok I try this now a different way by using ComplexTableField::requirementsForPopupCallback
I created an Extension to AssetAdmin and add the method requirementsForPopupCallback
function requirementsForPopupCallback(){
Requirements::block(THIRDPARTY_DIR . '/tabstrip/tabstrip.css');
Requirements::css(ADMINTHEME_DIR . '/css/tabstrip/tabstrip.css');
}if I call : AssetTableField::hasMethod('requirementsForPopupCallback'); from my lefandmaindecoraot it returns true
but it does not get called in ComplexTableField::forTemplate() where I can see this code:
// Append requirements from instance callbacks
$parent = $this->getParentController();
if($parent instanceof ComplexTableField) {
$callback = $parent->requirementsForPopupCallback;
} else {
$callback = $parent->getParentController()->requirementsForPopupCallback;
}
if($callback) call_user_func($callback, $this);if i echo $parent->getParentController() it returns AssetTableField, so I added requirementsForPopupCallback() in AssetTableField, but no joy.
How should I implement requirementsForPopupCallback ?
EDIT :: the forTemplate is in ComplexTableField_Popup
| 1187 Views | ||
|
Page:
1
|
Go to Top |

