diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-07-14 10:37:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-07-14 10:37:27 +0000 |
commit | 2ea8bd980144876bc72095720e868d114bf3e1c8 (patch) | |
tree | 20810f8e7f3d53c817d211e3040d34f23609d67f /misc | |
parent | f981f7b6935a02a859d4b14cafb4408546c615ea (diff) | |
download | brdo-2ea8bd980144876bc72095720e868d114bf3e1c8.tar.gz brdo-2ea8bd980144876bc72095720e868d114bf3e1c8.tar.bz2 |
- Patch #507108 by quicksketch: allow AHAH to reset Drupal.settings after loading response data.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ahah.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/ahah.js b/misc/ahah.js index b56044c3b..3dfb356d3 100644 --- a/misc/ahah.js +++ b/misc/ahah.js @@ -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(); |