I found myself needing to make all dialogs non-draggable and non-resizable. There wasn't an easy way to do this without hitting every command that opened them or replacing Drupal.CTools.AJAX.commands.dialog_display. Instead it seemed best to move the values we pass as dialog('options', $foo, $bar) into one place Drupal.settings.Dialog.defaults so we could override them or add in additional values.

This way I was able to do the following:

    // Add default settings for dialog so they're consistent.
    $settings['Dialog']['defaults']['draggable'] = FALSE;
    $settings['Dialog']['defaults']['resizable'] = FALSE;
    drupal_add_js($settings, 'setting');

wonder95 helped with this patch.

CommentFileSizeAuthor
#1 dialog_1096680.patch3.01 KBdrewish

Comments

drewish’s picture

StatusFileSize
new3.01 KB
drewish’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

committed to 6.x-1.x, kicking it over to 7.x for review.

martijn houtman’s picture

While I agree default settings should be configurable, you could, for now, of course override default JS behavior by overriding:

Drupal.ajax.prototype.commands.dialog_display = function(ajax, response, status) {
    ...
}
devin carlson’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (won't fix)

The 7.x-1.x branch of the Dialog module is unsupported.