Issue #1039666 by Jelle_S, droplet, Kevin Morse, nod_: Fixed Placing a block in a region via select dropdown moves it to the top of the region, but it will show at the bottom.
parent
1b8522b91b
commit
f6c660169c
|
@ -117,24 +117,8 @@ Drupal.behaviors.blockDrag = {
|
||||||
var select = $(this);
|
var select = $(this);
|
||||||
tableDrag.rowObject = new tableDrag.row(row);
|
tableDrag.rowObject = new tableDrag.row(row);
|
||||||
|
|
||||||
// Find the correct region and insert the row as the first in the region.
|
// Find the correct region and insert the row as the last in the region.
|
||||||
$('tr.region-message', table).each(function () {
|
table.find('.region-' + select[0].value + '-message').nextUntil('.region-message').last().before(row);
|
||||||
if ($(this).is('.region-' + select[0].value + '-message')) {
|
|
||||||
// Add the new row and remove the old one.
|
|
||||||
$(this).after(row);
|
|
||||||
// Manually update weights and restripe.
|
|
||||||
tableDrag.updateFields(row.get(0));
|
|
||||||
tableDrag.rowObject.changed = true;
|
|
||||||
if (tableDrag.oldRowElement) {
|
|
||||||
$(tableDrag.oldRowElement).removeClass('drag-previous');
|
|
||||||
}
|
|
||||||
tableDrag.oldRowElement = row.get(0);
|
|
||||||
tableDrag.restripeTable();
|
|
||||||
tableDrag.rowObject.markChanged();
|
|
||||||
tableDrag.oldRowElement = row;
|
|
||||||
$(row).addClass('drag-previous');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Modify empty regions with added or removed fields.
|
// Modify empty regions with added or removed fields.
|
||||||
checkEmptyRegions(table, row);
|
checkEmptyRegions(table, row);
|
||||||
|
|
Loading…
Reference in New Issue