summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml
diff options
context:
space:
mode:
authorDarshan Kalola <dka@odoo.com>2017-06-14 18:26:29 +0530
committerAaron Bohy <aab@odoo.com>2017-06-28 12:41:35 +0200
commit7ada921e67c77e0a9f9ad83f1f685e51c364171d (patch)
tree9cf3165debbfcf3865a4607c81c249e76c01f6ca /addons/web_editor/static/src/xml
parent9f4922a85236e858d8787adf3b891a7b66fa1d63 (diff)
[FIX] web_editor: make html widget translatable
The translate feature of widgets html and html_frame had been broken by the new views refactoring. This commit restores it for the html widget, and removes it completely for html_frame as it wasn't working correctly before the new views anyway (moreover, it had already been disabled for mass_mailing: de403dc1ab440b9b08ea7fce189cd157745dfe74). This commit also ensures that the changes are correctly saved for the html_frame widget. Note that this widget still needs to be converted to our new coding guidelines.
Diffstat (limited to 'addons/web_editor/static/src/xml')
-rw-r--r--addons/web_editor/static/src/xml/backend.xml29
1 files changed, 1 insertions, 28 deletions
diff --git a/addons/web_editor/static/src/xml/backend.xml b/addons/web_editor/static/src/xml/backend.xml
index 69f6e53d6de..082efdbc5a0 100644
--- a/addons/web_editor/static/src/xml/backend.xml
+++ b/addons/web_editor/static/src/xml/backend.xml
@@ -7,41 +7,14 @@
</div>
</t>
- <t t-name="web_editor.FieldTextHtml.button.reset">
- <div class="btn-group pull-right">
- <button class="o_reset_translation btn btn-default btn-sm btn-small" title="Reset from source"><span class="fa fa-upload"></span></button>
- </div>
- </t>
-
<t t-name="web_editor.FieldTextHtml.button.translate">
<div class="btn-group pull-right">
- <button t-if="widget.field.translate" class="oe_field_translate btn btn-default btn-sm btn-small" style="height: 24px; padding: 1px 3px 0px 5px">
+ <button t-if="widget.field.translate" class="o_field_translate btn btn-default btn-sm btn-small" style="height: 24px; padding: 1px 17px 0px 5px">
<span class="fa fa-language fa-lg oe_input_icon"/>
</button>
</div>
</t>
- <t t-name="web_editor.FieldTextHtml.translate">
- <div t-if="widget.recordData.id &amp;&amp; widget.languages.length" style="margin: 5px; position: fixed; top: 0; left: 0; z-index: 2000;">
- <select style="
- width: 148px;
- height: 22px;
- padding: 2px 4px;
- border: 1px solid #ccc;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- background: white;">
- <option value="en_US" t-att-selected="'en_US' == widget.lang ? 'selected' : null">
- <t t-if="!widget.get('effective_readonly')">English (edit mode)</t>
- <t t-if="widget.get('effective_readonly')">English</t>
- </option>
- <t t-foreach="widget.languages" t-as="lang">
- <option t-att-value="lang.code" t-att-selected="lang.code == widget.lang ? 'selected' : null"><t t-esc="lang.name"/></option>
- </t>
- </select>
- </div>
- </t>
<t t-name="web_editor.FieldTextHtml.fullscreen">
<span style="margin: 5px; position: fixed; top: 0; right: 0; z-index: 2000;">
<button class="o_fullscreen btn btn-primary" style="width: 24px; height: 24px; background-color: #337ab7; border: 1px solid #2e6da4; border-radius: 4px; padding: 0; position: relative;">