[IMP] web_editor: no empty class on convert grid
X-original-commit: 731ffadb08961b6aada283f96d82c0a35726cffe Part-of: odoo/odoo#80621
This commit is contained in:
@@ -424,6 +424,9 @@ function bootstrapToTable($editable) {
|
||||
$table.append(child);
|
||||
}
|
||||
$table.removeClass('container container-fluid o_fake_table');
|
||||
if (!$table[0].className) {
|
||||
$table.removeAttr('class');
|
||||
}
|
||||
$container.before($table);
|
||||
$container.remove();
|
||||
|
||||
@@ -440,6 +443,9 @@ function bootstrapToTable($editable) {
|
||||
$row.attr(attr.name, attr.value);
|
||||
}
|
||||
$row.removeClass('row');
|
||||
if (!$row[0].className) {
|
||||
$row.removeAttr('class');
|
||||
}
|
||||
for (const child of [...bootstrapRow.childNodes]) {
|
||||
$row.append(child);
|
||||
}
|
||||
@@ -515,6 +521,9 @@ function bootstrapToTable($editable) {
|
||||
}
|
||||
const colMatch = bootstrapColumn.className.match(reColMatch);
|
||||
$currentCol.removeClass(colMatch[0]);
|
||||
if (!$currentCol[0].className) {
|
||||
$currentCol.removeAttr('class');
|
||||
}
|
||||
for (const child of [...bootstrapColumn.childNodes]) {
|
||||
$currentCol.append(child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user