[IMP] Remove ununsed code and dom attributes
[odoo/odoo.git] / addons / website / static / src / js / website.editor.js
index f40ccea..54121ca 100644 (file)
@@ -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);
         }
     });
         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',