From e14705f4faed5703f547f95790ee1cc3524b46a4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 14 May 2010 11:28:19 +0000 Subject: - Patch #639162 by casey: block contextual menu should be available immediately when dragged to dashboard canvas area. --- modules/dashboard/dashboard.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/dashboard/dashboard.js b/modules/dashboard/dashboard.js index b9c60e135..6f89d30d7 100644 --- a/modules/dashboard/dashboard.js +++ b/modules/dashboard/dashboard.js @@ -172,16 +172,15 @@ Drupal.behaviors.dashboard = { // Load the newly enabled block's content. $.get(Drupal.settings.dashboard.blockContent + '/' + module + '/' + delta, {}, function (block) { - var blockContent = ""; if (block) { - blockContent = $("div.content", $(block)); + item.html(block); } - if (!blockContent) { - blockContent = $('
' + Drupal.settings.dashboard.emptyBlockText + '
'); + if (item.find('div.content').is(':empty')) { + item.find('div.content').html(Drupal.settings.dashboard.emptyBlockText); } - $("div.content", item).after(blockContent).remove(); + Drupal.attachBehaviors(item); }, 'html' ); -- cgit v1.2.3