From: Fabien Meghazi Date: Wed, 9 Oct 2013 13:55:04 +0000 (+0200) Subject: [IMP] Remove ununsed code and dom attributes X-Git-Tag: InsPy_master01~73^2~1263 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=5a3036a6cd055dfb6ac02201d2341fad6d0fd2a7;hp=41bb68a87b22831d73c21e5af4695a3f0c2d2de5;p=odoo%2Fodoo.git [IMP] Remove ununsed code and dom attributes bzr revid: fme@openerp.com-20131009135504-5cqnbiuxqn4m6if3 --- diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index f40ccea..54121ca 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -3,13 +3,12 @@ var website = openerp.website; // $.fn.data automatically parses value, '0'|'1' -> 0|1 - website.is_editable = $(document.documentElement).data('editable'); website.templates.push('/website/static/src/xml/website.editor.xml'); website.dom_ready.done(function () { var is_smartphone = $(document.body)[0].clientWidth < 767; - if (website.is_editable && !is_smartphone) { + if (!is_smartphone) { website.ready().then(website.init_editor); } }); @@ -21,16 +20,15 @@ return new website.editor.RTEImageDialog(editor).appendTo(document.body); } - if (website.is_editable) { - // only enable editors manually - CKEDITOR.disableAutoInline = true; - // EDIT ALL THE THINGS - CKEDITOR.dtd.$editable = $.extend( - {}, CKEDITOR.dtd.$block, CKEDITOR.dtd.$inline); - // Disable removal of empty elements on CKEDITOR activation. Empty - // elements are used for e.g. support of FontAwesome icons - CKEDITOR.dtd.$removeEmpty = {}; - } + // only enable editors manually + CKEDITOR.disableAutoInline = true; + // EDIT ALL THE THINGS + CKEDITOR.dtd.$editable = $.extend( + {}, CKEDITOR.dtd.$block, CKEDITOR.dtd.$inline); + // Disable removal of empty elements on CKEDITOR activation. Empty + // elements are used for e.g. support of FontAwesome icons + CKEDITOR.dtd.$removeEmpty = {}; + website.init_editor = function () { CKEDITOR.plugins.add('customdialogs', { // requires: 'link,image', diff --git a/addons/website/views/views.xml b/addons/website/views/views.xml index 39596cf..37172b6 100644 --- a/addons/website/views/views.xml +++ b/addons/website/views/views.xml @@ -14,9 +14,8 @@