diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-10-21 15:27:07 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-11-18 09:56:08 +0000 |
| commit | c47527b79451989d9330e2f86a554c5c9e9edf32 (patch) | |
| tree | 31f1a88593277b75375f1379f262caeacd2deff1 /addons/web_editor/static/src | |
| parent | 7623f3ecf7bc9ab54d293430969c31ffdbfd313b (diff) | |
[IMP] web_editor: allow options to add UI in the overlay top bar
-> move the move buttons next to the drag button
Part of https://github.com/odoo/odoo/pull/38959
task-2066614
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/scss/wysiwyg_snippets.scss | 33 | ||||
| -rw-r--r-- | addons/web_editor/static/src/xml/snippets.xml | 4 |
2 files changed, 24 insertions, 13 deletions
diff --git a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss index 93aeef409b1..c57fad802c3 100644 --- a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss +++ b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss @@ -700,16 +700,29 @@ body.editor_enable.editor_has_snippets { } } - > .o_move_handle { + > .o_overlay_options { @include o-position-absolute($o-we-handles-offset-to-hide, $left: 50%); transform: translate(-50%, -110%); + display: flex; + align-items: center; + + > * { + margin: 0 2px; + border: 1px solid $o-we-color-text-normal; + border-radius: 20%; + color: $o-we-color-text-normal; + opacity: 0.5; + transition: opacity 400ms ease 0s; + cursor: pointer; + + &:hover { + opacity: 1; + } + } + } + + .o_move_handle { padding: 2px 4px; - border: 1px solid $o-we-color-text-normal; - border-radius: 20%; - color: $o-we-color-text-normal; - opacity: 0.5; - transition: opacity 400ms ease 0; - cursor: pointer; cursor: move; &::before, &::after { @@ -719,10 +732,6 @@ body.editor_enable.editor_has_snippets { font-size: 0.8em; line-height: 0.35em; } - - &:hover { - opacity: 1; - } } } @@ -781,7 +790,7 @@ body.editor_enable.editor_has_snippets { } } - > .o_move_handle { + .o_overlay_options { display: none; } } diff --git a/addons/web_editor/static/src/xml/snippets.xml b/addons/web_editor/static/src/xml/snippets.xml index 05428a2dbaa..70ecd00c67e 100644 --- a/addons/web_editor/static/src/xml/snippets.xml +++ b/addons/web_editor/static/src/xml/snippets.xml @@ -10,7 +10,9 @@ <div class="o_handle s readonly"/> <!-- Overlay button-like handle to drag and drop --> - <div class="o_move_handle"/> + <div class="o_overlay_options"> + <div class="o_move_handle"/> + </div> </div> </div> </t> |
