That has a SIDE EFFECT of not refreshing the main panel because the javascript has the wrong no. of params and doesn't call the callback_fn.
The decorator is the right way to do it though, but it needs to be ....
class MyLeftAndMainDecorator extends LeftAndMainDecorator {
function init() {
$custom = <<<JS
GB_show = function(caption, url, /* optional */ height, width, callback_fn) {
GB_initOneIfNeeded();
GB_ONLY_ONE.defaultSize();
GB_ONLY_ONE.setFullScreen(true);
GB_ONLY_ONE.setType("page");
GB_ONLY_ONE.setCallback(callback_fn);
GB_ONLY_ONE.show(caption, url);
return false;
};
JS;
// Requirements::customScript("GB_show = GB_showFullScreen;");
Requirements::customScript( $custom );
}
}