summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-12-10 17:26:04 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-12-10 17:26:04 +0000
commit8bc1fea750627b59ef0a7ff037ebc7c0bae8b42a (patch)
tree0ec13cf49194e04b45d9d728416b3e849fc8f4e1 /modules
parentfc56c024d3a517676e2145fbdfa92811be089c49 (diff)
downloadbrdo-8bc1fea750627b59ef0a7ff037ebc7c0bae8b42a.tar.gz
brdo-8bc1fea750627b59ef0a7ff037ebc7c0bae8b42a.tar.bz2
#655614 by David_Rothstein and ksenzee: Remove code that causes changes made by submitting a form in the overlay to not be reflected when the window automatically closes.
Diffstat (limited to 'modules')
-rw-r--r--modules/overlay/overlay-child.js8
-rw-r--r--modules/overlay/overlay.module19
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