Posted by populist on March 19, 2012 at 2:43am
3 followers
Jump to:
| Project: | Panopoly |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | major |
| Assigned: | populist |
| Status: | closed (fixed) |
Issue Summary
This patch modifies the height of the Ctools modals so our design looks right. Ideally this can be accomplished with $.extend() in the Ctools modal settings.
| Attachment | Size |
|---|---|
| ctools-modal-sizing.patch | 284 bytes |
Comments
#1
There is probably a better way to do this by overriding the entire settings array that Ctools sets up. Assigning this to me and marking as active.
#2
And there is, in fact, a better way! Here is the code I used to modify the default Chaos Tools modal:
// Override the Chaos Tools Modal Default Settings$default_style = array(
'CToolsModal' => array(
'modalSize' => array(
'type' => 'scale',
'width' => '.8',
'height' => '.8',
'addWidth' => 0,
'addHeight' => 0,
'contentRight' => 25,
'contentBottom' => 75,
),
'modalOptions' => array(
'opacity' => '.55',
'background-color' => '#FFF',
),
'animationSpeed' => 'fast',
'modalTheme' => 'CToolsModalDialog',
'throbberTheme' => 'CToolsModalThrobber',
),
);
drupal_add_js($default_style, 'setting');
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
Sorry for reopening this.
I was wanting to apply my own custom style to CToolsModal but it seems I can't copy what is in comment #2 and put it in my own hook_init. If I commit out the one in panopoly_core then everything works and I don't recieve a javascript conflict.
Would it be possibly to wrap this CTools customization in a variable_get in case someone wants to use their own custom style overriding CToolsModal?
#5
Elevating priority as not sure how to work around this ^_^
#6
Sounds reasonable. I moved the logic to Panopoly Magic as per #1899368: Allow Panopoly Magic to Work Without Panopoly Core, but this is now how the modal is called:
$modal_style = variable_get('panopoly_magic_modal_style', $default_style);drupal_add_js($modal_style, 'setting');
#7
Committed to dev
#8
Automatically closed -- issue fixed for 2 weeks with no activity.