21280 Posts in 5729 Topics by 2600 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1794 Views |
-
How to Increase has_many popup box (GreyBox?) size?

6 August 2010 at 9:37pm
Hi,
I have a DataObjectParent with a has_many relation to another DataObjectChild. This, as a managed_model in ModelAdmin, creates a table where I can "Add DataObjectChild" and it pops up a window with the form. I think in a 'GreyBox'.
Is there any way to set the default size a bit larger?
Barry
-
Re: How to Increase has_many popup box (GreyBox?) size?

17 August 2010 at 11:43pm
This is a really simple change, and I dont know why by default the popup is soo tiny?
Open sapphire/thirdparty/greybox/greybox.js
change line 214 tobe;GB_ONLY_ONE.setFullScreen(true);
Enjoy full sized popups from any ComplexTableManager ie ModelAdmin/Security
-
Re: How to Increase has_many popup box (GreyBox?) size?

15 October 2010 at 9:16pm
Thanks for this info! Is there a way this can be done without hacking the core. Something like set_popup_width() in Dataobject Manager module?
-
Re: How to Increase has_many popup box (GreyBox?) size?

17 November 2010 at 11:48pm
I've found a nice way to do this... in MyLeftAndMainDecorator (that I use for stuff needed int eh CMS) add some script...
class MyLeftAndMainDecorator extends LeftAndMainDecorator {
function init() {
Requirements::customScript("GB_show = GB_showFullScreen;");
}
}(needs "Object::add_extension('LeftAndMain', 'MyLeftAndMainDecorator');" in _config.php)
-
Re: How to Increase has_many popup box (GreyBox?) size?

9 March 2011 at 11:55am
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 );
}
} -
Re: How to Increase has_many popup box (GreyBox?) size?

9 March 2011 at 10:11pm
Many thanks Tony for the tip!
-
Re: How to Increase has_many popup box (GreyBox?) size?

18 July 2011 at 8:49pm
That is infinitely better. Thanks guys!
| 1794 Views | ||
|
Page:
1
|
Go to Top |




