function overlay_trigger_refresh
Checks if the parent window needs to be refreshed on this page load.
If the previous page load requested that any page regions be refreshed, or if it requested that the entire page be refreshed when the overlay closes, pass that request via JavaScript to the child window, so it can in turn pass the request to the parent window.
See also
overlay_request_page_refresh()
Drupal.overlay.refreshRegions()
1 call to overlay_trigger_refresh()
- overlay_overlay_child_initialize in modules/
overlay/ overlay.module - Implements hook_overlay_child_initialize().
File
-
modules/
overlay/ overlay.module, line 996
Code
function overlay_trigger_refresh() {
if (!empty($_SESSION['overlay_regions_to_refresh'])) {
$settings = array(
'overlayChild' => array(
'refreshRegions' => $_SESSION['overlay_regions_to_refresh'],
),
);
drupal_add_js($settings, array(
'type' => 'setting',
));
unset($_SESSION['overlay_regions_to_refresh']);
}
if (!empty($_SESSION['overlay_refresh_parent'])) {
drupal_add_js(array(
'overlayChild' => array(
'refreshPage' => TRUE,
),
), array(
'type' => 'setting',
));
unset($_SESSION['overlay_refresh_parent']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.