From ca40afd144b58afee97cf88f7adf22872a37dc6e Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 9 Sep 2013 17:23:12 +0200 Subject: [PATCH] [FIX] necessary widget implementation ``inline`` is now automatically inferred on a per-widget basis if not specified. ``inline`` true|false tells the widget whether it should work on inlines (e.g. span) or blocks (e.g. p). Specifying the wrong one blows up because the wrapper is incorrect (inline==false on an inline element will wrap it in a div and add linefeeds, inline==true on a block element will wrap it in a span which will automatically split up in multiple elements leading to downcast blowing up because the wrong wrapper will be selected). Since last time, inline inference was added: if *unspecified* widget will check what type of object it's called on (using ``CKEDITOR.dtd.$inline``) and generate the correct wrapper for that type. => fix misbehavior by removing explicit inline spec. Also remove unused init and data methods. bzr revid: xmo@openerp.com-20130909152312-1m5kwvgw04gcrfkv --- addons/website/static/src/js/website.editor.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 6607118ea6b..e1ff19c505b 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -125,24 +125,8 @@ init: function (editor) { editor.widgets.add('oeref', { - inline: true, - // dialog: 'oeref', - allowedContent: '[data-oe-type]', editables: { text: '*' }, - init: function () { - var element = this.element; - this.setData({ - model: element.data('oe-model'), - id: parseInt(element.data('oe-id'), 10), - field: element.data('oe-field'), - }); - }, - data: function () { - this.element.data('oe-model', this.data.model); - this.element.data('oe-id', this.data.id); - this.element.data('oe-field', this.data.field); - }, upcast: function (el) { return el.attributes['data-oe-type']; },