From 2c39bc8e04c38547a0d3054ba1e196323d69a7df Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 24 May 2010 05:15:42 +0000 Subject: #801158 by casey: Fixed Dashboard adds customise dashboard link every time block is added. --- modules/dashboard/dashboard.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules/dashboard') diff --git a/modules/dashboard/dashboard.js b/modules/dashboard/dashboard.js index c680062b0..5ac4de055 100644 --- a/modules/dashboard/dashboard.js +++ b/modules/dashboard/dashboard.js @@ -5,9 +5,11 @@ * Implementation of Drupal.behaviors for dashboard. */ Drupal.behaviors.dashboard = { - attach: function () { - $('#dashboard').prepend('
'); - $('#dashboard .customize .action-links a').click(Drupal.behaviors.dashboard.enterCustomizeMode); + attach: function (context, settings) { + $('#dashboard', context).once(function () { + $(this).prepend('
'); + $('.customize .action-links a', this).click(Drupal.behaviors.dashboard.enterCustomizeMode); + }); Drupal.behaviors.dashboard.addPlaceholders(); if (Drupal.settings.dashboard.launchCustomize) { Drupal.behaviors.dashboard.enterCustomizeMode(); -- cgit v1.2.3