[IMP] Remove ununsed code and dom attributes
bzr revid: fme@openerp.com-20131009135504-5cqnbiuxqn4m6if3
This commit is contained in:
parent
41bb68a87b
commit
5a3036a6cd
|
@ -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',
|
||||
|
|
|
@ -14,9 +14,8 @@
|
|||
<template id="layout" name="Main layout">
|
||||
<!DOCTYPE html>
|
||||
<html t-att-lang="lang.replace('_', '-')"
|
||||
t-att-data-editable="'1' if editable else '0'"
|
||||
t-att-data-translatable="'1' if translatable else '0'"
|
||||
t-att-data-view-xmlid="str(__stack__[0])">
|
||||
t-att-data-translatable="'1' if translatable else None"
|
||||
t-att-data-view-xmlid="str(__stack__[0]) if editable else None">
|
||||
<head>
|
||||
<title><t t-esc="title or res_company.name"/></title>
|
||||
<meta name="openerp.company" t-att-value="res_company.name" />
|
||||
|
|
Loading…
Reference in New Issue