From c11cb4ec24479e801076c094f043f2084b344d0c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 1 Jul 2007 15:37:10 +0000 Subject: - Patch #120360 by nedjo: enable AJAX by making all behaviours reattachable. --- misc/teaser.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'misc/teaser.js') 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); -} -- cgit v1.2.3