diff --git a/core/misc/ajax.js b/core/misc/ajax.js index 1c24c7e..b6864e7 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -263,17 +263,15 @@ ajax.options.data.dialogOptions = element_settings.dialog; } - if (element_settings.dialogType) { - // Ensure that we have a valid URL by adding ? when no query parameter is - // yet available, otherwise append using &. - if (ajax.options.url.indexOf('?') === -1) { - ajax.options.url += '?'; - } - else { - ajax.options.url += '&'; - } - ajax.options.url += Drupal.ajax.WRAPPER_ENVELOPE + '=drupal_' + element_settings.dialogType; + // Ensure that we have a valid URL by adding ? when no query parameter is + // yet available, otherwise append using &. + if (ajax.options.url.indexOf('?') === -1) { + ajax.options.url += '?'; + } + else { + ajax.options.url += '&'; } + ajax.options.url += Drupal.ajax.WRAPPER_ENVELOPE + '=drupal_' + (element_settings.dialogType || 'ajax'); // Bind the ajaxSubmit function to the element event. $(ajax.element).on(element_settings.event, function (event) { diff --git a/core/modules/ckeditor/js/ckeditor.js b/core/modules/ckeditor/js/ckeditor.js index 525f8d2..3df3366 100644 --- a/core/modules/ckeditor/js/ckeditor.js +++ b/core/modules/ckeditor/js/ckeditor.js @@ -161,8 +161,9 @@ var $content = $('
' + Drupal.t('Loading...') + '
'); $content.appendTo($target); - var options = { + new Drupal.ajax('ckeditor-dialog', $content.find('a').get(0), { dialog: dialogSettings, + dialogType: 'modal', selector: '.ckeditor-dialog-loading-link', url: url, event: 'ckeditor-internal.ckeditor', @@ -170,9 +171,7 @@ submit: { editor_object: existingValues } - }; - options[Drupal.ajax.WRAPPER_ENVELOPE] = 'modal'; - new Drupal.ajax('ckeditor-dialog', $content.find('a').get(0), options); + }); $content.find('a') .on('click', function () { return false; }) .trigger('ckeditor-internal.ckeditor');