Skip to content
Snippets Groups Projects
Commit 2ea8bd98 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #507108 by quicksketch: allow AHAH to reset Drupal.settings after loading response data.

parent f981f7b6
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -197,7 +197,9 @@ Drupal.ahah.prototype.success = function (response, status) {
// Attach all javascript behaviors to the new content, if it was successfully
// added to the page, this if statement allows #ahah[wrapper] to be optional.
if (new_content.parents('html').length > 0) {
Drupal.attachBehaviors(new_content);
// Apply any settings from the returned JSON if available.
var settings = response.settings || Drupal.settings;
Drupal.attachBehaviors(new_content, settings);
}
Drupal.unfreezeHeight();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment