[FIX] web_editor: fix move snippet hiding
The move snippet arrows where not hiding properly when the target was not movable. closes odoo/odoo#43864 X-original-commit: ab32882ff0ecaf9995e52b062b880cd8ea0b6efa Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -96,7 +96,7 @@ var SnippetEditor = Widget.extend({
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$('.o_move_handle').addClass('d-none');
|
||||
this.$('.o_overlay_move_options').addClass('d-none');
|
||||
$customize.find('.oe_snippet_clone').addClass('d-none');
|
||||
}
|
||||
|
||||
|
||||
@@ -837,7 +837,7 @@ body.editor_enable.editor_has_snippets {
|
||||
}
|
||||
}
|
||||
|
||||
> .o_overlay_options {
|
||||
> .o_overlay_move_options {
|
||||
@include o-position-absolute($o-we-handles-offset-to-hide, $left: 50%);
|
||||
transform: translate(-50%, -110%);
|
||||
display: flex;
|
||||
@@ -928,7 +928,7 @@ body.editor_enable.editor_has_snippets {
|
||||
}
|
||||
}
|
||||
|
||||
.o_overlay_options {
|
||||
.o_overlay_move_options {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
<div class="o_handle w readonly"/>
|
||||
<div class="o_handle s readonly"/>
|
||||
|
||||
<!-- Overlay button-like handle to drag and drop -->
|
||||
<div class="o_overlay_options">
|
||||
<!-- Overlay move specific section -->
|
||||
<div class="o_overlay_move_options">
|
||||
<!-- Button-like handle to drag and drop -->
|
||||
<div class="o_move_handle"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1165,7 +1165,7 @@ options.registry.SnippetMove = options.Class.extend({
|
||||
*/
|
||||
start: function () {
|
||||
var $buttons = this.$el.find('we-button');
|
||||
var $overlayArea = this.$overlay.find('.o_overlay_options');
|
||||
var $overlayArea = this.$overlay.find('.o_overlay_move_options');
|
||||
$overlayArea.prepend($buttons[0]);
|
||||
$overlayArea.append($buttons[1]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user