summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2015-03-13 13:37:08 +0100
committerOlivier Dony <odo@openerp.com>2015-03-13 13:44:06 +0100
commit7eec97a5849befba560111bf59c73f7fbee1ce53 (patch)
tree2c866680590113f8cc492a8a14379beeab32de1e
parente93ead9093fb194b8d6fde57f510d56bc0cc3e33 (diff)
[FIX] website, mass_mailing: restore original FieldTextHtml widget -> FieldTextHtmlFrame only for mass_mailing
The new `summernote in iframe` version of the FieldTextHtml widget is not ready for prime time yet. Usability is not very good when used as a replacement for the previous html editor, especially in email composer windows, and initial loading is very slow. For now we only enable it as FieldTextHtmlFrame for mass_mailing templates, where isolation of the style is important (so that recipients receive the exact same result as was displayed on screen, without side-effects caused by backend/frontend style) In master the summernote version will be improved and the old CLE version will be dropped completely.
-rw-r--r--addons/mass_mailing/views/email_template.xml2
-rw-r--r--addons/mass_mailing/views/mass_mailing.xml4
-rw-r--r--addons/website/static/src/css/website.backend.css6
-rw-r--r--addons/website/static/src/js/website.backend.js5
-rw-r--r--addons/website/static/src/xml/website.backend.xml4
5 files changed, 11 insertions, 10 deletions
diff --git a/addons/mass_mailing/views/email_template.xml b/addons/mass_mailing/views/email_template.xml
index 6cc2a1c7b67..b00af41a16f 100644
--- a/addons/mass_mailing/views/email_template.xml
+++ b/addons/mass_mailing/views/email_template.xml
@@ -30,7 +30,7 @@
</group>
<notebook>
<page string="Body">
- <field name="body_html" nolabel="1" options="{'editor_url': '/website_mail/field/email_template'}"/>
+ <field name="body_html" nolabel="1" options="{'editor_url': '/website_mail/field/email_template'}" widget="html_frame"/>
<field name="attachment_ids" widget="many2many_binary"/>
</page>
</notebook>
diff --git a/addons/mass_mailing/views/mass_mailing.xml b/addons/mass_mailing/views/mass_mailing.xml
index 19311b06766..d8db956f113 100644
--- a/addons/mass_mailing/views/mass_mailing.xml
+++ b/addons/mass_mailing/views/mass_mailing.xml
@@ -261,7 +261,7 @@
</div>
<notebook>
<page string="Popup Content">
- <field name="popup_content" options="{'editor_url': '/website_mass_mailing/field/popup_content'}"/>
+ <field name="popup_content" options="{'editor_url': '/website_mass_mailing/field/popup_content'}" widget="html_frame"/>
</page>
</notebook>
</sheet>
@@ -443,7 +443,7 @@
</group>
<notebook>
<page string="Mail Body">
- <field name="body_html" options="{'editor_url': '/website_mail/field/email_template'}"/>
+ <field name="body_html" options="{'editor_url': '/website_mail/field/email_template'}" widget="html_frame"/>
<field name="attachment_ids" widget="many2many_binary" string="Attach a file"/>
</page>
<page string="Options">
diff --git a/addons/website/static/src/css/website.backend.css b/addons/website/static/src/css/website.backend.css
index 63870368a39..24879793303 100644
--- a/addons/website/static/src/css/website.backend.css
+++ b/addons/website/static/src/css/website.backend.css
@@ -4,7 +4,7 @@
.oe_WidgetWebsiteButton.success .oe_unpublish {
display: none;
}
-.oe_form_field_html iframe {
+.oe_form_field_html_frame iframe {
display: block;
width: 100%;
border: 0;
@@ -12,7 +12,7 @@
margin: 0;
min-height: 300px;
}
-.o_form_FieldTextHtml_fullscreen .oe_form_field_html iframe {
+.o_form_FieldTextHtml_fullscreen .oe_form_field_html_frame iframe {
position: absolute !important;
left: 0 !important;
right: 0 !important;
@@ -22,7 +22,7 @@
z-index: 1001 !important;
border: 0;
}
-.o_form_FieldTextHtml_fullscreen .modal .oe_form_field_html iframe {
+.o_form_FieldTextHtml_fullscreen .modal .oe_form_field_html_frame iframe {
top: 0 !important;
}
.o_form_FieldTextHtml_fullscreen .oe_webclient *, .o_form_FieldTextHtml_fullscreen .modal * {
diff --git a/addons/website/static/src/js/website.backend.js b/addons/website/static/src/js/website.backend.js
index cb5d5c7386f..5306df42e21 100644
--- a/addons/website/static/src/js/website.backend.js
+++ b/addons/website/static/src/js/website.backend.js
@@ -15,11 +15,12 @@ instance.web.form.WidgetWebsiteButton = instance.web.form.AbstractField.extend({
});
instance.web.form.widgets = instance.web.form.widgets.extend({
'website_button': 'instance.web.form.WidgetWebsiteButton',
+ 'html_frame': 'instance.web.form.FieldTextHtmlFrame',
});
var widget = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin);
-instance.web.form.FieldTextHtml = widget.extend({
- template: 'FieldTextHtml',
+instance.web.form.FieldTextHtmlFrame = widget.extend({
+ template: 'FieldTextHtmlFrame',
start: function () {
var self = this;
diff --git a/addons/website/static/src/xml/website.backend.xml b/addons/website/static/src/xml/website.backend.xml
index 8aec7f2017c..24f8c825816 100644
--- a/addons/website/static/src/xml/website.backend.xml
+++ b/addons/website/static/src/xml/website.backend.xml
@@ -8,8 +8,8 @@
</div>
</t>
- <t t-name="FieldTextHtml">
- <div class="oe_form_field oe_form_field_html oe_form_embedded_html" t-att-style="widget.node.attrs.style">
+ <t t-name="FieldTextHtmlFrame">
+ <div class="oe_form_field oe_form_field_html_frame oe_form_embedded_html" t-att-style="widget.node.attrs.style">
<iframe/>
</div>
</t>