summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-08-17 09:22:58 +0000
committerqsm-odoo <qsm@odoo.com>2020-08-17 09:31:58 +0000
commit7ef484377a493ebe558242480d0da6b542d6c247 (patch)
treef0eb954297bf8c64b4802afb3ddd1456544744d3 /addons/website/static/src/snippets
parent75b8e39bb26d9c459307f0a00d2b2e598bbb38a0 (diff)
[IMP] web_editor: add delete button on snippet overlay
This commit adds a trash icon on the snippet overlay to delete the snippet without using the left panel button. task-2314805 closes odoo/odoo#55612 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src/snippets')
-rw-r--r--addons/website/static/src/snippets/s_table_of_content/options.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website/static/src/snippets/s_table_of_content/options.js b/addons/website/static/src/snippets/s_table_of_content/options.js
index 0aae9030dab..3feb0c745ab 100644
--- a/addons/website/static/src/snippets/s_table_of_content/options.js
+++ b/addons/website/static/src/snippets/s_table_of_content/options.js
@@ -108,12 +108,13 @@ options.registry.TableOfContentNavbar = options.Class.extend({
});
options.registry.TableOfContentMainColumns = options.Class.extend({
+ forceNoDeleteButton: true,
+
/**
* @override
*/
start: function () {
const leftPanelEl = this.$overlay.data('$optionsSection')[0];
- leftPanelEl.querySelector('.oe_snippet_remove').classList.add('d-none'); // TODO improve the way to do that
leftPanelEl.querySelector('.oe_snippet_clone').classList.add('d-none'); // TODO improve the way to do that
return this._super.apply(this, arguments);
},