summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-10-29 10:01:28 +0000
committerDries Buytaert <dries@buytaert.net>2008-10-29 10:01:28 +0000
commit5371104a2d10889c532bb5d345fa6d71c0a897d1 (patch)
treebbef382cea55823195e0cb7469074b743913bc74 /modules/comment
parent068febde425f4521d61f863ffaca76da65916449 (diff)
downloadbrdo-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.js20
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');
+ }
}
}
};