Skip to content
Snippets Groups Projects
Commit e14705f4 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #639162 by casey: block contextual menu should be available...

- Patch #639162 by casey: block contextual menu should be available immediately when dragged to dashboard canvas area.
parent fa50f04e
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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'
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment