diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-05-14 11:28:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-05-14 11:28:19 +0000 |
commit | e14705f4faed5703f547f95790ee1cc3524b46a4 (patch) | |
tree | e52d2522a2b9d3d403223eb32f5e8ceaefbb656b | |
parent | fa50f04ee4d55bf6e6098d088a6de86b149dd54d (diff) | |
download | brdo-e14705f4faed5703f547f95790ee1cc3524b46a4.tar.gz brdo-e14705f4faed5703f547f95790ee1cc3524b46a4.tar.bz2 |
- Patch #639162 by casey: block contextual menu should be available immediately when dragged to dashboard canvas area.
-rw-r--r-- | modules/dashboard/dashboard.js | 9 |
1 files changed, 4 insertions, 5 deletions
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 = $('<div class="content">' + Drupal.settings.dashboard.emptyBlockText + '</div>'); + 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' ); |