diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 665fa64db81..fae010eb673 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -30,15 +30,17 @@ instance.website.EditorBar = instance.web.Widget.extend({ start: function() { var self = this; - this.$('button[data-action]').prop('disabled', true) - .parent().hide(); + this.$('#website-top-edit').hide(); + this.$('#website-top-view').show(); + + $('.dropdown-toggle').dropdown(); + this.$buttons = { edit: this.$('button[data-action=edit]'), save: this.$('button[data-action=save]'), cancel: this.$('button[data-action=cancel]'), snippet: this.$('button[data-action=snippet]'), }; - this.$buttons.edit.prop('disabled', false).parent().show(); self.snippet_start(); @@ -51,10 +53,14 @@ instance.website.EditorBar = instance.web.Widget.extend({ ); }, edit: function () { - this.$buttons.edit.prop('disabled', true).parent().hide(); - this.$buttons.cancel.add(this.$buttons.snippet).prop('disabled', false) - .add(this.$buttons.save) - .parent().show(); + this.$buttons.edit.prop('disabled', true); + this.$('#website-top-view').hide(); + this.$('#website-top-edit').show(); + + // this.$buttons.cancel.add(this.$buttons.snippet).prop('disabled', false) + // .add(this.$buttons.save) + // .parent().show(); + // // TODO: span edition changing edition state (save button) var $editables = $('[data-oe-model]') .not('link, script') diff --git a/addons/website/static/src/js/website_bootstrap.js b/addons/website/static/src/js/website_bootstrap.js index 68d2388be68..d08f6270fc9 100644 --- a/addons/website/static/src/js/website_bootstrap.js +++ b/addons/website/static/src/js/website_bootstrap.js @@ -14,6 +14,6 @@ $(function() { $(function() { var editor = new instance.website.EditorBar(instance.webclient); editor.prependTo($('body')); - $('body').css('padding-top', '32px'); // Not working properly: editor.$el.outerHeight()); + $('body').css('padding-top', '50px'); // Not working properly: editor.$el.outerHeight()); }); }); diff --git a/addons/website/static/src/xml/website.xml b/addons/website/static/src/xml/website.xml index 941015fd0f5..b719bbdd324 100644 --- a/addons/website/static/src/xml/website.xml +++ b/addons/website/static/src/xml/website.xml @@ -3,12 +3,42 @@ --> - + + +