diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-09-21 11:26:58 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-09-22 08:46:01 +0000 |
| commit | ff81fa4798e232a03daf0eeff7d85ad35a52b25c (patch) | |
| tree | b85bc78a42136aabb08f0faee09eb28336518d2c /addons/website | |
| parent | 2abe8517063b2696cc89e9a453dcc3921fb3b8c7 (diff) | |
[IMP] web_editor, website, *: move text tools in snippets panel
*: website_event, test_website
This commit is a series of hacks. The goal is to move the summernote
text tools to the editor panel for the website editor. All the code
to use the text tools in a top bar is kept (mass mailing, etc) and the
text tools are placed at the right place for website in an ugly way.
This is obviously temporary, until we can implement those text tools
more generically and in a better way thanks to the new editor.
Part of https://github.com/odoo/odoo/pull/57975
task-2344227
closes odoo/odoo#57975
Related: odoo/design-themes#364
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website')
4 files changed, 11 insertions, 6 deletions
diff --git a/addons/website/static/src/scss/website.edit_mode.scss b/addons/website/static/src/scss/website.edit_mode.scss index ef047d5e4bd..72c3a5f6538 100644 --- a/addons/website/static/src/scss/website.edit_mode.scss +++ b/addons/website/static/src/scss/website.edit_mode.scss @@ -154,21 +154,26 @@ table.editorbar-panel { } } -// s_popup in edit mode body.editor_enable.editor_has_snippets { + padding-top: 0 !important; + .s_popup .modal { + // s_popup in edit mode top: var(--o-we-toolbar-height); background-color: transparent; &.fade .modal-dialog { transform: none; } } + + #oe_main_menu_navbar + #wrapwrap .o_header_affixed { + top: 0; + } } .editor_has_snippets { .o_header_affixed { right: $o-we-sidebar-width !important; - top: var(--o-we-toolbar-height) !important; } } diff --git a/addons/website/static/src/scss/website.wysiwyg.scss b/addons/website/static/src/scss/website.wysiwyg.scss index 4ed8d173fca..3626d895b9a 100644 --- a/addons/website/static/src/scss/website.wysiwyg.scss +++ b/addons/website/static/src/scss/website.wysiwyg.scss @@ -20,7 +20,7 @@ } // EDITOR TOP BAR AND POPOVER -#web_editor-top-edit .o_we_website_top_actions { +.o_we_website_top_actions { @include o-position-absolute($top: 0, $right: 0); z-index: $zindex-popover + 5; display: flex; diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml index 6b2ae2f36e4..07562de1de8 100644 --- a/addons/website/static/src/xml/website.editor.xml +++ b/addons/website/static/src/xml/website.editor.xml @@ -11,8 +11,8 @@ <!-- Editor top bar which contains the summernote tools and save/discard buttons --> <t t-name="website.editorbar"> - <div id="web_editor-top-edit"> - <form class="o_we_website_top_actions"> + <div class="o_we_website_top_actions"> + <form> <button type="button" class="btn btn-primary" data-action="save" accesskey="s">Save</button> <button type="button" class="btn btn-secondary" data-action="cancel" accesskey="j">Discard</button> </form> diff --git a/addons/website/static/tests/tours/html_editor.js b/addons/website/static/tests/tours/html_editor.js index e22ded23311..281b53b8dba 100644 --- a/addons/website/static/tests/tours/html_editor.js +++ b/addons/website/static/tests/tours/html_editor.js @@ -22,7 +22,7 @@ tour.register('html_editor_multiple_templates', { { content: "save the page", extra_trigger: '#oe_structure_test_ui.o_dirty', - trigger: "#web_editor-top-edit button[data-action=save]", + trigger: "button[data-action=save]", }, // 2. Edit generic view { |
