Skip to content
Snippets Groups Projects
Commit 32287a5a authored by Sascha Eggenberger's avatar Sascha Eggenberger
Browse files

Tabledrag message

parent c0e5adbc
No related branches found
No related tags found
2 merge requests!518Issue 3480661: Add padding to bottom of ckeditor content.,!228Issue #3342164: Remove implicit dependency on node module for gin content form
......@@ -1379,9 +1379,20 @@
Drupal.tableDrag.prototype.row.prototype.addChangedWarning = function () {
// Do not add the changed warning if one is already present.
if (!$(this.table.parentNode).find('.tabledrag-changed-warning').length) {
const $changedWarning = $(Drupal.theme('tableDragChangedWarning'));
const $form = $(this.table).closest('form');
$(Drupal.theme('tableDragChangedWarning'))
.insertBefore(this.table)
let $moveTo = this.table;
// Check where to insert
if ($changedWarning.parents('.gin-table-scroll-wrapper').has('.tabledrag-toggle-weight-wrapper')) {
$moveTo = '.tabledrag-toggle-weight-wrapper';
}
else if ($changedWarning.parents('.gin-table-scroll-wrapper')) {
$moveTo = '.gin-table-scroll-wrapper';
}
$changedWarning
.insertBefore($moveTo)
.hide()
// If a warning has already been shown, do not fade the warning in, so
// it appears static when the table is rebuilt.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment