diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index 6ceefbf046a..00d3127e286 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -283,9 +283,9 @@ } .oe_seo_keywords_list { - width: 35em; + width: 39em; } .oe_seo_keywords_list li { float: left; - width: 10em; + width: 12em; } diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index 571722d6466..c75946d7c6b 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -247,7 +247,7 @@ $icon_close: #E00101 color: $icon_close .oe_seo_keywords_list - width: 35em + width: 39em li float: left - width: 10em \ No newline at end of file + width: 12em \ No newline at end of file diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 6f72dbc5b40..35f86b65409 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -219,7 +219,6 @@ $('body').removeClass('oe_stop_scrolling'); this.destroy(); }, - }); /* ----- SEO TOOLS ---- */ @@ -229,10 +228,10 @@ events: { 'click a[data-action=remove-keyword]': 'destroy', }, - init: function (options) { - this._super.apply(this, arguments); + init: function (parent, options) { + this._super(parent); this.keyword = options.keyword; - } + }, }); website.seo.Configurator = openerp.Widget.extend({ template: 'website.seo_configuration', @@ -270,11 +269,15 @@ } }, addKeyword: function () { - var word = this.$el.find('input[name=seo_page_keywords]').val(); - if (!this.isKeywordListFull() && !this.isExistingKeyword(word)) { - new website.seo.Keyword({ + var word = this.$el.find('input[name=seo_page_keywords]').val().trim(); + if (word && !this.isKeywordListFull() && !this.isExistingKeyword(word)) { + new website.seo.Keyword(this, { keyword: word }).appendTo(this.$el.find('.js_seo_keywords_list')); + var $body = this.$el.find('.modal-body'); + $body.animate({ + scrollTop: $body[0].scrollHeight + }, 500); } }, update: function () { diff --git a/addons/website/static/src/xml/website.xml b/addons/website/static/src/xml/website.xml index c1925636a62..5ac7f6f6f3b 100644 --- a/addons/website/static/src/xml/website.xml +++ b/addons/website/static/src/xml/website.xml @@ -64,13 +64,13 @@
- +
- +
@@ -83,7 +83,7 @@
- +