summaryrefslogtreecommitdiff
path: root/addons/website_form/views
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-08-27 14:47:47 +0000
committerqsm-odoo <qsm@odoo.com>2019-08-28 09:04:55 +0000
commit4f27e52cabb77b8b1a9637a11185ddf882adc9af (patch)
treeb4b752daef0050988604260d43802413c856bbd7 /addons/website_form/views
parent05f9b1f4e680ef05fccf2b9b324ec24282daa65d (diff)
[IMP] web_editor, *: introduce and restore new web_editor UI
* mass_mailing, note, website, website_blog, website_form, website_mass_mailing, website_sale This commit, unfortunately, mixes three things: - Restoring as much as possible the scss organisation to allow styling the web_editor UI properly. - Fixing some bugs like a border around the page once the editor is loaded, no ability to scroll the snippets, etc - Introducing a whole new UI for snippet options: a left panel instead of the old dropdown & button overlay. Note: this commit also do some linting and ES6 convertion even though some of it has been done in the parent commit. Note 2: some elements that were removed are still styled in the POS apps but this is because part of a feature was removed while leaving dead code behind, this is handled in another PR which is to be merged (https://github.com/odoo/odoo/pull/36136). Part of https://github.com/odoo/odoo/pull/36068 task-1942370 closes odoo/odoo#36068 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website_form/views')
-rw-r--r--addons/website_form/views/snippets.xml40
1 files changed, 20 insertions, 20 deletions
diff --git a/addons/website_form/views/snippets.xml b/addons/website_form/views/snippets.xml
index b47e02eeda5..c485b64d8c3 100644
--- a/addons/website_form/views/snippets.xml
+++ b/addons/website_form/views/snippets.xml
@@ -30,29 +30,29 @@
<xpath expr="//div" position="after">
<!-- Form -->
<div data-js="website_form_editor" data-selector=".s_website_form">
- <a href="#" class="dropdown-item" data-website_form_model_modal="" data-no-preview="true">Change Form Parameters</a>
- <a href="#" class="dropdown-item" data-website_form_field_modal="" data-no-preview="true">Add an existing field</a>
- <div class="dropdown-submenu">
- <a href="#" class="dropdown-item">Add a custom field</a>
- <div class="dropdown-menu" role="menu" data-no-preview="true">
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="char">Text</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="text">Long Text</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="integer">Number</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="float">Decimal Number</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="boolean">Checkbox</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="selection">Radio Buttons</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="many2one">Selection</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="one2many">Multiple Checkboxes</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="date">Date</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="datetime">Date &amp; Time</a>
- <a href="#" class="dropdown-item" role="menuitem" data-website_form_custom_field="binary">File Upload</a>
- </div>
- </div>
+ <we-button data-website_form_model_modal="" data-no-preview="true">Change Form Parameters</we-button>
+ <we-button data-website_form_field_modal="" data-no-preview="true">Add an existing field</we-button>
+ <we-collapse-area>
+ <we-toggler>Add a custom field</we-toggler>
+ <we-collapse data-no-preview="true">
+ <we-button data-website_form_custom_field="char">Text</we-button>
+ <we-button data-website_form_custom_field="text">Long Text</we-button>
+ <we-button data-website_form_custom_field="integer">Number</we-button>
+ <we-button data-website_form_custom_field="float">Decimal Number</we-button>
+ <we-button data-website_form_custom_field="boolean">Checkbox</we-button>
+ <we-button data-website_form_custom_field="selection">Radio Buttons</we-button>
+ <we-button data-website_form_custom_field="many2one">Selection</we-button>
+ <we-button data-website_form_custom_field="one2many">Multiple Checkboxes</we-button>
+ <we-button data-website_form_custom_field="date">Date</we-button>
+ <we-button data-website_form_custom_field="datetime">Date &amp; Time</we-button>
+ <we-button data-website_form_custom_field="binary">File Upload</we-button>
+ </we-collapse>
+ </we-collapse-area>
</div>
<!-- Field -->
<div data-js='website_form_editor' data-selector=".form-field" data-drop-near=".form-field">
- <a href="#" class="dropdown-item" data-toggle-class="o_website_form_field_hidden" data-no-preview="true">Hidden</a>
+ <we-button data-toggle-class="o_website_form_field_hidden" data-no-preview="true">Hidden</we-button>
</div>
<!-- Add move, duplicate and remove controllers to checkboxes and radio buttons -->
@@ -63,7 +63,7 @@
<!-- Required option for fields that are not required fields of the model -->
<div data-js='website_form_editor_field' data-selector=".form-field:not(.o_website_form_required)">
- <a href="#" class="dropdown-item" data-website_form_field_require="" data-toggle-class="o_website_form_required_custom" data-no-preview="true">Required</a>
+ <we-button data-website_form_field_require="" data-toggle-class="o_website_form_required_custom" data-no-preview="true">Required</we-button>
</div>
<!-- Remove the duplicate options of model fields -->