[FIX] web_editor: remove o_checklist class on convert to ordered list

Converting a checklist into an ordered list didn't remove the
o_checklist class. In consequence, converting a checklist to an
ordered list and then to an unordered list failed as the unordered list
with the o_checklist class is effectively a checklist. This fixes that
bug.

closes odoo/odoo#31432

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
Antoine Guenet
2019-05-22 11:55:23 +00:00
committed by Adrien Dieudonne
parent 3c3a3de3f1
commit e2ca200046
@@ -165,10 +165,10 @@ var BulletPlugin = AbstractPlugin.extend({
// convert ul <-> ol
var ul;
$(ol).removeClass('o_checklist');
if (sorted === 'checklist' && current === "ul") {
ul = ol;
} else if (sorted === 'ul' && current === 'checklist') {
$(ol).removeClass('o_checklist');
ul = ol;
} else {
ul = this.document.createElement(sorted === "ol" ? "ol" : "ul");