diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-08-27 14:47:47 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-08-28 09:04:55 +0000 |
| commit | 4f27e52cabb77b8b1a9637a11185ddf882adc9af (patch) | |
| tree | b4b752daef0050988604260d43802413c856bbd7 /addons/web_editor/static/src/xml/snippets.xml | |
| parent | 05f9b1f4e680ef05fccf2b9b324ec24282daa65d (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/web_editor/static/src/xml/snippets.xml')
| -rw-r--r-- | addons/web_editor/static/src/xml/snippets.xml | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/addons/web_editor/static/src/xml/snippets.xml b/addons/web_editor/static/src/xml/snippets.xml index 6e2ae656f2d..89819b44396 100644 --- a/addons/web_editor/static/src/xml/snippets.xml +++ b/addons/web_editor/static/src/xml/snippets.xml @@ -3,29 +3,41 @@ <t t-name="web_editor.snippet_overlay"> <div class="oe_overlay"> <div class="o_handles"> + <!-- Visible overlay borders + allow to resize when not readonly --> <div class="o_handle n readonly"/> <div class="o_handle e readonly"/> <div class="o_handle w readonly"/> <div class="o_handle s readonly"/> - </div> - <div class="oe_overlay_options" contentEditable="false"> - <div class="btn-group"> - <a role="button" href="#" class="btn btn-secondary oe_snippet_parent" title="Select Parent Container" aria-label="Select Parent Container"><i class="fa fa-lg fa-level-up"/></a> - <div class="dropdown oe_options d-none btn-group"> - <a role="button" href="#" data-toggle="dropdown" class="btn btn-primary" title="Customize">Customize</a> - <div class="dropdown-menu" role="menu"/> - </div> - <a role="button" href="#" class="btn btn-secondary oe_snippet_move" title="Drag to Move" aria-label="Drag to Move"><i class="fa fa-arrows ml4 mr4"></i></a> - <a role="button" href="#" class="btn btn-secondary oe_snippet_clone" title="Duplicate Container" aria-label="Duplicate Container"><i class="fa fa-files-o ml4 mr4"></i></a> - <a role="button" href="#" class="btn btn-secondary oe_snippet_remove" title="Remove Block" aria-label="Remove Block"><i class="fa fa-trash-o ml4 mr4"></i></a> - </div> + + <!-- Invisible overlay borders which allow to drag and drop --> + <div class="o_move_handle n"/> + <div class="o_move_handle e"/> + <div class="o_move_handle w"/> + <div class="o_move_handle s"/> </div> </div> </t> + <t t-name="web_editor.customize_block_options_section"> + <we-customizeblock-options> + <we-title> + <span t-esc="name"/> + <we-button-group> + <we-button class="fa fa-files-o oe_snippet_clone" + title="Duplicate Container" + aria-label="Duplicate Container"/> + <we-button class="fa fa-trash-o oe_snippet_remove" + title="Remove Block" + aria-label="Remove Block"/> + </we-button-group> + </we-title> + </we-customizeblock-options> + </t> + <t t-name="web_editor.customize_block_option"> + <we-customizeblock-option/> + </t> <!-- options --> <div t-name="web_editor.snippet.option.colorpicker" class="colorpicker"> - <div class="note-palette-title">Background Color</div> <div class="btn-group palette-reset"> <div class="note-color-reset" data-event="foreColor" data-value="inherit" title="None" role="img" aria-label="No color"> <i class="fa fa-ban"/> |
