Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295149

Allow #ajax['dialog'] to contain options other than 'modal'

$
0
0

Spin-off from #1870764: Add an ajax command which makes it easy to use the dialog API in complex cases. That issue is trying to accomplish several things related to better integrating Drupal's AJAX system, form wizards, and dialogs. This is a small spin-off of that targeted at just enabling options to be passed from AJAX to Drupal.dialog(). This is needed to unblock #1821548: Add a "diff" of some kind to the CMI UI which needs to be able to specify a larger than default width for its dialogs, so classifying as a major task.

This patch allows everything in #ajax['dialog'] to get passed as options to the jQuery $element.dialog() function. For example, '#ajax' => array('dialog' => array('modal' =>TRUE, 'width' => '750px')), would open a modal dialog 750px wide. Prior to this patch, 'modal' was the only option forwarded.

A concern with this is whether it binds Drupal's dialog implementation to jQuery UI. If Drupal code starts using arbitrary options defined by jQuery UI, but no other spec, then swapping the dialog implementation to some other library becomes harder.


Viewing all articles
Browse latest Browse all 295149

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>