[FIX] website: keywords list appear correctly in Optimize SEO dialog

As the keywords are added in the DOM and its' table is also toggled at
the same time, we've to put the toggling of the table after the keywords
pushed in to the DOM.

task-2063206

closes odoo/odoo#44374

X-original-commit: 09c183ab501f834666e9b292ddb9839e2f3ecc1c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
kma-odoo
2020-01-31 12:03:36 +00:00
committed by jpr-odoo
parent 21df11e86d
commit d98d563b51
+2 -2
View File
@@ -175,7 +175,7 @@ var KeywordList = Widget.extend({
exists: function (word) {
return _.contains(this.keywords(), word);
},
add: function (candidate, language) {
add: async function (candidate, language) {
var self = this;
// TODO Refine
var word = candidate ? candidate.replace(/[,;.:<>]+/g, ' ').replace(/ +/g, ' ').trim().toLowerCase() : '';
@@ -192,7 +192,7 @@ var KeywordList = Widget.extend({
keyword.on('selected', self, function (word, language) {
self.trigger('selected', word, language);
});
keyword.appendTo(self.$el);
await keyword.appendTo(self.$el);
}
if (self.isFull()) {
self.trigger('list-full');