summaryrefslogtreecommitdiff
path: root/misc/teaser.js
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-07-01 15:37:10 +0000
committerDries Buytaert <dries@buytaert.net>2007-07-01 15:37:10 +0000
commitc11cb4ec24479e801076c094f043f2084b344d0c (patch)
tree5248d25917032a394ec350b65ebde88259168ffe /misc/teaser.js
parenta3d75e547f62174fe9fa2b5c3f9684b620612b00 (diff)
downloadbrdo-c11cb4ec24479e801076c094f043f2084b344d0c.tar.gz
brdo-c11cb4ec24479e801076c094f043f2084b344d0c.tar.bz2
- Patch #120360 by nedjo: enable AJAX by making all behaviours reattachable.
Diffstat (limited to 'misc/teaser.js')
-rw-r--r--misc/teaser.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/misc/teaser.js b/misc/teaser.js
index c59a92e55..0aa512901 100644
--- a/misc/teaser.js
+++ b/misc/teaser.js
@@ -5,9 +5,9 @@
*
* Note: depends on resizable textareas.
*/
-Drupal.teaserAttach = function() {
- $('textarea.teaser:not(.joined)').each(function() {
- var teaser = $(this).addClass('joined');
+Drupal.behaviors.teaser = function(context) {
+ $('textarea.teaser:not(.teaser-processed)', context).each(function() {
+ var teaser = $(this).addClass('teaser-processed');
// Move teaser textarea before body, and remove its form-item wrapper.
var body = $('#'+ Drupal.settings.teaser[this.id]);
@@ -75,7 +75,3 @@ Drupal.teaserAttach = function() {
});
};
-
-if (Drupal.jsEnabled) {
- $(document).ready(Drupal.teaserAttach);
-}