| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 2 Drupal.behaviors.comment = function (context) { 3 var parts = new Array("name", "homepage", "mail"); 4 var cookie = ''; 5 for (i=0;i<3;i++) { 6 cookie = Drupal.comment.getCookie('comment_info_' + parts[i]); 7 if (cookie != '') { 8 $("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context) 9 .val(cookie) 10 .addClass('comment-processed'); 11 } 12 } 13 }; 14 15 Drupal.comment = {}; 16 17 Drupal.comment.getCookie = function(name) { 18 var search = name + '='; 19 var returnValue = ''; 20 21 if (document.cookie.length > 0) { 22 offset = document.cookie.indexOf(search); 23 if (offset != -1) { 24 offset += search.length; 25 var end = document.cookie.indexOf(';', offset); 26 if (end == -1) { 27 end = document.cookie.length; 28 } 29 returnValue = decodeURIComponent(document.cookie.substring(offset, end).replace(/\+/g, '%20')); 30 } 31 } 32 33 return returnValue; 34 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |