diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index a307c86cc1e..3f2530fccaa 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -148,10 +148,6 @@ table.editorbar-panel td.selected { height: 140px; } -#website-top-navbar:hover #oe_snippets { - display: block; -} - .oe_snippet { display: inline-block; vertical-align: top; diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index b4994050bab..3c8511450ed 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -137,9 +137,6 @@ table.editorbar-panel .pill-content height: 140px -#website-top-navbar:hover #oe_snippets - display: block - .oe_snippet display: inline-block vertical-align: top diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 1d63fc0c3bb..241280029a3 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -187,7 +187,7 @@ return $.when( this._super.apply(this, arguments), - this.rte.prependTo(this.$('#website-top-edit .nav.pull-right')) + this.rte.appendTo(this.$('#website-top-edit .nav.pull-right')) ); }, edit: function () { diff --git a/addons/website/static/src/js/website.snippets.js b/addons/website/static/src/js/website.snippets.js index d1d13108b96..cb8f193dde2 100644 --- a/addons/website/static/src/js/website.snippets.js +++ b/addons/website/static/src/js/website.snippets.js @@ -6,8 +6,12 @@ website.EditorBar.include({ edit: function () { + var self = this; window.snippets = this.snippets = new website.snippet.BuildingBlock(this); this.snippets.appendTo(this.$el); + this.$el.find('[data-action="snippet"]').click(function () { + self.snippets.$el.toggle(); + }); return this._super.apply(this, arguments); }, save: function () { @@ -100,7 +104,7 @@ $el.css($target.offset()); }, show: function () { - this.$el.css("display", ""); + this.$el.show(); }, hide: function () { this.$el.hide(); diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml index 88a759a2426..44406f22ca5 100644 --- a/addons/website/static/src/xml/website.editor.xml +++ b/addons/website/static/src/xml/website.editor.xml @@ -9,6 +9,7 @@ class="btn">Cancel
diff --git a/addons/website/static/src/xml/website.xml b/addons/website/static/src/xml/website.xml index f40966c89b7..04c2403eda2 100644 --- a/addons/website/static/src/xml/website.xml +++ b/addons/website/static/src/xml/website.xml @@ -14,8 +14,7 @@