From 5c20973bf9c191fa694ce682ba90117e575deda9 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 24 Jul 2013 14:54:35 +0200 Subject: [PATCH] [IMP] disable ACF to fix ckeditor removing nodes and classes, breaking layout and styling bzr revid: xmo@openerp.com-20130724125435-02c8j92p0tq894nq --- addons/website/static/src/js/website.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 2ed9d0197f1..34805db6fbd 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -1,8 +1,4 @@ openerp.website = function(instance) { -var block = ['section', 'div']; -var block_inline = ['p', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']; -var terminal = block.concat(block_inline).join(', '); - instance.website.EditorBar = instance.web.Widget.extend({ template: 'Website.EditorBar', events: { @@ -36,18 +32,19 @@ instance.website.EditorBar = instance.web.Widget.extend({ }, edit: function () { this.$('button[data-action=edit]').prop('disabled', true); - var $root = $('[data-oe-model]'); - $root.add($root.find(terminal)) + $('[data-oe-model]') .not('link, script, span') - .not(':has(' + terminal + ')') .prop('contentEditable', true) .addClass('oe_editable') .each(function () { CKEDITOR.inline(this, { // Don't load ckeditor's style rules stylesSet: [], - toolbar: 'Basic', + // toolbar: TODO, + // Ensure no config file is loaded customConfig: '', + // Disable ACF + allowedContent: true, }); }); },