From e6e29ac1b0d6780241ced3d5ebcb0558e219e468 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 31 Aug 2009 05:51:08 +0000 Subject: =?UTF-8?q?-=20Patch=20#444344=20by=20kkaefer,=20sun,=20Rob=20Loac?= =?UTF-8?q?h:=20this=20change=20introduces=20a=20jQuery=20.once()=20method?= =?UTF-8?q?=20which=20streamlines=20the=20way=20behavior=20functions=20wor?= =?UTF-8?q?k.=20Previously,=20we=20had=20to=20manually=20ensure=20that=20a?= =?UTF-8?q?n=20element=20is=20only=20initialized=20once.=20Usually,=20this?= =?UTF-8?q?=20happens=20by=20adding=20classes=20and=20selecting=20only=20t?= =?UTF-8?q?hose=20elements=20which=20do=20not=20have=20that=20class.=20How?= =?UTF-8?q?ever,=20this=20process=20can=20be=20separated=20out=20into=20a?= =?UTF-8?q?=20jQuery=20=E2=80=98filtering=E2=80=99=20function=20which=20do?= =?UTF-8?q?es=20all=20the=20grunt=20work.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/common.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index b5686cab7..ce21e4fa4 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2960,8 +2960,9 @@ function drupal_add_js($data = NULL, $options = NULL) { 'preprocess' => TRUE, ), ); - // jQuery itself is registered as a library. + // Register all required libraries. drupal_add_library('system', 'jquery'); + drupal_add_library('system', 'once'); } switch ($options['type']) { -- cgit v1.2.3