diff options
Diffstat (limited to 'modules/overlay')
-rw-r--r-- | modules/overlay/overlay-child.js | 8 | ||||
-rw-r--r-- | modules/overlay/overlay.module | 19 |
2 files changed, 0 insertions, 27 deletions
diff --git a/modules/overlay/overlay-child.js b/modules/overlay/overlay-child.js index 1b8e54a72..5a81de20f 100644 --- a/modules/overlay/overlay-child.js +++ b/modules/overlay/overlay-child.js @@ -54,14 +54,6 @@ Drupal.behaviors.overlayChild = { // Ok, now we can tell the parent window we're ready. parent.Drupal.overlay.bindChild(window); - // If a form is being displayed, it has a hidden field for the parent - // window's location. Pass it that information. Letting the server side - // know the parent window's location lets us avoid unnecessary redirects - // when the overlay window is being closed automatically. - var re = new RegExp('^' + parent.Drupal.settings.basePath); - var path = parent.window.location.pathname.replace(re, ''); - $('#edit-overlay-parent-url').val(path); - // Install onBeforeUnload callback, if module is present. if ($.isObject(Drupal.onBeforeUnload) && !Drupal.onBeforeUnload.callbackExists('overlayChild')) { Drupal.onBeforeUnload.addCallback('overlayChild', function () { diff --git a/modules/overlay/overlay.module b/modules/overlay/overlay.module index 101599009..ca2d273db 100644 --- a/modules/overlay/overlay.module +++ b/modules/overlay/overlay.module @@ -146,20 +146,6 @@ function overlay_library() { } /** - * Implements hook_form_alter(). - * - * For forms displayed in the overlay, add a hidden form field that lets us pass - * the parent window's URL into the form. - */ -function overlay_form_alter(&$form, &$form_state, $form_id) { - if (overlay_get_mode() == 'child') { - $form['overlay_parent_url'] = array( - '#type' => 'hidden', - ); - } -} - -/** * Implements hook_drupal_goto_alter(). * * If the current page request is inside the overlay, add ?render=overlay to @@ -382,11 +368,6 @@ function overlay_form_submit($form, &$form_state) { if (!empty($form_state['redirect'])) { $settings['overlayChild']['redirect'] = url($url, $settings); } - // If the redirect destination is the same as the parent window, just - // close the overlay without redirecting the parent. - if (url($form['overlay_parent_url']['#value']) == $settings['overlayChild']['redirect']) { - unset($settings['overlayChild']['redirect']); - } drupal_add_js($settings, array('type' => 'setting')); } // Tell FAPI to redraw the form without redirection after all submit |