diff options
| author | ddm <ddm@openerp.com> | 2013-08-27 13:35:50 +0200 |
|---|---|---|
| committer | ddm <ddm@openerp.com> | 2013-08-27 13:35:50 +0200 |
| commit | be165dbb7a32a1990dcd151c4bb2e66ab3be91f1 (patch) | |
| tree | 8f154ebc4d2328e319af5c29014a6b337255b6d6 /addons/website/static/src/js/website.js | |
| parent | 26fb3758e7a55c68566f7cc395804ee9f4a81455 (diff) | |
SEO tools visual cleanup
bzr revid: ddm@openerp.com-20130827113550-xi8r0qs8oz2uu990
Diffstat (limited to 'addons/website/static/src/js/website.js')
| -rw-r--r-- | addons/website/static/src/js/website.js | 17 |
1 files changed, 10 insertions, 7 deletions
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 () { |
