diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-10-29 10:01:28 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-10-29 10:01:28 +0000 |
commit | 5371104a2d10889c532bb5d345fa6d71c0a897d1 (patch) | |
tree | bbef382cea55823195e0cb7469074b743913bc74 /modules/comment | |
parent | 068febde425f4521d61f863ffaca76da65916449 (diff) | |
download | brdo-5371104a2d10889c532bb5d345fa6d71c0a897d1.tar.gz brdo-5371104a2d10889c532bb5d345fa6d71c0a897d1.tar.bz2 |
- Patch #316225 by sun et al: allow behaviors to detach from AHAH/AJAX.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/comment/comment.js b/modules/comment/comment.js index d639a4abd..b951f4211 100644 --- a/modules/comment/comment.js +++ b/modules/comment/comment.js @@ -1,14 +1,16 @@ // $Id$ -Drupal.behaviors.comment = function(context) { - var parts = new Array("name", "homepage", "mail"); - var cookie = ''; - for (i=0;i<3;i++) { - cookie = Drupal.comment.getCookie('comment_info_' + parts[i]); - if (cookie != '') { - $("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context) - .val(cookie) - .addClass('comment-processed'); +Drupal.behaviors.comment = { + attach: function(context) { + var parts = new Array("name", "homepage", "mail"); + var cookie = ''; + for (i=0;i<3;i++) { + cookie = Drupal.comment.getCookie('comment_info_' + parts[i]); + if (cookie != '') { + $("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context) + .val(cookie) + .addClass('comment-processed'); + } } } }; |