In same cases, where width and maxWidth is set for a ctools modal, it does not respect the maxWidth size.
Patch attached to fix that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nick_vh’s picture

igalarza’s picture

I've used it and works. After the patch you only need to add the css. It would be nice if it's included in the module.

Regards.

maximpodorov’s picture

Issue summary: View changes
FileSize
868 bytes

The patch is re-rolled for the current dev.

Michelle’s picture

I was trying to test this but knew nothing of this functionality so I followed the tutorial on this blog post. However, I can't see where you set the width/maxWidth. I looked at the code that it's calling, ctools_modal_render and then ctools_modal_command_display but don't see anything in there, either. If someone could give me a pointer on this, I'd be happy to test. :)

idebr’s picture

@Michelle I have only been able to set the maxWidth/maxHeight through code, eg:


/**
 * Implements hook_modal_forms_js_settings_alter().
 */
function HOOK_modal_forms_js_settings_alter(&$js_settings) {
  // Add a maximum width to the CTools modal.
  $js_settings['modal-popup-large']['modalSize']['maxWidth'] = 925;
}
Chris Matthews’s picture

The 4 year old patch in #4 to modal.js still applies cleanly to the latest ctools 7.x-1.x-dev and if still applicable needs review.

Checking patch js/modal.js...
Hunk #1 succeeded at 77 (offset 1 line).
Applied patch js/modal.js cleanly.