Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Ctools modal is wisely used by many modules and its theme is quite ugly. I have investigated into this and found some code which may help to make this possible.
/**
* ctools/js/modal.js, line 32-56
*/
var defaults = {
modalTheme: 'CToolsModalDialog',
throbberTheme: 'CToolsModalThrobber',
animation: 'show',
animationSpeed: 'fast',
modalSize: {
type: 'scale',
width: .8,
height: .8,
addWidth: 0,
addHeight: 0,
// How much to remove from the inner content to make space for the
// theming.
contentRight: 25,
contentBottom: 45
},
modalOptions: {
opacity: .55,
background: '#fff'
},
modalClass: 'default'
};
var settings = {};
$.extend(true, settings, defaults, Drupal.settings.CToolsModal, opts);
/**
* ctools/includes/modal.inc, line 48-65
*/
$settings = array(
'CToolsModal' => array(
'loadingText' => t('Loading...'),
'closeText' => t('Close Window'),
'closeImage' => theme('image', array(
'path' => ctools_image_path('icon-close-window.png'),
'title' => t('Close window'),
'alt' => t('Close window'),
)),
'throbber' => theme('image', array(
'path' => ctools_image_path('throbber.gif'),
'title' => t('Loading...'),
'alt' => t('Loading'),
)),
),
);
drupal_add_js($settings, 'setting');
Please let me know if you think it is a good idea.
Comments
Comment #2
jimmyko CreditAttribution: jimmyko as a volunteer commented