website.seo.Configurator = openerp.Widget.extend({
template: 'website.seo_configuration',
events: {
+ 'keypress input[name=seo_page_keywords]': 'confirmKeyword',
'click button[data-action=add]': 'addKeyword',
'click a[data-action=update]': 'update',
'hidden': 'close'
this.$el.modal();
},
+ confirmKeyword: function (e) {
+ if (e.keyCode == 13) {
+ this.addKeyword();
+ this.$el.find('input[name=seo_page_keywords]').val("");
+ }
+ },
addKeyword: function () {
var word = this.$el.find('input[name=seo_page_keywords]').val();
new website.seo.Keyword({