diff --git a/core/misc/dialog.ajax.js b/core/misc/dialog.ajax.js index c33a5e6..3cc1dae 100644 --- a/core/misc/dialog.ajax.js +++ b/core/misc/dialog.ajax.js @@ -15,7 +15,7 @@ // dialogs. Non-modal dialogs are responsible for creating their own // elements, since there can be multiple non-modal dialogs at a time. if (!$('#drupal-modal').length) { - $('
').hide().appendTo('body'); + $('').appendTo('body'); } // Special behaviors specific when attaching content within a dialog. @@ -42,6 +42,7 @@ * An array of buttons that need to be added to the button area. */ prepareDialogButtons: function ($dialog) { + return; var buttons = []; var $buttons = $dialog.find('.form-actions input[type=submit]'); $buttons.each(function () { @@ -79,7 +80,7 @@ var $dialog = $(response.selector); if (!$dialog.length) { // Create the element if needed. - $dialog = $('
').appendTo('body'); + $dialog = $('').appendTo('body'); } // Set up the wrapper, if there isn't one. if (!ajax.wrapper) { diff --git a/core/misc/dialog.js b/core/misc/dialog.js index 2bb3a32..660afd8 100644 --- a/core/misc/dialog.js +++ b/core/misc/dialog.js @@ -24,6 +24,9 @@ drupalSettings.dialog = { Drupal.dialog = function (element, options) { + return element[0]; + + function openDialog (settings) { settings = $.extend({}, drupalSettings.dialog, options, settings); // Trigger a global event to allow scripts to bind events to the dialog.